Hi @Julián_AragónM ,
Thanks for your continuous support. Please find below the answers to your questions.
As for the device in halt state.... are you able to measure current consumption?
Unfortunately, we did not connect ammeter before the issue occurred and as the issue happens rarely, using an ammeter would require to break the Battery connection thus POR.
Is the device on VLPS or does it never enter low power?
This we cannot say for sure currently. The intention is that the device should go to VLPS. However, it is possible that it gets stuck to some unknown state.
Are you able to share a register dump in this state?
Currently the MCU is no more in this state. However, if this issue reoccurs then how should I take the register values dump when MCU is running the release version.
Additionally, are you configuring sleep on exit feature?
No, currently we are not using Sleep on exit feature.
/* Do not re-enter (deep) sleep state on ISR exit */
S32_SCB->SCR &= ~(S32_SCB_SCR_SLEEPONEXIT_MASK);
I have a few questions regarding your recommendations.
As we are not using Sleep on Exit feature, do we need to "use DSB + ISB instructions to ensure proper synchronization before going to VLPS"?
If yes, then is it correct approach to call functions in this way?
/* Cpu is going into deep sleep state */
__asm("DSB");
__asm("ISB");
STANDBY(); // where STADBY() -> #define STANDBY() __asm volatile ("wfi")
We are working on the application layer. So do I need to call the following function, just before switching the power mode to VLPS?
void INT_SYS_ClearPending(IRQn_Type irqNumber); // <- call this function before switching to VLPS?
POWER_SYS_SetMode(POWER_MANAGER_VLPS, POWER_MANAGER_POLICY_FORCIBLE);
Thanks and Best Regards,