Skip to main content
ABain.1
Associate
Feb 2, 2021 6:16 PM UTC
Solved

Does the in-built bootloader modify any SRAM contents?

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.
ABain.1
ABain.1Best answer
Associate
Feb 2, 2021 6:20 PM UTC

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).

2 replies

ABain.1
ABain.1AuthorBest answer
Associate
Feb 2, 2021 6:20 PM UTC

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
Feb 2, 2021 9:08 PM UTC

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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..