Controlling SNVS mode for i.MX8M

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling SNVS mode for i.MX8M

1,088 Views
yannick497
Contributor II

Hi,

Current we're using an imx8m processor. I'd like to be able to make the processor sleep from a button, particularly the "SNVS/RTC mode" where almost everything is turned off. The PMIC used is the PF4210.

I have a few questions

1- I can't find any reference to the "SNVS mode" in the reference manual of the imx8 (IMX8MDQLQRM.pdf). Why is that? Page 977/6407 seems to show a flow diagram of the power modes. I see "SRTC", is that the same as the SNVS mode?

2- On the hardware level, how would it be possible to transition from the "ON" state to the "SNVS mode", which pins are involved, and how to trigger it (i.e. do we send a pulse of x seconds to a specific pin, we set something to zero, or...?)

Or is the SNVS mode activated from software only?

3- Is it possible to switch to the SNVS mode from software instead of from hardware (i.e. not from a physical button). Is there some documentation about it (I can't really find much).

4- Is there a PIN somewhere on the imx8 that can be used (an output) to determine if the imx8 is in the on state (i.e. is powered on, not sleeping nor being off).

5- If a GPIO is maintained constantly at a logic 1 for example, will it stay at logic 1 in SNVS mode or not? And when the processor exits SNVS mode (ON state), is the GPIO back on logic 1?

Thanks!

7 Replies

675 Views
yannick497
Contributor II

Hi, thank you very much for your answers.

I would like some precisions on your answers.

2) Is simply turning off the power supplies abruptly (except VDD_SNVS NVCC_SNVS) upstream of the PMIC sufficient? Won't turning them off abruptly cause a loss memory, or is the PMIC "notifying" the processor it must go to sleep?

5) I'm surprised when resuming from SNVS mode to ON mode, the GPIO which was held in software to 1 should not go back to 1. I thought SNVS mode acted like a sleep mode and permitted to "resume" whatever work the processor was doing as if no sleeping ever happened. Is that wrong? Shouldn't the GPIO then recover to 1 too as if nothing had happened once the sleeping is over?

Thanks!

0 Kudos

675 Views
igorpadykov
NXP TechSupport
NXP TechSupport

2)  sect.3.2.2 Power-down sequence datasheet should be followed.

5) >I thought SNVS mode acted like a sleep mode and permitted to "resume" whatever

>work the processor was doing as if no sleeping ever happened. Is that wrong?

SNVS mode is different from sleep mode, GPIO states are not preserved.

Best regards
igor

0 Kudos

675 Views
yannick497
Contributor II

Thank you igor.

The device I'm using is a iMX8M SOM which has an on-board PF4210 PMIC connected in the same fashion as on the EVK board.

- Is it correct to say the data in RAM won't be kept (programs resuming from the same point) if the DRAM is powered by NVCC_DRAM of the PF4210 PMIC (I assume because NVCC_DRAM is off, the DRAM will also be off).

- In this case is it better to use DSM (Deep sleep mode) using PMIC_STBY_REQ, and are the GPIO states preserved in this mode?

Sorry for all these questions, and much thanks for your help.

0 Kudos

675 Views
igorpadykov
NXP TechSupport
NXP TechSupport

>- Is it correct to say the data in RAM won't be kept (programs resuming from the same point) if the DRAM is powered by >NVCC_DRAM of the PF4210 PMIC (I assume because NVCC_DRAM is off, the DRAM will also be off).

correct, in snvs mode NVCC_DRAM is off, the DRAM will also be off, data in RAM won't be kept.

 

>- In this case is it better to use DSM (Deep sleep mode) using

>PMIC_STBY_REQ, and are the GPIO states preserved in this mode?

right, in DSM mode GPIO states are preserved.

Best regards
igor

0 Kudos

675 Views
yannick497
Contributor II

Igor, I'm not sure I understand how waking up works, moreover what are the limitations.

- Can we wake up from SNVS mode by an interrupt signal sent to a GPIO? Or can can we wake up *exclusively* from ONOFF PIN?

- Can we wake up from DSM by GPIO interrupt, or again, only from ONOFF?

- How long ONOFF has to be zero in order to wake up from SNVS/DSM?

- From what I understand in DSM mode we can set PMIC_STBY_REQ from 1 to 0 to wake up the system, but if the processor itself holds PMIC_STBY_REQ to 1 (in DSM), can an interrupt to a custom GPIO permit to run code on the CPU so that we can set *in software* PMIC_STBY_REQ to zero?

0 Kudos

675 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Yannick

>Can we wake up from SNVS mode by an interrupt signal sent to a GPIO?
>Or can can we wake up *exclusively* from ONOFF PIN?

as described in sect.3.1.6 Power modes in SNVS mode only SNVS power

supply is enabled, so wake is possible only with events from SNVS module:

ONOFF PIN, RTC:

rtcwakeup.c\mxc_rtc\test - imx-test - i.MX Driver Test Application Software 

>Can we wake up from DSM by GPIO interrupt..

yes, since in  DSM mode GPIO power supplies may be enabled.

Best regards
igor

0 Kudos

675 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Yannick

1. it is described in sect.3.1.6 Power modes

i.MX 8M Dual / 8M QuadLite / 8M Quad Applications Processors Data Sheet for Consumer Products

2. all power supplies should be turned off exept VDD_SNVS, NVCC_SNVS

3. can be done with PMIC_ON_REQ controlling PMIC PWRON, in the same way as

Q&A: How is mx6 PMIC_ON_REQ under SW control? 

4. one can use any gpio (with led for example), when processor is powered led will be off.

5.> If a GPIO is maintained constantly at a logic 1 for example, will it stay at logic 1 in SNVS mode or not?

no

>And when the processor exits SNVS mode (ON state), is the GPIO back on logic 1?

no

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