LPC1778 MCU - CAN Tx error, Bus off state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1778 MCU - CAN Tx error, Bus off state

736 Views
a_k_y
Contributor I

LPC1778 MCU is connected to CAN interface as a CAN node. In that CAN interface, MCU do both transmit and receive the data. In this interface sometimes CAN Bus-off state also happening.

For that, we monitor BS bit, ES bit, TXERR and RXERR values of GSR (Global Status Register) register. Mostly TXERR values are changing frequently. When we BS bit and ES bit of GSR register going to"1", we change RM bit of MOD (Mode register) to "0".

What are causes for increment/decrement of TXERR and RXERR values of GSR? How to avoid the CAN Bus-off state? How to recover from Bus-off state?

0 Kudos
Reply
1 Reply

705 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @a_k_y 

1. “What are causes for increment/decrement of TXERR and RXERR values of GSR?”

->>

Increment: Occurs when the transmitting/receiving node detects a dominant bit while expecting a recessive bit during the arbitration field, control field, data field, or CRC field. This indicates a transmission/receiving error.

Decrement: Decreases by 1 every time the node successfully transmits/receives a message without errors.

 

2. "How to avoid the CAN Bus-off state? 

->>To avoid CAN bus-off, consider multiple aspects. I will provide a few examples for you.

a. Ensure that the CAN bus is properly terminated with 120Ω resistors at both ends to minimize reflections and signal integrity issues

b. Use high-quality cables and connectors to reduce noise and interference.

Keep the CAN bus length within the recommended limits to avoid signal degradation.

C. Configure the CAN node settings (bit rate, sample point, etc.) correctly to match the network specifications.

Ensure that all nodes on the bus are synchronized and operating at the same bit rate.

 

3. "How to recover from Bus-off state?"

->> From um: Automatically recover from the Bus-off state after 128 occurrences of bus-free.

Alice_Yang_0-1730964851164.png

 

BR

Alice

 

0 Kudos
Reply