2008-12-11 07:00:17 CAN Communication
ivan ucles (GERMANY)
Message: 66631
Hi,
i've written two functions to send and receive can messages on the bf537.
Now, i'd like to execute automatically the receive function in the first board when the second board sends a message.
What would be the best way to do that?
Thanks
QuoteReplyEditDelete
2008-12-11 15:21:57 Re: CAN Communication
Mike Frysinger (UNITED STATES)
Message: 66644
sorry, but what exactly do you want to do ? your code is running in userspace, so tell it to do whatever you want ...
QuoteReplyEditDelete
2008-12-12 04:03:52 Re: CAN Communication
ivan ucles (GERMANY)
Message: 66648
I want the reception of messages to be automated.
For this purpose do i have to implement an interruption connectig for example CANTX of one board
to a GPIO of the other board?
or it is possible to do it just connecting CAN HIGH and LOW?
QuoteReplyEditDelete
2008-12-12 15:03:42 Re: CAN Communication
Miquel Soler i Mir (SPAIN)
Message: 66667
Hallo.
I'm sorry but I don't understand 100 % your question. I'm working with a project that uses CAN bus.
First of all, are you using the driver can4linux ?
Have you a file called can0 in /dev folder ?
Im my case, I'm openning this file with different parameters (Blocking read, non blocking...).
If you have a compiled program working to read and write CAN messages, you can add in the kernel and start using the rc file.
I hope that this can help you.
Miquel Soler i Mir
TranslateQuoteReplyEditDelete
2008-12-13 10:20:12 Re: CAN Communication
ivan ucles (GERMANY)
Message: 66693
Hola Miquel,
gracias por tu respuesta.
El programa ya lo tengo compilado y añadido al kernel, y funciona:
puedo enviar y recibir mensajes de una placa a otra.
Lo que quería ahora es que cuando desde una de las dos placas
se envia un mensaje, en la otra se ejecute el programa para recibir, sin
necesidad de que yo lo llame.
Por eso preguntaba si tengo que programar una intrerrupción conectando
CANTX (que genera un pulso en la placa que envia el mensaje) con un GPIO de
la placa que recibe el mensaje. O si, por lo contrario, podria hacer esto
simplemente conectando las placas como hasta ahora con CAN+ y CAN-.
Me he explicado ahora mejor?
A lo mejor tú me puedes dar alguna sugerencia
Gracias!