2025-08-25 2:59 AM
Hello,
I am looking for a solution to a problem. To put it briefly, I want to update the program of a microcontroller via a USB key. It is an STM32L4+ series microcontroller.
I saw on an STM32F429I-DISC test board that there was documentation for updating via USB flash drive. (https://www.st.com/resource/en/application_note/an3990-upgrading-stm32f4discovery-board-firmware-using-a-usb-key-stmicroelectronics.pdf)
Since this is not the same microcontroller as the one I am targeting, I was wondering if this is possible with the STM32L4+.
Thank you in advance for your response.
2025-08-25 4:06 AM
Hello I think it's possible.
You need just to adapt it to that microcontroller (RCC Clocks, IOs, memory etc..) that you need to do it yourself.
2025-08-25 4:23 AM
Thanks for your response.
The only thing I found about this subject is this post where a user, waclawek.jan, say it's not possible.
If it's possible, is there any guide or example showing it ?
2025-08-25 4:51 AM
The thread you linked to refers to the STM32L433, an STM32L4 without USB host. However, the STM32L4+ all have USB OTG, so in principle they could be equipped with such a firmware upgrade functionality.
The software for AN3990 can be found in the package STSW-STM32068, but because it is so old (it came out only a few years after the first STM32 came to the market), it is still based on STM32 SPL (Standard Peripheral Library).
There is no SPL available for newer families such as STM32L4+, instead the the LL (Low Layer Library) is recommended. The migration tool SPL2LL-Converter is also available for converting from SPL to LL, which can be used as a starting point.
Hope this helps?
Regards
/Peter