2 Replies Latest reply on Nov 16, 2019 8:37 AM by GuNo_288966

    CAN bus error detection: How to detect short circuit with PSoC5LP?



      I have a custom board with a CY8C5888AXI-LP096 and a TJA1050 CAN transceiver.

      CAN controller V3.0.

      Transmission of data works fine.


      Now I am having trouble to detect an error state.


      When the bus is not connected, CAN_GetErrorState() replies 0x01 (passive), ok.


      When CANH and CANL is shortened and released again, the CAN component stops sending data to the TJA1050.

      I can not find how to detect this situation:

      CAN_GetErrorState() returns 0

      CAN_GetTSErrorFlag() returns 0

      CAN_GetTXErrorCount() returns 0


      When I then call CAN_Start(), the CAN component recovers and continues to send data.


      The function CAN_ReadErrorCaptureRegister() might do the job but is not available for PSoC5LP.


      How can I detect the situation after a shorting of the bus lines to automatically recover?


      Thanks for input!