CAN bus/Using it/09. When nothing arrives
Using it · 09 of 9

When nothing arrives

Most CAN faults are one of five, and the sender's own error counter points at them: climbing means nobody acknowledged, zero with nothing received means the sketch or the pins, errors from the first frame mean the bit rate or crossed wires. Start from the symptom, and keep a meter handy.

Symptom first

Where to look first
the other board
Symptom
Look at
the other board
The sender's error count climbs. Power the second board, start its controller, and wire CTX to TX and CRX to RX, straight across.

Three measurements

MeasureWithExpect
CANH to CANLpower offabout 60 Ω on a bus, 120 Ω on one board
3V3 to GND on each boardpower on3.0 to 3.6 V
CANH and CANL to GNDpower on, bus idleboth about 2.3 V

The first finds missing and extra terminators. The last finds a board that is stuck driving the bus.

Change one thing at a time

Go back to two boards on short wires, both 120 Ω fitted, 500 kbit/s and the first-message sketch, and get tx errors 0 first. Then add length, then boards, then your own messages. A fault that appears at one step belongs to that step.

When it does not work

Everything is wired and the error count still climbs.

Take the second board out of the question: run the receiver sketch on it and watch its Serial Monitor print receiver. If it does not, its CAN controller never started. If it does, measure CANH to CANL with the power off: about 60 Ω means both terminators and both wires are in place.

The sender went quiet after a while.

Its controller may have gone bus-off: 256 transmit errors, from real errors on the bus rather than missing acknowledgements, switch it off the bus. Fix the fault, then call twai_initiate_recovery() or restart the board.

What should CANH and CANL read on an idle bus?

Both about 2.3 V against GND, within a few tenths of each other, because nothing drives them and the terminators hold them together. A difference of a volt or more on an idle bus means a board is stuck driving dominant.

The power LED is off.

The board has no supply: the LED sits on 3V3 through 5.1 kΩ. Check the 3V3 and GND pins reach the microcontroller.

Alongside this page
Where this goes next

The block's reference page: its pins, specifications and downloads.

TK109 CAN bus

Edit this page — content/books/can-bus/when-nothing-arrives.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

CAN Bus

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum