This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

802.15.4 Multiprotocol

I am attempting the use of Nordic's 802.15.4 stack with Softdevice in a multiprotocol way, but not using Thread or Zigbee. The application initializes sdh, then ble, then nrf_802154. The application receives packets (sent by another nRF52840 DK) correctly for about two minutes, but then does not receive any more packets, although the app continues to run (we see the NRF_LOG_INFO messages continue being printed). I could not think of a way to debug this, so I tried simply refreshing the 802154 stack, stopping and restarting Softdevice/BLE. I have some observations from my experience.

Background: using SDK15.3, using the github repo of 802154 at commit 79385a34 (Thursday Feb 28 2019).

1. The call to nrf_802154_deinit() resulted in a SOFTDEVICE: INVALID MEMORY ADDRESS error. Looking into the code, I found the following problems.

2. It helps to make empty the body of the function nrf_802154_hp_timer_deinit(), at least for my case of using RAAL_SOFTDEVICE

3. The function nrf_raal_uninit() has a bug - it should assign m_initialized = false, otherwise a subsequent nrf_raal_init() will fail an assert check.

4. One source of the softdevice error was the call to nrf_drv_clock_uninit found in nrf_802154_clock_sdk -- I could not see a simple fix for that. So, I removed both nrf_drv_clock_init() and nrf_drv_clock_uninit() from nrf_802154_clock_sdk, which then requires initializing nrf_drv_clock in the app before calling nrf_802154_init. 

With changes (2)-(4), it appears that the workaround succeeds, the app continues to receive packets indefinitely. I have several other difficulties which will be subjects of future postings to devzone.

Related