diff --git a/boards/xiao_nrf54l15_nrf54l15_cpuapp.conf b/boards/xiao_nrf54l15_nrf54l15_cpuapp.conf index f22b2e0..bda3775 100644 --- a/boards/xiao_nrf54l15_nrf54l15_cpuapp.conf +++ b/boards/xiao_nrf54l15_nrf54l15_cpuapp.conf @@ -42,3 +42,11 @@ CONFIG_OPENTHREAD_DEFAULT_TX_POWER=8 CONFIG_GPIO=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED=y + +# Give the spinel link a deeper receive queue. +# +# The default 2048 bytes is sized for a link with RTS/CTS, where the host stops +# sending once the buffer fills. This one has no flow control, so anything that +# does not fit is simply lost. 8192 covers a burst of full-size frames arriving +# while the OpenThread thread is busy. +CONFIG_OPENTHREAD_COPROCESSOR_UART_RING_BUFFER_SIZE=8192 diff --git a/boards/xiao_nrf54l15_nrf54l15_cpuapp.overlay b/boards/xiao_nrf54l15_nrf54l15_cpuapp.overlay index aaff0b2..67298ec 100644 --- a/boards/xiao_nrf54l15_nrf54l15_cpuapp.overlay +++ b/boards/xiao_nrf54l15_nrf54l15_cpuapp.overlay @@ -14,7 +14,26 @@ * * Unlike Nordic's nrf54l15dk overlay, hw-flow-control is NOT set: the XIAO's * pinctrl only defines TX and RX for uart20, and the CMSIS-DAP bridge does not - * carry RTS/CTS. See docs/ for the baud rate this was validated at. + * carry RTS/CTS. + * + * That missing back-pressure is why the spinel link runs at 460800 rather than + * the 1000000 Nordic uses. Bandwidth was never the constraint -- 802.15.4 tops + * out around 250 kbps -- but without RTS/CTS a single late RX interrupt loses a + * byte outright, and a lost byte corrupts the HDLC frame around it. At 1 Mbaud + * the driver has 10 us to service each byte; the radio ISR can hold it off + * longer than that during a burst. 460800 widens the window to 21.7 us while + * still leaving roughly 4x headroom over peak Thread throughput. + * + * The symptom this fixes: otbr-agent runs for hours, then a traffic burst + * desynchronises the stream, the next transmit gets no response, and + * HandleRcpTimeout aborts the agent with exit code 6. + * + * [W] P-RadioSpinel-: radio tx timeout + * [C] P-RadioSpinel-: Failed to communicate with RCP - no response from RCP + * + * The host must agree on the rate. In the RadioURL on the border router host: + * + * spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800 */ / { @@ -27,7 +46,7 @@ &uart20 { status = "okay"; - current-speed = <1000000>; + current-speed = <460800>; }; &uart21 {