2022-12-27 08:07 AM
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.
Solved! Go to Solution.
2023-01-06 02:16 AM
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
2023-01-06 02:16 AM
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
2023-01-09 02:39 AM
Thank you for reply.