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.

TMS320F280049: How to clear the can sending buffer?

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

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