AnsweredAssumed Answered

Systick and stop mode

Question asked by Catosh on Jun 4, 2019
Latest reply on Jun 19, 2019 by Diana Batrlova

Hi, 

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:

 

uint8_t buff_out[]="Test\r\n";

int main(void)

{

CLOCK_DRV_Init(&clockMan1_InitConfig0);
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);
UART_Init(&uart_pal1_instance, &uart_pal1_Config0);
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);
STANDBY();
while(1){
UART_SendDataBlocking(&uart_pal1_instance, buff_out, 3,0xFFFF);
STANDBY();
//asm("nop");
}

}

 

void SysTick_Handler(void)
{
__asm("nop");//Just for breakpoints
}

 

 

Any hint on this?

Thanks and K.R.

Luca

Outcomes