Can't get IMX7 to wake from WAIT mode

Showing results for 
Search instead for 
Did you mean: 

Can't get IMX7 to wake from WAIT mode

Contributor II

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?

Labels (1)
0 Kudos
2 Replies

Contributor II

IMX7 does have wait mode. It's used by the linux cpuidle driver (./arch/arm/mach-imx/cpuidle-imx7d.c)

I got this to work. I had to set the following things:

 - assign mega/fast mix to A7 domain (GPC_PGC_CPU_MAPPING)

 - enable A7 fast wakeup wait mode (BM_SLPCR_EN_A7_FASTWUP_WAIT_MODE)

 - disable memory low power mode (BM_GPC_MLPCR_MEMLP_CTL_DIS)

These flags are not covered in the datasheet examples. Might want to add them.

0 Kudos

NXP TechSupport
NXP TechSupport

Hi Jordan

i.MX7D processor supports low power modes described in
sect. Power Modes i.MX7D Reference Manual

Table 14. Power modes i.MX7D Datasheet

Use cases and software examples described in sect.4.1. Low-power mode use cases
AN5383 i.MX 7DS Power Consumption Measurement

Software register settings one can find in linux driver sources
(linux//arch/arm/mach-imx/suspend-imx7.S), please look at
Chapter 21 Low-level Power Management (PM) Driver attached Linux Manual and
description in AN5383 app note.

Best regards
Note: If this post answers your question, please click the Correct Answer button. Thank you!

0 Kudos