Skip to main content
friedrich.janus
Associate II
August 4, 2019
Solved

Is it possible to access bootloader by modifying SYSCFG_MEMRMP? STM32F4xx

  • August 4, 2019
  • 4 replies
  • 1408 views

Hello!

SYSCFG_MEMRMP bits MemMode[2:0] reflect the mapping of pins Boot0 and Boot1.

Bits are RW and allow mapping of SystemMemory (Bootloader) to 0x00000000 (Start address after reset). This would generate the idea of switching to the bootloader by changing these bits. BUT: When do the changes take effect? How to change to start address after switching the code areas? Is there documentation for this method?

The alternative method of invocation of the bootloader via a call is already understood.

Thanks and rgds

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
August 4, 2019

It changes the zero mapping/shadowing immediately. I've used it, and posted code, showing how to transfer control to the System Loader from a user application on F2/F4 devices.

The vector table content typically immediately vectors control to an 0x1FFxxxxx or 0x080xxxxx address, and the table content points to the natural address of the code.

At reset the SCB->VTOR is also zero, thus the shadowing, but can be set to the ROM/FLASH basis quite easily.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
friedrich.janus
Associate II
August 4, 2019

Hello Clive.

That reflects exactly my intention.

You posted code? Where can I find the code?

rgds

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
August 4, 2019
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
friedrich.janus
Associate II
August 5, 2019

Hello Clive,

i used the mechanism that is documented in the video #22 and is similar to the mechanism in your first link - a straight call to the bootloader (after some cleanup). Works well. Thank you!

rgds