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
Three measurements
| Measure | With | Expect |
|---|---|---|
| CANH to CANL | power off | about 60 Ω on a bus, 120 Ω on one board |
| 3V3 to GND on each board | power on | 3.0 to 3.6 V |
| CANH and CANL to GND | power on, bus idle | both 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
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.
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.
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 board has no supply: the LED sits on 3V3 through 5.1 kΩ. Check the 3V3 and GND pins reach the microcontroller.
The block's reference page: its pins, specifications and downloads.
TK109 CAN bus →Edit this page — content/books/can-bus/when-nothing-arrives.mdx
Questions about this product
See what other owners have asked, and read their solutions.
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.