I have an app that requires BLE stack to be re-initialized, however it seems that if you run
ble_dfu_init();
more than once, it crashes
Upon further inspection is seems the source the of crash is here:
nrf_dfu_settings_init();
Drilling down, I discovered it seems to be hanging on:
wait_for_queue();
I'm using nRF5_SDK_12.2.0
I can prevent it hanging by increasing this constant:
FS_QUEUE_SIZE
However, it no longer advertises correctly because of:
// Delay starting advertising until the flash operations are complete.
if (flash_access_in_progress())
{
m_advertising_start_pending = true;
return NRF_SUCCESS;
}