Skip to main content
ABain.1
Associate
February 2, 2021
Solved

Does the in-built bootloader modify any SRAM contents?

  • February 2, 2021
  • 1 reply
  • 895 views

We have a product that is permanently powered. We'd like to be able to persist some frequently changing data through a reset and firmware upgrade (using the in-built ROM bootloader) by just reserving (and no-init'ing) an area of RAM, however I'm concerned that the ROM bootloader may use areas of SRAM for it's own purposes, thus trashing our saved data. Does this happen? If so, are there any areas it wouldn't touch?

The specific micro we're using is the STM32L451.

This topic has been closed for replies.
Best answer by ABain.1

To answer my own question, from https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf - "12 Kbyte starting from address 0x20000000 are used by the bootloader firmware" (this varies by device, this is the configuration for the STM32L451).

1 reply

ABain.1
ABain.1AuthorAnswer
Associate
February 2, 2021

To answer my own question, from https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf - "12 Kbyte starting from address 0x20000000 are used by the bootloader firmware" (this varies by device, this is the configuration for the STM32L451).

Tesla DeLorean
Guru
February 2, 2021

The RTC has 32 32-bit registers

Might also want to look at the initial SP register from the ROM's Vector Table, this is usually the high-water mark

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