Page 1 of 1

[M480] Switching Code between LDROM and SPI Flash

Posted: 20 May 2022, 09:28
by chhsieh3
  • Application: This example code is used for the M480 series microcontroller (MCU) to switch code between LDROM and SPI Flash.
  • BSP Version: M480 BSP CMSIS V3.05.003
  • Hardware: NuMaker-PFM-M487 Ver3.0
This example code is used for the M480 series microcontroller (MCU) to jump from LDROM to SPI Flash, and then jump from SPI Flash to LDROM. Bootloader is a project in LDROM used to jump to the application in SPI Flash. It writes to the VTOR to relocate the vector table start address to SPI Flash's start address 0x8000000, and then the program pointer points to 0x8000000 and the stack pointer points to 0x8000004 to jump to the application. APP is a project in SPI Flash used to jump to the Bootloader in LDROM. It sets BS bit to 1 to boot from LDROM, and then sets SYSENSETREQ bit to 1 to assert the MCU Reset to jump to the Bootloader. This document introduces the example code of SPI Flash initialization, modifying VTOR to jump from LDROM to SPI Flash, and modifying BS to jump from SPI Flash to LDROM.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 0518152733