NRF52840 Openthread Radio Coprocessor (RCP) through SPI

Hello,

We are using Raspberry Pi + NRF52840 as Borderrouter for Openthread using Radio Coprocessor design.

However we are facing stability issues on the RCP where it resets regularly, making our network unstable.

The RCP image on the NRF52840 is built with https://github.com/openthread/ot-nrf528xx which is still based on NRF5 sdk. This had the option for communication over SPI.

We are investigating to move to newer updated firmware based on the nrf connect sdk, as the coprocessor design is there as a sample within nrf connect sdk. https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/openthread/coprocessor/README.html

However this doesn't seem to support communication over SPI, only UART or USB. As we are bound with our hardware to the SPI interface of the raspberry pi, we cannot switch.

Is there a way we could make this work again over SPI using nrf connect sdk?

Parents
  • Hello,

    Okay so there is no SPI available. 

    We are trying to see if the switch to UART is worth the hardware upgrade of our PCBs.

    We made a test with new dev boards: 

    -- NRF52840 USB Dongle

    -- NRF52840DK development kit.

    With NCS v2.9.1

    we made a built on coprocessor example:

    nrf/samples/openthread/coprocessor

    west build -p always -b nrf52840dk_nrf52840

    west build -p always -b nrf52840dongle_nrf52840

    The dongle we run on a raspberry pi with:

    sudo ot-daemon -d 2 'spinel+hdlc+uart:///dev/ttyACM0' --verbose

    This works perfect. No more stability issues on RCP. No logs on 'TX timeout' or 'RCP failure detected' 

    ot-daemon-ncs[4166]: Running OPENTHREAD/thread-reference-20230706; POSIX; Apr 16 2025 14:03:06
    ot-daemon-ncs[4166]: Thread version: 4
    ot-daemon-ncs[4166]: Thread interface: wpan0
    ot-daemon-ncs[4166]: RCP version: OPENTHREAD/ncs-thread-reference-20241002; Zephyr; Apr 22 2025 16:34:00

    The development kit we run on raspberry pi with:

    sudo ot-daemon -d 2 'spinel+hdlc+uart:///dev/serial0' --verbose

    We activated serial uart on the raspberry pi

    This mostly is not starting communication with the RCP. Or it fails quite soon, after some commands on ot-ctl:

    ot-daemon-ncs[4166]: Running OPENTHREAD/thread-reference-20230706; POSIX; Apr 16 2025 14:03:06
    ot-daemon-ncs[4166]: Thread version: 4
    ot-daemon-ncs[4166]: Thread interface: wpan0
    ot-daemon-ncs[4166]: RCP version: OPENTHREAD/ncs-thread-reference-20241002; Zephyr; Apr 22 2025 16:34:00
    ot-daemon-ncs[4166]: 00:00:03.116 [W] Platform------: Daemon read: Connection reset by peer
    ot-daemon-ncs[4166]: 00:00:05.183 [W] Platform------: Daemon read: Connection reset by peer
    ot-daemon-ncs[4166]: 00:00:26.832 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:26.832 [W] Platform------: RCP failure detected
    ot-daemon-ncs[4166]: 00:00:26.832 [W] Platform------: Trying to recover (1/2)
    ot-daemon-ncs[4166]: 00:00:28.835 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:30.837 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:30.837 [W] Platform------: RCP failure detected
    ot-daemon-ncs[4166]: 00:00:30.837 [W] Platform------: Trying to recover (2/2)
    ot-daemon-ncs[4166]: 00:00:32.839 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:34.842 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:34.842 [W] Platform------: RCP failure detected
    ot-daemon-ncs[4166]: 00:00:34.842 [C] Platform------: Too many rcp failures, exiting
    ot-daemon-ncs[4166]: 00:00:34.842 [C] Platform------: RecoverFromRcpFailure() at radio_spinel_impl.hpp:2075: Failure

    What am i doing wrong. Is the UART connection between RCP and RPi correct?

    P0.06 to RPI GPIO15

    P0.08 to RPI GPIO14

    GND to GND

    There is some communication, sometimes it starts and connects to the network, but than fails with RCP failures. Sometimes it can read RCP version, but than fails. Mostly it doesn't start.

    For our hardware boards, we want to do the changes to support UART, but we need to have it as stable as the USB version. But we encounter these issues for now.

Reply
  • Hello,

    Okay so there is no SPI available. 

    We are trying to see if the switch to UART is worth the hardware upgrade of our PCBs.

    We made a test with new dev boards: 

    -- NRF52840 USB Dongle

    -- NRF52840DK development kit.

    With NCS v2.9.1

    we made a built on coprocessor example:

    nrf/samples/openthread/coprocessor

    west build -p always -b nrf52840dk_nrf52840

    west build -p always -b nrf52840dongle_nrf52840

    The dongle we run on a raspberry pi with:

    sudo ot-daemon -d 2 'spinel+hdlc+uart:///dev/ttyACM0' --verbose

    This works perfect. No more stability issues on RCP. No logs on 'TX timeout' or 'RCP failure detected' 

    ot-daemon-ncs[4166]: Running OPENTHREAD/thread-reference-20230706; POSIX; Apr 16 2025 14:03:06
    ot-daemon-ncs[4166]: Thread version: 4
    ot-daemon-ncs[4166]: Thread interface: wpan0
    ot-daemon-ncs[4166]: RCP version: OPENTHREAD/ncs-thread-reference-20241002; Zephyr; Apr 22 2025 16:34:00

    The development kit we run on raspberry pi with:

    sudo ot-daemon -d 2 'spinel+hdlc+uart:///dev/serial0' --verbose

    We activated serial uart on the raspberry pi

    This mostly is not starting communication with the RCP. Or it fails quite soon, after some commands on ot-ctl:

    ot-daemon-ncs[4166]: Running OPENTHREAD/thread-reference-20230706; POSIX; Apr 16 2025 14:03:06
    ot-daemon-ncs[4166]: Thread version: 4
    ot-daemon-ncs[4166]: Thread interface: wpan0
    ot-daemon-ncs[4166]: RCP version: OPENTHREAD/ncs-thread-reference-20241002; Zephyr; Apr 22 2025 16:34:00
    ot-daemon-ncs[4166]: 00:00:03.116 [W] Platform------: Daemon read: Connection reset by peer
    ot-daemon-ncs[4166]: 00:00:05.183 [W] Platform------: Daemon read: Connection reset by peer
    ot-daemon-ncs[4166]: 00:00:26.832 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:26.832 [W] Platform------: RCP failure detected
    ot-daemon-ncs[4166]: 00:00:26.832 [W] Platform------: Trying to recover (1/2)
    ot-daemon-ncs[4166]: 00:00:28.835 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:30.837 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:30.837 [W] Platform------: RCP failure detected
    ot-daemon-ncs[4166]: 00:00:30.837 [W] Platform------: Trying to recover (2/2)
    ot-daemon-ncs[4166]: 00:00:32.839 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:34.842 [W] Platform------: Wait for response timeout
    ot-daemon-ncs[4166]: 00:00:34.842 [W] Platform------: RCP failure detected
    ot-daemon-ncs[4166]: 00:00:34.842 [C] Platform------: Too many rcp failures, exiting
    ot-daemon-ncs[4166]: 00:00:34.842 [C] Platform------: RecoverFromRcpFailure() at radio_spinel_impl.hpp:2075: Failure

    What am i doing wrong. Is the UART connection between RCP and RPi correct?

    P0.06 to RPI GPIO15

    P0.08 to RPI GPIO14

    GND to GND

    There is some communication, sometimes it starts and connects to the network, but than fails with RCP failures. Sometimes it can read RCP version, but than fails. Mostly it doesn't start.

    For our hardware boards, we want to do the changes to support UART, but we need to have it as stable as the USB version. But we encounter these issues for now.

Children
No Data
Related