I flash the board and send a CAN message.
The send function returns OK, but the analyzer shows the same frame again.
The code reports success while the bus keeps trying.
That is when I separate a successful function call from successful communication.
OK may mean the controller accepted a transmit request. It does not, by itself, confirm that another node received the frame.
Near the end of a CAN frame is the ACK slot. The transmitter sends recessive there; another node that received the frame correctly drives the bus dominant.
If my bench has only one active node, nobody can answer. The transmitter sees an ACK error and, when automatic retransmission is enabled, sends the frame again.
Before digging deeper into the code, I check the ACK slot on the trace and the transmit error counter. I also verify the wiring, bit rate, and termination.
If a correctly configured second active node makes the ACK slot dominant and the retries stop, I know which part of the exchange had been missing.
Even then, ACK does not prove that my intended application processed the message.
Transmit request, bus acknowledgment, and application handling are three different steps.
Loading comments.