SPI and openthread on nRF52840


I am  new to openthread development. My goal is to distribute measured values received from the SPI Bus over a thread network. I am using a nRF52840-DK Board, SDK for Thread and Zigbee 2.0 together with Segger Embedded Studio on Windows 10.

For my project I need to include the SPI driver as well as the UART driver since I get the meassured values via SPI and UART. Trying to integrate the .\peripheral\spi example in the .\thread\cli example I get compiler errors with multiple defines.

I already tried to use the latest openthread libs as described here: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Findex.html

but things got worse as the examples wouldn't comile any more. Please verify if all paths mentioned in the documentation are correct. For example $(SDK)\external\openthread\include has no platform folder. 

Could you explain or point me to a documentation how I can set up the spi driver together with openthread?

Thank you in advance

Best regards


  • Hello Marco,

    Since openthread is an external library, and in continuous change, it is difficult to keep the documentation up to date at all times. The SDK and it's examples works with the openthread version that is used when it was developed, but if you compile a later version, you may have to configure the examples as well. This is mentioned in the SDK documentation

    OpenThread is still in prerelease phase and its API changes frequently. Keep in mind that when the API changes, the examples might not compile with the latest OpenThread version right away without fixes.

    What do you need for your project? You want to add an SPI, right? Have you tried to add the SPI as it is done in the "normal" SDK examples? I don't think you need to update the openthread library. As long as you don't use SPIS0 it should work. 

    Best regards,


Reply Children