I can't seem to trigger PendSV
Hi, I have created this kernel for an ARM Cortex M3, on an Atmel (microchip) board, and now I am porting it to Nucleo f767zi.
I thought it would be an easier task, just adapting the HAL calls, and kernel (C and ASM) routines would keep the same. But I am having an strange behavior: when SysTick handler is called (and it is the one who triggers PendSV) my CONTROL == 0x01, which means I am not on priviliged mode. How could that be possible?
This is how I set my interrupts on NVIC:
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
/* System interrupt init*/
HAL_NVIC_SetPriority(MemoryManagement_IRQn, 0, 0);
HAL_NVIC_SetPriority(BusFault_IRQn, 0, 0);
HAL_NVIC_SetPriority(UsageFault_IRQn, 0, 0);
HAL_NVIC_SetPriority(SVCall_IRQn, 7, 7);
HAL_NVIC_SetPriority(DebugMonitor_IRQn, 0, 0);
HAL_NVIC_SetPriority(PendSV_IRQn, 8, 8);
HAL_NVIC_SetPriority(SysTick_IRQn, 7, 7);
HAL_NVIC_SetPriority(USART3_IRQn, 9, 9);
PendSV is being triggered as usual:
SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk;
I end up getting a hard fault:
Does this signal handler called at 0xfffffff1 means the system got a nested interrupt?
Any feedback is appreciated.
