This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello
I have a working CAN transmit interrupt routine and I would want to add message time out handling in that interrupt. The routine use a circular buffer.
In my interrupt I clear the CANTA flag and advance the tail pointer and send the next buffered CAN message.
I would like to add a time out and then clear the un-transmitted message if it times out.
I have found a MOTO.c example but it is not a good example.
Im using an TMS320F28335.
Any help?
You should set up the MOTO register for the CAN mailbox you are using. Then if the message times out, the time out flag will be set (CANTOS register). If that happens, you can set the corresponding bit in the transmission request reset register (CANTRR). This will abort the transmission. Then watch the abort acknowledge register (CANAA) to make sure the message was successfully aborted.