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.
Dear team:
One of my customers encountered the following problems when using f280049 for CAN bus off test:
1. In the normal communication process of CAN, external short circuit CANH and CANL. Through the simulation, we can see the register CanaRegs.CAN_ CTL.bit.Init It becomes 1.
2. Disconnect external CANH and CANL, clear CanaRegs.CAN_CTL.bit.Init = 0 manually by software, and resume CAN communication. When CanaRegs.CAN_CTL.bit.Init = 0, when CANH and CANL are detected by oscilloscope, we can see that there is message data in the bus (at this time, my CAN sending task has not been started). Whether this is the data sent before, because it is not sent successfully due to bus off, and it is stored in the CAN transmit buffer, When the software clears CanaRegs.CAN_CTL.bit.Init, the data in the buffer is automatically sent. He wants to clear CanaRegs.CAN_CTL.bit.Init without sending any data. Wait until his reply is ready to send new data.
The problem is how to clear the data in the CAN transmit buffer before clearing CanaRegs.CAN_CTL.bit.Init.
Best Regards
Hi Deng,
To disable automatic re transmission of not successful messages you can set the DAR bit of CAN_CTL Register. You can use the API CAN_disableRetry() from the driverlib in C2000Ware.
Thanks,
Yashwant
Disabling automatic retransmission will also disable automatic retransmission after loss of arbitration. Please ensure this is OK with application.
Dear Yashwant:
Thank you for your reply.
In fact my customer doesn't want to disable automatic retransmission. In normal communication process, slight CAN bus fault transmission failure can be recovered by automatic retransmission.
He just wants to not retransmit the data in the previous buffer after bus off is recovered when bus off is generated by CAN bus.
Best Regards
Hi Hareesh:
Thank you for your reply as well.
The follow-up questions are described above.
Best Regards
Green,
One possibility I can think of is to disable the message object when bus-off is detected. Assuming the message has not been copied to the Transmit buffer, the automatic transmission will be prevented.