cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrading STM32L1 firmware takes a long time

Iman Hosseinzadeh
Associate III

I have an STM32L152R8T6-A MCU. A new firmware is downloaded over HTTP (as a .bin file) and is stored in an external flash memory. After that a bootloader copies the new firmware into MCU flash (address 0x8000000) and resets the micro.

Everything is OK except the process of firmware copy. Actually it takes a long time. For an average-sized bin file (10 KB) it may take 2 minutes to copy the firmware.

I have searched about this problem. Moving the copy function to SRAM is proposed as a solution. I performed this but nothing changed.

Is there any solution to overcome this problem?

1 REPLY 1

Yes, something very amiss in your process. You're going to need to profile your code to understand where all the time is wasted.

Benchmark your external flash memory read times, read blocks of several hundred or a thousand bytes, find efficiencies.

Flashing itself from external flash should be as quick as the ST-LINK downloading via an IDE

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..