according to my understanding, in stop mode the SysTick should be disabled (since it's clocked from core clock):
Nevertheless, in my design (s32K11x) looks like It's nod disabled and it's able to exit from stop mode.
Is it due to the attached debugger?
Since the debugger interrupt is not mapped to NVIC I suppose it could be active, but if the core is stopped it shouldn't.
The code is really simple and generated using the SDK3.0.0:
UART_SendDataBlocking(&uart_pal1_instance, buff_out, sizeof(buff_out), 0xFFFF);
//Init systick here for 350ms operation
S32_SysTick->RVR = 0xFFFFFF;
S32_SysTick->CVR = S32_SysTick_CVR_CURRENT(0);
S32_SysTick->CVR = 0;
S32_SysTick->CSR = S32_SysTick_CSR_TICKINT(1) | S32_SysTick_CSR_ENABLE(1);
S32_SCB->SCR = S32_SCB_SCR_SLEEPDEEP(1);
SMC->PMPROT = SMC_PMPROT_AVLP(1);//VLPR and VLPS are allowed
SMC->PMCTRL = SMC_PMCTRL_RUNM(0) | SMC_PMCTRL_STOPM(0) ;//Normal mode run
SMC->STOPCTRL = SMC_STOPCTRL_STOPO(2);
UART_SendDataBlocking(&uart_pal1_instance, buff_out, 3,0xFFFF);
__asm("nop");//Just for breakpoints
Any hint on this?
Thanks and K.R.