I have a SysTick interrupt to trigger task switch 4 times per second, as shown below.
void SysTick_Handler(void) { SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk; // Se