Flatline

CAN Node Silent After Bus Noise Debug

Symptom

Each command prints and gets a status frame back until a burst of noise hits the bus. Then the node is silent for good. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: U1, an STM32F4, drives CAN TX on PA12 and reads CAN RX on PA11 through U2, a CAN transceiver, onto the CANH and CANL bus with a 120 ohm terminator R1 and R2 at each end, shared with the other nodes, a noise burst source and TP1, a CAN analyzer; PA9 carries USART1 TX to J1, a serial console

Pass condition

Each command, including any sent 5 ms or more after the noise ends, prints one line and gets one status frame, as figure 2 shows. Nothing else prints.

Expected output for the public case: on the bus, command 0x100 with CA FE at 10 ms and the node's status frame 0x181 with 01 00; command 0x101 with 05 at 30 ms; a noise burst from 31 to 36 ms; then status 0x181 with 01 01; command 0x200 with DE AD BE EF at 41 ms and status 0x181 with 02 00; command 0x201 with 01 at 52 ms and status 0x181 with 02 01. The serial console prints the four commands, one line each, and nothing else

Notes

Other nodes send commands throughout the run. In normal running the bus can go quiet for long stretches. Bus at 500 kbit/s: CAN1_BTR = 0x00050003

Related challenges

Loading the interactive arena.