AnsweredAssumed Answered

Can't get IMX7 to wake from WAIT mode

Question asked by Jordan Rhee on Mar 26, 2018
Latest reply on Apr 5, 2018 by Jordan Rhee

I can't get IMX7 to wake from WAIT mode, using GPT1 timer as wake source. Cores and SCU are not powered down, and ARM clock is stopped in LPM. This is a clock gated state. I am configuring the system as follows:


GPC_LPCR_A7_BSC = 0x3ff5

 - LPM0 = LPM1 = 1 (WAIT)

 - CPU_CLK_ON_LPM = 0 (turn off ARM clock in LPM)

 - IRQ_SRC_C0 = IRQ_SRC_C1 = IRQ_SRC_A7_WUP = 0 (use IRQ to wake up, masked by IMR0-4)


GPC_LPCR_A7_AD = 0x200

 - EN_C0_PUP=1 (enable Core0 power up on LPM exit)

 - L2_PGE=0 (do not power down L2)

 - EN_PLAT_PDN=0 (do not power down SCU)


GPC_LPCR_M4 = 0x80003ff0



GPC_SLPCR = 0x80000000

 - EN_DSM=1 (enable DSM)


GPC_PGC_ACK_SEL_A7 = 0x80008000

 - Use A7 dummy ack for power down/power up acknowledge


GPC_PGC_C0,C1,SCU[0] = 0

 - do not arm PGC's for power down



 - unmask IRQ 87 (GPT1)



 - use 32khz osc as clock source

 - enable in WAIT, STOP, DOZE, and DBG


I believe the system is entering LPM because

 - power consumption decreases by 120mW. WFI without LPM saves only 60mW

 - If I set LPM=STOP, then screen goes off, which suggests most clocks are stopping, which only happens in LPM=STOP mode


I believe the GP1 interrupt is firing and is properly unmasked because

 - If I do NOT stop A7 clock in LPM, the system resumes from LPM

 - The GPT1 clock gate is configured to keep running in WAIT mode (CCGR124=0x2)

 - If I don't enter LPM mode, the GPT1 interrupt fires, and I see the ISR run

 - I successfully use GPT1 to wake up from CORE0_OFF state, using IRQ as wakeup source, even when GPT1 interrupt is disabled in the GIC. If I do not unmask this IRQ source in IMR, the core does not wake up, which strongly suggests that IRQ wakeup method is configured properly.


I have tried a lot of different things, including powering down cores and SCU, and various configurations of the WUP bits, but I cannot get system to resume from this state.


Any ideas why system isn't waking up?