arm/frdm_k64f: fix boot issue with MBED bootloader and INIT_STACKS=y
Initializing the interrupt stack before initializing (turning off) the watchdog on the FRDM board pushed the initialization of the watchdog too late, causing it to fire and reset the board. The board would be kept in a reboot loop. Move the initialization of the watchdog earlier: this runs on the main stack now, instead of the interrupt stack, the same stack the interrupt stack initalization code runs on. Change-Id: Ic0006f4f4f4090393571d8355a80dc9390c9fbc6 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
8062f6ea5a
commit
eba017632a
1 changed files with 5 additions and 5 deletions
|
@ -79,6 +79,11 @@ SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)
|
|||
msr BASEPRI, r0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WDOG_INIT
|
||||
/* board-specific watchdog initialization is necessary */
|
||||
bl _WdogInit
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_INIT_STACKS
|
||||
ldr r0, =_interrupt_stack
|
||||
ldr r1, =0xaa
|
||||
|
@ -97,11 +102,6 @@ SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)
|
|||
movs.n r0, #2 /* switch to using PSP (bit1 of CONTROL reg) */
|
||||
msr CONTROL, r0
|
||||
|
||||
#ifdef CONFIG_WDOG_INIT
|
||||
/* board-specific watchdog initialization is necessary */
|
||||
bl _WdogInit
|
||||
#endif
|
||||
|
||||
b _PrepC
|
||||
|
||||
#if defined(CONFIG_SOC_TI_LM3S6965_QEMU)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue