cancel
Showing results for 
Search instead for 
Did you mean: 

Your experiences with the in-built bootloaders ?

LCE
Principal II

Heyho,

I'm currently designing a new modular system, with an STMH7 on the base-card. That one's basically up and running, including a self-made bootloader.

Now I'm working on some new modules, these will be connected to the "base H7", probably via I2C, 2 extra UART lines might also be possible.

The previous system used ATmega-MCUs on the modules, now we'll surely use some STM32 type. These modules will not do any DSP or computing, so a "small" STM32 will do (tending towards L07x because of the EEPROM).

To save some dev time I'm thinking about using the internal bootloader for the module MCU, controlled by the base H7.

I have checked the application notes (AN2606 and the ANs depending on the BL interface), also found the example source code from ST on Github.

So far that looks okay and doable, nevertheless user experience always wins over "reading". :D

So...

  1. Anybody using the ST bootloaders in some real-life products ?
  2. How did that go and work out ? Documentation and source code examples good enough for smooth development ?

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
LCE
Principal II

Thanks again for all your input.

With all the info, having checked all documentation, I have decided against the system bootloader.

Reasons for that:

  • Interface 1): the L07x / L08x  devices I'll probably use have only UART bootloaders - which doesn't really fit into my design, as the main communication between base / modules will be via I2C. And I prefer "clocked" interfaces anyway (and don't want to have baud rate troubles or scale down below 115k2).
  • Interface 2): I don't like the interface scanning, I'll have different modules in the system, and it might be too much trouble keeping the unused IOs quiet.
  • Debugging: a self-made bootloader will give me the opportunity for debugging via UART, and / or at least LEDs.
  • Documentation: is still a little bit lacking, or distributed among too many documents. And I don't like having "black boxes" in a system.
  • I have enough experience writing my own bootloader, I could re-use lots of stuff that I already have (BL for H7, many AVRs).

View solution in original post

16 REPLIES 16
Bowman32
ST Employee

Hi @LCE 

ST does not provide the bootloader source code. However, application note AN2606, "STM32 Microcontroller System Memory Boot Mode," offers comprehensive details about the STM32H7xx bootloader functionality and implementation.

Best regards,
Bouraoui

LCE
Principal II

Okay, I thought I saw some example code from ST on Github?

AN2606 shows some basic info, the details are in the interface-dependent ANs.

 

BTW, I cannot find info about flash page size, neither in the DS, nor in the DM... why and where?

Edit: okay, found that in the RM under NVM organization.
Anyway, would be nice if one could find stuff like that with a simple "page size" search, or something similar.


@LCE wrote:

I thought I saw some example code from ST on Github?


Maybe that was for the "Host" side of the bootloader?

Maybe what @Bowman32 means is that ST don't provide the internal source for the code that's in ROM within the STM32?

That would make sense ...

 

PS:

The STM32 Open Bootloader supports exactly same protocol interfaces as STM32 System Bootloaders - so you could use that ... ?

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I definitely mean the host side - I cannot do anything about the in-built bootloader anyway...

 

The STM32 Open Bootloader supports exactly same protocol interfaces as STM32 System Bootloaders ...

Yes, that's what I found, so I was surprised about the "no, we don't" answer - classical misunderstanding.

@Tesla DeLorean points to the MKRWANFWUpdate_standalone as a Host for FW updates using the System Bootloader.

Also here.

 

Seems to be based on stm32flash: https://github.com/stm32duino/stm32flash

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User

@LCE wrote:
  1. Anybody using the ST bootloaders in some real-life products ?

So, from the above, it seems that Arduino have used it in their MKR WAN 1300:

AndrewNeil_0-1774970524919.jpeg

https://docs.arduino.cc/hardware/mkr-wan-1300/

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Employee

@LCE wrote:
  1. Anybody using the ST bootloaders in some real-life products ?

Many ST customers are using the built-in bootloader but I don't have the visibility on how they are using it.

For bootloader host side you need to refer to the respective ANs.

Example for I2C: AN4221 "I2C protocol used in the STM32 bootloader"

For USART: AN3155 "How to use USART protocol in bootloader on STM32 MCUs"

You need to implement the host protocol yourself.

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.
LCE
Principal II

As I've written, yes, I have found and checked the ANs.

 

Many ST customers are using the built-in bootloader but I don't have the visibility on how they are using it.

@mƎALLEm  and the ST support team doesn't have too many customers complaining / having troubles with it ? :D

 


@LCE wrote:

@mƎALLEm  and the ST support team doesn't have too many customers complaining / having troubles with it ? :D


To be honest, as any other features/peripherals, the bootloader could have issues. The limitations are listed in the errata sheet.

For example in the case of STM32L4Rxxx (ES0393) (see the screenshot in the attachment).

So need to check the errata sheet first then do some tests..

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.