nuttx/arch
Jacob Dahl e6696d5d27 arch/arm/src/imxrt: Keep FlexCAN TX mailbox allocation in order.
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>
2026-08-25 11:34:34 +08:00
..
arm arch/arm/src/imxrt: Keep FlexCAN TX mailbox allocation in order. 2026-08-25 11:34:34 +08:00
arm64 nuttx/atomic: replace atomic_fetch_xxx with atomic_xxx just like zephyr 2026-08-24 13:20:45 +08:00
avr nuttx/atomic: select LIBC_ATOMIC_IRQ for archs without atomic support 2026-08-24 13:20:45 +08:00
ceva !sched/arch/libc: Give fork() and vfork() their real, separate semantics. 2026-08-10 08:57:30 -03:00
dummy
hc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
mips mips/Makefile: Add nuttx build with CONFIG_ALLSYMS enabled. 2026-08-11 09:53:38 -03:00
misoc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
or1k tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
renesas nuttx/libc: refine the atomic related Kconfig 2026-08-24 13:20:45 +08:00
risc-v nuttx/atomic: select LIBC_ATOMIC_IRQ for archs without atomic support 2026-08-24 13:20:45 +08:00
sim nuttx/atomic: replace atomic_fetch_xxx with atomic_xxx just like zephyr 2026-08-24 13:20:45 +08:00
sparc nuttx/atomic: select LIBC_ATOMIC_IRQ for archs without atomic support 2026-08-24 13:20:45 +08:00
tricore arch/tricore: drop iLLD dependency in hwdebug 2026-08-20 01:25:52 +08:00
x86 arch/x86: Provide vfork(). 2026-08-15 09:00:20 -03:00
x86_64 x86_64/intel64: make framebuffer setup recoverable 2026-08-21 20:09:15 +08:00
xtensa esp32s3/lcd: Fix rolling issue on high resolution LCDs 2026-08-24 09:39:58 +02:00
z16 tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
z80 style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
CMakeLists.txt cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
Kconfig arch/tricore: use tricore arch-atomic-instruction version 2026-08-25 10:07:25 +08:00