cancel
Showing results for 
Search instead for 
Did you mean: 

mcu boot on stm32L4

lucasrj
Visitor

hey,

I am trying to figure out how to implement mcu-boot on an stm32l4

I wanna have mcu-boot to be able to flash it over uart, but I cant find any documentation on how to implement mcu-boot on an stm32L4

Are there any existing documentation or examples on this?

4 REPLIES 4
Javier1
Principal

You talking about systembootloader? https://www.st.com/resource/en/application_note/an3155-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

 

>>how to implement mcu-boot on an stm32L4
any reason you dont want to use the one already implemented in every stm32 mcu?

>>Are there any existing documentation or examples on this?

you have plenty of documentation if you google systembootloader stm32

Or if you want to build your own bootloader check OpenBL

Available for consulting/freelancing , hit me up in https://github.com/javiBajoCero
lucasrj
Visitor

I want to specify which UART is used for flashing, the default one is listing to everything, if something is trying to flash it or can look like it, and where is GPS that always sends data and some other devices.

I have not checked openBL, I was suggested mcu-boot originally I can try looking into openBL, but I would still like to use mcu-boot if possible 

MOBEJ
ST Employee

Hello @lucasrj ,

Here's a helpful entry point to get you started:

Please refer to the application note AN2606. This document describes the supported peripherals and hardware requirements to consider when using the bootloader. Specifically, you should look into the sections related to STM32Lxx devices (sections 66 to 72), which will assist you in configuring your setup.

For more detailed information and related documents about the bootloader, please check the following application notes:

  • AN3154: CAN protocol used in the STM32 bootloader
  • AN3155: USART protocol used in the STM32 bootloader
  • AN3156: USB DFU protocol used in the STM32 bootloader
  • AN4221: I2C protocol used in the STM32 bootloader
  • AN4286: SPI protocol used in the STM32 bootloader
  • AN5405: FDCAN protocol used in the STM32 bootloader
  • AN5927: I3C protocol used in the STM32 bootloader



Regards ,
MBej

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

So you want to make a custom bootloader - rather than use the System bootloader built into the chips?

In that case, take a look at Application Note AN4657STM32 in-application programming (IAP) using the USART:

https://www.st.com/resource/en/application_note/an4657-stm32-inapplication-programming-iap-using-the-usart-stmicroelectronics.pdf

and X-CUBE-IAP-USARTSTM32Cube in-application programming using the USART embedded software:

https://www.st.com/en/embedded-software/x-cube-iap-usart.html

 

Your key search term here is "In-Application Programming" aka "IAP"

Try also, eg, https://www.google.com/search?q=mcuboot+stm32L4 

Did you see Custom bootloader on the STM32L4 ?

 

Also: https://github.com/STMicroelectronics/stm32-mw-mcuboot