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.

Compiler/TMS320F28031: whether the CAN configuration is error

Part Number: TMS320F28031

Tool/software: TI C/C++ Compiler

Background:there is inevitably wrong terminal resistor connection in end the customer side.

As the CAN bus has a response mechanism, if the node does not receive data to send a reply, the master node will re-send the packet. TA bit can not be set. It will come in the abnormal state when the DSP to determine the failure to send, ES register reported a FE error, then always send data repeatly. And the value of the transmit failure count register CANTEC is always increased.

The baud rate setting is as below and the Baud rate should be fixed at 250kbps. And the nodes is about 40 and the transmit distance is over 40 meters.

here is the configuration and code, could you please check whether we can optimize the code?

this is the code in the main function: