MicroController: LPC845
Subject: Resetting peripherals and Core to jump from BootLoader to Application
When jumping from BootLoader to Application I'd like to get rid of all history
(e.g. clock settings, inits of peripherals, pending interrupts) by
1. setting VTOR to 0x2000, as follows:
*((volatile uint32_t*) 0xE000ED08) = 0x00002000;
2. resetting all peripherals and the Cortex-M0+ Core
With the sequence
*((volatile uint32_t*) 0xE000ED08) = 0x00002000;
NVIC_SystemReset();
in combination with calling function SYS_ResetAllPeripherals (see below),
immediately after reset, this goal is not achieved
(and it's hard to debug this low level stuff, going through reset).
I would appreciate any advise on this matter.
VTOR is set to 0 on reset (see ARM document DUI0662 page 2-18), so this approach won't work .
Instead you can simulate the reset behavior, at a minimum by using your vector table to load the stack pointer and jump to the reset vector.
Hi René Kniest,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I haven't found you to execute jumping to the application after configuring VTOR register.
To provide the fastest possible support, I'd highly recommend you to refer to some bootloader application notes for details.
You can download these bootloader applications notes via the following link.
https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-corte...
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------