Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Interrupt priority issues with fstorage and FreeRTOS

Hi,

I'm using an nRF52832 with SDK 14.2 and FreeRTOS. I'm hitting a configASSERT when I call nrf_fstorage_erase. I called the function after calling ble_stack_init but before calling nrf_sdh_freertos_init. 

I hit the asssert at SWI2_EGU2_IRQHandler (SD_EVT_IRQHandler, nrf_sdh_freertos.c, line 65) which called vTaskNotifyGiveFromISR (tasks.c, line 4309). From what I understood in the comment block in this function, the assert seems to be due to an issue with the interrupt priority. But I couldn't find an configs for the interrupt priority of fstorage.

Next, I tried calling the fstorage function from another task. This time, I didn't hit the assert, but there didn't seem to be any changes in the flash registers when I did a memory dump.

Can someone please help me get the root cause for this issue?

Also, I had read a post mentioning that FDS is not thread safe and this link also says that the backends are not thread safe. Is fstorage also not thread safe? 

Thanks,

Gowtham

Parents Reply Children
Related