Hi all together,
I have a problem writing to flash with the nrf_fstorage module. I try to writean array of 32 Bytes into flash, triggered by a BLE write by nrfConnect.After calling nrf_fstorage_write(), the wait_for_flash_ready() function doesnever return, which means nrf_fstorage_is_busy() return always true.I know the forum postsdevzone.nordicsemi.com/.../wait_for_flash_ready-fstoragedevzone.nordicsemi.com/.../stuck-in-wait_for_flash_readyand tried the solutions discussed there. I expanded my BLE connection intervalto 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 calledfrom main()-loop, the BLE write command only sets a volatile flag, which is checkedin 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 wouldmeet the observation, that nrf_fstorage_is_busy() stays true.
Thanks in advance
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.