nrf_fstorage_is_busy() return always true

Hi all together,

nrf52810
SD112
SDK 15.3.0

I have a problem writing to flash with the nrf_fstorage module. I try to write
an array of 32 Bytes into flash, triggered by a BLE write by nrfConnect.
After calling nrf_fstorage_write(), the wait_for_flash_ready() function does
never return, which means nrf_fstorage_is_busy() return always true.
I know the forum posts
devzone.nordicsemi.com/.../wait_for_flash_ready-fstorage
devzone.nordicsemi.com/.../stuck-in-wait_for_flash_ready
and tried the solutions discussed there. I expanded my BLE connection interval
to 798,75 ms (as noted in log of nrfConnect), and I have the
#define NRF_SDH_DISPATCH_MODEL 0
in sdk_config.h.
The functions nrf_fstorage_write() and wait_for_flash_ready() functions are called
from main()-loop, the BLE write command only sets a volatile flag, which is checked
in main().
If I read the flash with nrfjprog --memrd, I see that the array itself is written.
But if I try it a second time, the array is not written any more, which would
meet the observation, that nrf_fstorage_is_busy() stays true.

Thanks in advance

  • Hello,

    It sounds like the Softdevice SoC (flash) events are not being forwarded to the fstorage observer for some reason (nrf_fstorage_sd.c::nrf_fstorage_sys_evt_handler).

    Please check if your project includes the nrf_sdh_soc.c file. This file is a part of the SoftDevice Handler library and responsible for propagating Softdevice flash events to all SoC observers.

    Best regards,

    Vidar

Related