STMWB55: Flash write access during BLE connection
Hello,
We are trying to write(erase) the flash during BLE connection.
If we follow the STM32Cube_FW_WB_V1.4.0/Projects/P-NUCLEO-WB55.Nucleo/Examples/FLASH/FLASH_EraseProgram
Example the BLE connection terminates immediately (timeout error code).
Apparently you have to let the CPU2 know that you are about to access the flash. The only example I found for this is:
STM32Cube_FW_WB_V1.4.0/Middlewares/ST/STM32_WPAN/ble/mesh/PAL/STM32WB/pal_nvm.c
It works when BLE is not connected.
When there is an active connection the code is stuck in dead-loop on first:
while(LL_FLASH_IsActiveFlag_OperationSuspended());
(pal_nvm.c line 226).
Once BLE device is disconnected, it passes this while.
Now... I am trying to erase a single sector, and this happens even before address is given or anything; no prior errors.
The Erase is called from main loop handler.
CPU2 firmware used is 1.4.0 (latest).
Any ideas?
Thanks in advance.
