cancel
Showing results for 
Search instead for 
Did you mean: 

Application hangs when doing a remote update

Eugene G
Associate II

The details of this project are like this.

I have a working product on the F417 that I wish to add Remote update capabilities to.

Product is already deployed with SBSFU and updates using Ymodem through the UART work fine.

What I am trying to add on now is the Remote firmware update, which is based on the STM32CubeExpansion_Cloud_AZURE_V1.2.1, to be able to download the F/W from a webserver for an update.

What is puzzling me now is this:

When I test out the downloading in my debug build (without SBSFU) the .sfb file can be downloaded and saved to flash. I can peek into the flash with the debugger and see that the file has been saved.

However, when I build a release version (which is together with the SBSFU) and trigger the update process, when attempting to write to the flash, the program gets stuck and hangs at the HAL_FLASH_Program call and will eventually result in a watchdog reset.

I am baffled as to why I can write in debug mode but not in release mode. Why is there a difference in how the board runs in debug and release?

2 REPLIES 2
Jocelyn RICARD
ST Employee

Hello Eugene,

I suspect an issue with your MPU configuration.

Please check if you don' get a hard fault.

Also, deactivate MPU in SBSFU to see if issue is still occurring

Best regards

Jocelyn

Eugene G
Associate II

Hi @Jocelyn RICARD​ 

For the F417 series, MPU configuration only covers Write protection? Is this correct?

I've checked carefully, both the download area and swap areas are not write protected.

I tried running my debug build with the same areas write protected as the release version but did not have any issue with the download.

Besides, when calling the Flash erase before the downloading, it is okay. Only gets stuck at Flash Write.

It seems like my application runs slightly differently when running with the SBSFU as compared to without. I notice some other quirks as well but these are minor and happen only occasionally.

Are there any other things I could look at?