cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 BLE_Ota erasing the flash when upload is started

serhat
Associate II

Hello everyone,

I'm using BLE_Ota application for STM32WB55 (https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_Ota)

I can able to run the code successfully. In the OTA code, it erases the flash by Delete_Sectors function in App_BLE_Init. So, it means that the flash is erased when switching the OTA mode.

However, I want to erase the flash only when the upload process is started and if the user doesn't start to upload new firmware in 2 mins, exit the OTA mode and switch back to the application.

Could you please help me how to do?

Best regards.

Serhat.

1 ACCEPTED SOLUTION

Accepted Solutions
Remy ISSALYS
ST Employee

Hello,

You can start a timer when you start BLE_Ota and move the call to delete_sectors function when the first packet is received, in this case stop the timer and upload the new firmware. If a timeout occurs jump on the app.

Best Regards

View solution in original post

2 REPLIES 2
Remy ISSALYS
ST Employee

Hello,

You can start a timer when you start BLE_Ota and move the call to delete_sectors function when the first packet is received, in this case stop the timer and upload the new firmware. If a timeout occurs jump on the app.

Best Regards

serhat
Associate II

Thank you for reply.