Hello,
I am trying to put the i.MXRT 117x into sleep and wakeup from specific source. I could not find any good reference of best practices, I collected the implementation from various source.
I came up with the following, however, it wakes up also for these that I setup to ignore.
static
void
_enter_low_powerdown(void) {
GPC_CM_SetNextCpuMode(GPC_CPU_MODE_CTRL_0, kGPC_StopMode);
GPC_CM_EnableIrqWakeup(GPC_CPU_MODE_CTRL_0, GPIO13_GPIO_COMB_0_15_IRQN, true);
GPC_CM_EnableIrqWakeup(GPC_CPU_MODE_CTRL_0, GPIO3_GPIO_COMB_0_15_IRQN, false);
GPC_CM_EnableIrqWakeup(GPC_CPU_MODE_CTRL_0, GPT3_GPT_IRQN, false);
PRINTF("SUSPEND\r\n");
DbgConsole_EnterLowpower();
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
__disable_irq();
__WFI();
__enable_irq();
DbgConsole_ExitLowpower();
PRINTF("WAKEUP\r\n");
BOARD_InitPins();
}
Does anybody know how to setup the sleep so that it will only wakeup from the sources listed? I would like to avoid setting up and re-resetting the devices.
Thanks,