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.

CCS/TMS570LS0332: Cannot receive the error frame when entering Error Active or Error Passive status

Part Number: TMS570LS0332

Tool/software: Code Composer Studio

Hi everyone,

I receive a question from my customer producing EPS devices, please help to support it. Thanks a lot.

The details as follows:

Device: EPS-BLDC

Main microcontroller: TMS570LS0332

“When testing Busoff funtion, we found that, whether Error Active or Error Passive status, we cannot receive the error frame from it. We think this does not comply with the specification according to below picture. Please help solve this problem.”

  • Hello Martin,

    The CAN module has TEC and REC to record the errors. After the start, the CAN controller assumes the normal state "Error Active". In this state, the CAN controller sends six dominant bits (active error flag) after detecting an error. When a limit is exceeded (TEC>127; REC>127), the CAN controllers switch over to the “Error Passive” state. CAN controllers in the Error Passive state can only indicate a detected error by sending six homogeneous recessive bits.

    In addition, when sending two consecutive data or remote frames, CAN controllers that are in the “Error Passive” state must wait the “Suspend Transmission Time” (8 bits).

    What are the value in TEC and REC? What are the errors in your test?

    The CAN protocol defines five mechanisms: bit monitoring, monitoring of the message format (Form Check), monitoring of the bit coding (Stuff Check), evaluation of the acknowledgement (ACK Check) and verifying the checksum (Cyclic Redundancy Check).

    The bit monitoring and ACK check error detection mechanisms are performed by the sender. Independent of acceptance filtering, the receivers perform the form check, stuff check and cyclic redundancy check.
  • Hi QJ Wang,

    Thanks for your reply. About your questions,when we test we create short circuit between CAN high and CAN low to simulate some mistake, through testing equipment,we receive the message like the following picture,communication has be interrupted and it enters error active state.,but we can’t receive any error frames.About REC and TEC,we can find that the TEC only can catch 248,but can’t catch 255 though the debug.

    Best Regards,

    Yang

  • Hi QJ,

    Here is local FAE Sunny, thanks for your help, as this is an important customer for us, could you help to provide some time to solve the problem.

    thanks very much.

    Regards, Sunny

  • Hello Yang,

    I am sorry for delayed response. When the error counter reach to 248, the BUS off bit may be set. Please check if the bit 7 of CAN ES register is set.

    After entering to "error active" or "error passive", the node will transmit the error flag (active error flag or passive error flag) only when an error has been detected.

    I did BUSOFF test weeks ago by shorting CANH and CANL using a wire. The bus enters busoff mode, and then recovers automatically. I also posted a test picture in the post.
  • Hello wang,

    Through debugging, as shown in the following figure,bit 7 of CAN ES register has been setted and the error counter reached  to 248. We have determined that the controller is in the BUSOFF state, but in the process of entering BUSOFF, the external equipment did not receive the error frames, this is the key of the problem.

    Under normal circumstances,as shown in the following figure, we shoud receive error frames when the controller is in the error active and error passive.

    So we want to know why the TMS570 has not sent out  error frames in the process of entering busoff.Thanks!

    Best Regards,

    Yang

  • Hello Yang,

    Has been solved offline. The error frames for bit error, stuff error, ACK error have been detected.