Complete the code to enable the SysTick timer interrupt.
SysTick->CTRL |= [1];The SysTick interrupt is enabled by setting the TICKINT bit in the CTRL register.
Complete the code to set the SysTick reload value for a 1ms tick assuming a 48 MHz clock.
SysTick->LOAD = [1] - 1;
For a 48 MHz clock, 1 ms corresponds to 48000 clock cycles (48,000,000 / 1000).
Fix the error in the code to start the SysTick timer with processor clock as source.
SysTick->CTRL = [1] | SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk;The CLKSOURCE bit selects the processor clock as the SysTick clock source.
Fill both blanks to create a SysTick handler function that increments the RTOS tick count and clears the interrupt flag.
void SysTick_Handler(void) {
[1]();
[2] = 0;
}The RTOS tick handler function is called to update the OS tick count. Clearing the SysTick current value register (VAL) resets the timer.
Fill all three blanks to configure SysTick for a 1ms RTOS tick with interrupt enabled and processor clock source.
SysTick->LOAD = [1] - 1; SysTick->VAL = 0; SysTick->CTRL = [2] | [3] | SysTick_CTRL_ENABLE_Msk;
The reload value is set for 1ms ticks at 48 MHz. The interrupt and clock source bits are set to enable SysTick interrupt and select processor clock.
