Commit 729411db authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana Committed by Federico Vaga

bootloader: FreeRTOS app now boots properly

The issue was the SysTick timer, which was configured by the bootloader to
blink the backlight LEDs, but was not de-configured before booting to the
application.

Without the SysTick timer de-configured, the FreeRTOS tick timer, which relies
on the SysTick timer, fired before FreeRTOS could be properly configured. Since
the FreeRTOS SysTick handler contains some OS-specific functions and data, the
fact that these were not initialized probably led to a segfault.

This issue was fixed in boot.c, by de-configuring the SysTick timer.

Conflicts:
	sw/bootloader-an0042/main.c
parent c85bada9
......@@ -153,6 +153,12 @@ void BOOT_boot(void)
CMU->LFCLKSEL = _CMU_LFCLKSEL_RESETVALUE;
CMU->LFACLKEN0 = _CMU_LFACLKEN0_RESETVALUE;
/*
* Disable SysTick timer (bits TICKINT and ENABLE in SysTick.CTRL -- see
* EFM32 Cortex-M3 Reference Manual)
*/
SysTick->CTRL &= ~0x3;
/* Set new vector table pointer */
SCB->VTOR = (uint32_t)BOOTLOADER_SIZE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment