mirror of
https://github.com/apache/nuttx.git
synced 2026-08-27 12:20:46 +00:00
imxrt_transmit() handed out the lowest free TX mailbox. FlexCAN breaks an arbitration tie between mailboxes holding equal CAN IDs by taking the lowest mailbox number, so refilling a just-drained low mailbox while older frames are still pending in higher ones puts the newer frame on the wire first. imxrt_txdone_work() re-polls after each individual TX completion, which is exactly the condition that triggers it. Every frame of a multi-frame transport transfer carries the same CAN ID, so this reorders transfers. On a DroneCAN bus the receiver sees a broken toggle bit and discards the transfer: measured on the wire, a 6-frame message from an i.MX RT1176 failed 82% of the time, while a node on the same bus running a different controller was flawless over the same capture. Hand out a mailbox above every pending one instead, and wrap back to the bottom only once the ring has drained. Ordering then holds for any transfer length; the cost is that the ring stalls at a wrap rather than refilling immediately. Assisted-by: Claude:claude-opus-5 Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com> |
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| avr | ||
| ceva | ||
| dummy | ||
| hc | ||
| mips | ||
| misoc | ||
| or1k | ||
| renesas | ||
| risc-v | ||
| sim | ||
| sparc | ||
| tricore | ||
| x86 | ||
| x86_64 | ||
| xtensa | ||
| z16 | ||
| z80 | ||
| CMakeLists.txt | ||
| Kconfig | ||