CAN Protocol Reference
Appendix status: Initial reference
This table mirrors the protocol decisions currently recorded in the repository. The source code remains authoritative until automated protocol-table generation is introduced.
Identifier categories
Priority |
Category |
Range |
Direction |
Nominal timing |
|---|---|---|---|---|
0 |
Error |
|
STM32 to RPi |
Event driven |
1 |
Velocity command |
|
RPi to STM32 |
50-100 ms |
2 |
Encoder/range feedback |
|
STM32 to RPi |
20 ms control cycle |
3 |
Heartbeat |
|
RPi to STM32 |
100 ms |
4 |
PID tuning |
|
RPi to STM32 |
Event driven |
5 |
ACK/response |
|
STM32 to RPi |
Event driven |
All multibyte numeric payloads are little-endian. The heartbeat timeout is 200 ms and must gate the entire motor-control update.
Motor index contract
Motor commands use 0=FL, 1=FR, 2=RL, 3=RR. Encoder wiring is a separate
physical mapping: the current rear encoder channels are swapped, so estimation
maps encoder index 2 to rear-right and index 3 to rear-left. See
Failure: the rear encoder channels were swapped before changing either mapping.