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

stuck in wait_for_flash_ready() when BLE device is connected

How to use nrf_fstorage_erase together with the ble stack when it is necessary to write the updated value of the service characteristic to flash memory?
I encountered exactly the same problem that is described here:
https://devzone.nordicsemi.com/f/nordic-q-a/45460/wait_for_flash_ready-fstorage
https://devzone.nordicsemi.com/f/nordic-q-a/45849/stuck-in-wait_for_flash_ready
I tried to call nrf_fstorage_erase both from the event handler of my service and from the main loop, but the result is the same: nrf_storage_sd.c, is_busy function has always the same m_flags:
m_flags.initialized = 1;
m_flags.queue_running = 1;
m_flags.state = NRF_FSTORAGE_STATE_OP_EXECUTING
m_flags.sd_enabled = 1
m_flags.paused = 0

nRF52840
nRF5_SDK_16.0.0_98a08e2
s140_nrf52_7.0.1_softdevice.hex

Related