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.

TM4C1294KCPDT: CAN CRC, Bit Stuff errors

Part Number: TM4C1294KCPDT
Other Parts Discussed in Thread: TM4C1294NCPDT

Hi,

We have two custom boards built around the TM4C1294NCPDT that will communicate with each other with CAN.  From a powered off condition, the receiving board reports CAN_STATUS_LEC_STUFF error and the transmitting board reports CAN_STATUS_LEC_BIT1.  If I send a hardware reset to the receiving board (using a jtag programmer) the CAN communications will start to work fine in both directions.  It will continue to work until the one board is powered off and powered back on.  We then get the stuffing error again.

I started with the simple_tx sample code.  Here is a image capture of the scope traces when the error occurs:

Does anyone have any suggestions?

  • Hi Scott,
    This is the capture of the differential CANH and CANL, right? I can't deciper from the capture? Do you have the capture of the TX and RX pins? What is the message ID and what is the payload data?

    You get a bit stuff error when there are more than 5 consecutive equal bits in a sequence. It may be possible that you turn off the transmitter in the middle of a on-going transmission. During power off, the transmitter TX/RX are hence pulled low. The receiver who does not know the transmitter has been taken out of the bus will be mistaken to think that there are more than 5 equal bits on the bus which is not allowed per CAN protocol. The CAN protocol requires bit stuffing from the transmitter if there are more than 5 equal bits in the bit stream.
  • Thanks Charles for the reply.  That is a capture of the differential CANH and CANL.  

    With further testing we think our problem is an electrical problem.  Our electrical engineer here has started a new thread with additional information and that can be found here: 

    https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/659422/2423118#2423118.

    Scott