SJA1000 receive data incorrect

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

SJA1000 receive data incorrect

290 Views
FrankZou
Contributor I

The issue encountered in CAN bus communication involves the use of the SJA1000 chip. While data transmission is completely normal, the received data is incorrect. For example, when sending two bytes, 0x00 and 0xFF, the SJA1000 receives 0x00 and 0x00. However, when sending data such as 0x00, 0x11, 0x22, or 0xFF, 0xFF, the SJA1000 receives the data correctly. Why is this happening?

Tags (1)
0 Kudos
Reply
3 Replies

253 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Frank,

Possible Causes and Suggestions:

  1. Bit Stuffing or Frame Interpretation Issue:

    • CAN uses bit stuffing, where after five consecutive bits of the same value, a complementary bit is inserted. If the stuffing or de-stuffing logic is misconfigured or malfunctioning, it could misinterpret certain patterns like 0xFF (which is all ones).
    • Check if the transceiver or SJA1000 is correctly handling bit stuffing and de-stuffing.
  2. Timing or Synchronization Problems:

    • If the baud rate or timing parameters (like propagation delay, phase segments) are mismatched between nodes, it can cause incorrect sampling of bits.
    • Verify that all nodes on the CAN bus are configured with identical baud rates and timing settings.
  3. Transceiver Issues:

    • The SJA1000 relies on an external CAN transceiver (e.g., TJA1040). If the transceiver is faulty or not properly matched to the bus, it might distort certain bit patterns.
    • Try swapping the transceiver or testing with a known good one.
  4. Electrical Noise or Signal Integrity:

    • Certain bit patterns may be more susceptible to noise, especially if the bus is improperly terminated or has reflections.
    • Ensure proper termination resistors (typically 120Ω at each end of the bus) and check for signal integrity using an oscilloscope.
  5. Incorrect Configuration of SJA1000 Registers:

    • Double-check the Acceptance Filter, Frame Format, and Operating Mode (BasicCAN vs PeliCAN).
    • Misconfiguration might cause the controller to misinterpret or discard certain frames.

With Best Regards,

Jozef

0 Kudos
Reply

231 Views
FrankZou
Contributor I

0xFF received erroneous waveform0xFF received erroneous waveform

0xFF receives the correct waveform0xFF receives the correct waveform

 

The yellow color represents one of the data lines.

Green represents the RD line.

Purple represents the CS line.

As can be seen in the picture, the yellow signal has an ascending pulse but does not remain.

During the test, it was found that when using an oscilloscope probe to measure the ALE signal, the received data was correct. However, when the probe was not used to test the ALE signal, the received data was incorrect. The ALE signal is normal. The controller we use communicates with the SJA1000 via a TI level conversion chip, which converts 3.3V to 5V.

Tags (1)
0 Kudos
Reply

225 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Frank,

This behavior suggests a signal integrity issue, possibly due to:

  1. Weak Pull-up/Pull-down or Floating Lines:

    • The oscilloscope probe might be adding capacitance or acting as a weak pull-up/down, stabilizing the ALE signal.
  2. Impedance Mismatch or Reflections:

    • The level shifter or PCB layout might be causing reflections or improper voltage levels.
  3. Timing Issues:

    • The ALE signal might be marginally timed, and probing it affects the timing enough to make it work.

 

 

  1. Add a Pull-up or Pull-down Resistor to the ALE line:

    • Try values like 4.7kΩ or 10kΩ and observe if stability improves.
    •  
  2. Review Level Shifter Specs:

    • Ensure the TI chip supports the required drive strength and timing for SJA1000.
    •  
  3. Try Adding a Small Capacitor (e.g., 10–100 pF):

    • This can help filter noise or stabilize the signal if probing helps.

With Best Regards,

Jozef

0 Kudos
Reply