2025-01-01 01:58 PM
Hi Everyone,
I'm using the P-NUCLEO-WB55 board and seeing an an issue when attempting an OTA firmware using the STBLESensorClassic mobile app running on iOS device. Execution is blocked waiting for the "FLASH_FLAG_CFGBSY" to clear in FLASH_WaitForLastOperation() in stm32wbxx_hal_flash.c. Please see screenshot below of call stack and location.
Setup
CubeIDE v1.14.1
STM32Cube_FW_WB_V1.21.0
ST BLE Sensor Classic 4.20.1
Background
If I use the out of the box OTA example "BLE_Ota" on the P-NUCLEO-WB55 board the OTA update works fine. However, this example uses the sequencer which is not representative of our end application. We are using FreeRTOS in our end application. In an effort to create an application that is somewhat representative of our end application I've combined/merged the "BLE_Ota" & "BLE_HeartRateFreeRTOS" examples into a single project. With this merged project running on the P-NUCLEO-WB55 board the issue is reproducible. I've attached the project to this thread. The BLE_HeartRateFreeRTOS uses timer 17 for the FreeRTOS time source unlike the BLE_Ota/sequencer example which uses systick.
There are some old posts about similar issues like this one https://forums.freertos.org/t/stm32wb55-flash-sr-cfgbsy-never-clears-when-using-freertos-and-tim1/12300/15 that refer to interrupts firing before the timer instance is initialized. Their solution was to add a NULL guard around the HAL_TIM_IRQHandler(). I've tried this but the issue persists.
I appreciate any input you can provide.
Thanks,
2025-01-01 02:49 PM - edited 2025-01-01 02:51 PM
Hello @chris24 and welcome to the ST Community.
I suggest you to ensure that your project migration was fine. You can use the attached guide for help.
Also, please use the last STM32CubeIDE V1.17.0 and try using other mobile app such as the last version of the ST BLE Toolbox or the https://github.com/stm32-hotspot/STM32WB-Web-Bluetooth-App-Interfaces
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-01-01 03:05 PM
Hi @STTwo-32 ,
Thank you for the quick reply.
Yes I am familiar with the document you shared and confirmed the project migration follows the instructions in that document. However, the issue still persists. Also, the issue exists with latest version of BLE Toolbox.
Thanks,
Chris
2025-01-03 11:18 AM
Hi @STTwo-32 ,
I marked this post as a solution as resolved by accident. Can you please reopen it as its not resolved?
Is there any update on this? This issue is reproducible using the P-NUCLEO-WB55 board with the BLE_Ota example running FREERTOS instead of the sequencer as per instructions in Seq_to_FreeRTOS_over_cmsis_os2.docx.
Thanks,
Chris