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.

TMS320F28031: CAN error, and want to stop the re-transmit of the wrong data

Part Number: TMS320F28031


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 20 meters.

 

The customer wants to know which sample point is the best and the Influence on the CAN communication performance.

The CANES_REG status is as below:

 

Is there any general method to handle CAN error problem from the software level.

The customer hopes to stop the re-transmit after 100 times and give a alarm signal.

Here is the right and wrong wave forms (the difference signal between the CAN_H and CAN_L)

The upper wave is right and the lower wave is wrong.

 

Besides, it is more easy to have errors for the data like 0X5555

When we remove the filter capacitance between the CAN_H and the ground (the CAN_L and the ground), the wave gets better.

 

  • Emma,

    It appears you have embedded some images in your post, but they don't show up. I tried both IE and Chrome browsers. Could you re-post with the images? Or embed the images in a file attachment?

  • thanks! I re-post the images.
  • Emma,

                Here are my comments:

     

    Backgroundthere is inevitably wrong terminal resistor connection in end the customer side.

     

    Answer: Could you please send me the schematics of the circuit?

     

    About choosing the sampling point, this is to be done after considering parameters like propagation delay of the transceiver, the bus, oscillator tolerance etc. Please have customer use SPRAC35.

     

    Is there any general method to handle CAN error problem from the software level.

    Answer: There is no "general method" as such. Each application is unique and would handle it as appropriate. The bigger concern should be why there are error frames in the first place.

     

    The customer hopes to stop the re-transmit after 100 times and give a alarm signal.

    Answer: This is not possible. Re-transmission upon unsuccessful transmission is automatic and code has no control over this process.

     

    Besides, it is more easy to have errors for the data like 0X5555

    Answer: This is to be expected, since the bus state changes for every successive bit.

     

    When we remove the filter capacitance between the CAN_H and the ground (the CAN_L and the ground), the wave gets better.

    Answer: Hard to comment on this without seeing the circuit diagram