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

NRF_EVT_FLASH_OPERATION_SUCCESS fired only if Radio notifications enabled.

Hello, Before writing here I made some forum search and didn't find the answer. Previously I used radio notifications to sync ADC measurements with radio events. Now I need to disable radio notifications in the project and noticed that firmware become working unstable. The BLE connection breaks ocasionally and the flash write operations stuck. Softdevice used S110. I do not use pstorage but use own functions. Flash operation states are read from SD_EVT_IRQHandler (SWI2) ( NRF_EVT_FLASH_OPERATION_SUCCESS and NRF_EVT_FLASH_OPERATION_ERROR ). Noticed that no interrupt fired after flash operation (sd_flash_write()) . What could cause such behaviour? Why enabling Radio notifications make flashoperation working?

P.S. I read the errata for softdevice but do not see the link with my issue.

  • Which version of IC and which version of S110 are you using? Are you first enabling radio notifications and disabling them after sometime?Is it possible to share your project to replicate this behavior?

  • I ran into a similar problem a little while ago. It turned out that I was calling SOFTDEVICE_HANDLER_INIT(...) as part of the bluetooth stack initialization, even though it's required for all softdevice functionality, so when I tried to strip out bluetooth, I never got the interrupts forwarded to my application. If I recall correctly, this was inherited from a sample project.

    Any chance that's the case for you as well?

  • Hi, nrf51822 rev3, s110 v.8. I disabled radio functionality in the project. So initialization routine doesnt compile. The project is big and commercial so I did not allowed to share it. However I could share some parts of ble initialization if needed. I use sd_ble... functions for it, no SDK ones. Till now made some research, enabled radio notifications but disabled any code in handler. Everithing works, at 3620us but fails at 800us.

  • Aryan, the code is very complicated and it would be hard to reproduce because the part of logics is on cloud server . I'll try to convert it later to make it simpler and submit it. Now I found that it seem to be the even number of bugs. The SD speck states "It is therefore recommended to configure the Radio Notification signals directly after the SoftDevice has been enabled." In my case radio notifications were inited after sd_ble_enable, now I placed in such order:

    sd_softdevice_enable()
    sd_nvic_EnableIRQ(SD_EVT_IRQn)
    ble_radio_notification_init(NRF_APP_PRIORITY_LOW,NRF_RADIO_NOTIFICATION_DISTANCE_1740US,radio_notification_evt_handler);
    sd_ble_enable()
    

    ... and it does not work! the same as just disable radio notifications initialization. It seems thar radio notification init in incorrect place treated some other bug 0_o. Any suggestions?

  • I am not sure of it, if i can get hold of code to debug, maybe it will be easier.

Related