I looked at the S32K3 Low Power Management AN and demos, but those demos uses DS3.4, which I couldn't open and compile. Is there a demo of DS3.5 available?
I have a problem with low power Management. After the MCU is awakened, the reset type obtained by using Power_Ip_GetResetReason() is MCU_WAKEUP_REASON, and this is correct. But when I used Wkpu Ip GetInputState() to get the wake source, I didn't get the correct result. I don't know why.
This is my test project. I hope someone could help me.
Thanks!
解決済! 解決策の投稿を見る。
Hi @ZDDL,
You can refer to the following examples: S32K3 Low Power Management AN and demos RTD 4.0.0 & 5.0.0 - NXP Community.
For the wakeup source, please try reading the registers directly:
uint32_t WISR_Value;
uint32_t WISR64_Value;
void WKPU_Handler(void)
{
/*store the WISR value which indicate the wake up source.*/
WISR_Value = IP_WKPU->WISR;
WISR64_Value = IP_WKPU->WISR_64;
if(MCU_WAKEUP_REASON == Power_Ip_GetResetReason())
{
printf("Reset reason = MCU_WAKEUP_REASON\r\n");
}
printf("WISR = %"PRIu32",", WISR_Value);
printf("WISR64 = %"PRIu32".\n", WISR64_Value);
/*Clear the flag by writing 1.*/
IP_WKPU->WISR = 0xffffffff;
IP_WKPU->WISR_64 = 0xffffffff;
__asm("dsb");
__asm("isb");
}
Best regards,
Julián
Hi @ZDDL,
You can refer to the following examples: S32K3 Low Power Management AN and demos RTD 4.0.0 & 5.0.0 - NXP Community.
For the wakeup source, please try reading the registers directly:
uint32_t WISR_Value;
uint32_t WISR64_Value;
void WKPU_Handler(void)
{
/*store the WISR value which indicate the wake up source.*/
WISR_Value = IP_WKPU->WISR;
WISR64_Value = IP_WKPU->WISR_64;
if(MCU_WAKEUP_REASON == Power_Ip_GetResetReason())
{
printf("Reset reason = MCU_WAKEUP_REASON\r\n");
}
printf("WISR = %"PRIu32",", WISR_Value);
printf("WISR64 = %"PRIu32".\n", WISR64_Value);
/*Clear the flag by writing 1.*/
IP_WKPU->WISR = 0xffffffff;
IP_WKPU->WISR_64 = 0xffffffff;
__asm("dsb");
__asm("isb");
}
Best regards,
Julián