Teensy 4.0: Wake up from SNVS Low Power Mode through GPIO

ChrisR

New member
Hello,

I am experimenting with Teensy 4.0 power save modes, concrete the "lowest" power mode which NXP calls "SNVS Low Power Mode". This shuts off all components except SNVS domain and the 32 kHz RTC ("SRTC").

According to the docs (Application Note AN12085) just two events let the processor return from SNVS Low Power Mode: Either an alarm from the RTC or a level change on GPIO pin GPIO5_IO00.

I am perfectly able to put the CPU into SNVS Low Power Mode and let it wake up through a RTC alarm, this really works great. But I am unable to find a way to do it through the GPIO pin.

GPIO5_I00 (in the electrical specs called "GPIO5.IO[0]") is routed to pin L6 which is named "WAKEUP". If I am right this pin is not connected to the Teensy 4.0 PCB.

So am I right that with Teensy 4.0 there is no way to wakeup from SNVS Low Power Mode through GPIO ... or did I miss (or misunderstand) anything?

(In fact there is a third way to let it wake up: power down the RTC. But then the RTC loses the time.)

Thanks for any advice ... Chris
 
Try the snooze library.
It can wake up a t4.x from SNVS aka hibernation mode using any gpio, alarm etc
 
Thanks, Rezo, for the advice. But I am afraid the Snooze library cannot help here. For the other low power modes ("System idle", "Low Power Idle", and "Suspend" as NXP calls them) any GPIO can be used as wake up source. But "SNVS Low Power Mode" only allows the WAKEUP pin to wake up the system (see NXP's Application Note in section 3.5.1).

So as it looks this pin (L6) is in fact not connected on the Teensy 4.0 board. So it is obviously not possible to return from SNVS low power mode using a level change with Teensy 4.0. Perhaps it would be worth considering to add this capability in the next revision of the Teensy 4.0 board. It might be as simple as bridging L6 and M6 of the processor which are neigbors. M6 is the ONOFF pin which has its own connector on the PCB. WAKEUP should not interfere with normal operation of ONOFF if SNVS low power mode is not used. With both functions enabled a "ONOFF button press duration" greater than 0 ms would allow to distinguish between WAKEUP and ONOFF.

Chris
 
Ahh right, there are four modes, not three.
Snooze can do suspend mode, which is what I was initially referring to.

Why do you specifically need SNVS mode? As far as I recall, in the Snooze thread someone had done power mesurments in different modes and the suspend mode drew only a couple of milliamps (I know this might be high for this application).
Is that not sufficient for you? or do you need SNVS for another reason?
 
I think I found the post you were referring to, thanks for that: https://forum.pjrc.com/threads/57885-Teensy-4-0-Low-Power?p=241447&viewfull=1#post241447

Yes, I in fact try to reduce power consumption as far as possible because the device has to run several months from solar power and it's not the only power consumer at the site. In the post it is stated that hibernate (I guess this is NXP's "suspend") draws 7.4 mA. In SNVS low power mode I am down at 220 µA, so that's 3% of the "hibernate" current draw and that makes a real difference for my application. It should even be possible to reduce by another 40 µA when bypassing the 3.3v regulator (if it likes being backpowered.)

But SNVS mode means that you cannot access the device while it is waiting for the RTC alarm. You either have to wait hours until the RTC wakes it up or you cut RTC power. Then T4 starts but the time is lost. That's why it would be handy to get it back to work by a GPIO level change.
 
Hi ChrisR, I've just started experimenting with SNVS mode also. See my piping up on https://forum.pjrc.com/index.php?threads/beware-t4x-rtc-power-consumption.64216/ for more infoz. Note my mention there that a battery much over 3V will be discharged also, even faster, when the power is ON (!) - leading to the need to add diode voltage drops in series with your battery.

I am trying to get down from 26.1 uA standby, to run just the built-in xtal RTC on a non-rechargable battery for as many years as possible. SNVS mode halves that to 13.3uA. But, I'd like it to wake on power-up. I wonder if the built-in cross-bar switches can be used to wire GPIO5_I00 to another pin. That sounds like what the xbar switches are for - but when powered down??? (Aargh! 3500+ page i.MX RT1060 Processor Reference Manual! What wonders are hidden there! - see chapter 60).

Have you had any luck or learn anything new?
 
But SNVS mode means that you cannot access the device while it is waiting for the RTC alarm. You either have to wait hours until the RTC wakes it up or you cut RTC power. Then T4 starts but the time is lost. That's why it would be handy to get it back to work by a GPIO level change.
Wonder if you could set RTC alarm for say 15 seconds and have it check for a pin level change and if no change go back to sleep. User would have to switch something or hold a button for at most 15 seconds.
 
The processor manual has this temptation to try for wakeup on pin (state? change?):
11.4.1 SW_MUX_CTL_PAD_WAKEUP SW MUX Control Register
(IOMUXC_SNVS_SW_MUX_CTL_PAD_WAKEUP)

MUX_MODE : MUX Mode Select Field.
Select 1 of 2 iomux modes to be used for pad: WAKEUP.
Note: Some functions are available on multiple pins. A given function should not be selected for more than
one pin.
101 ALT5 — Select mux mode: ALT5 mux port: GPIO5_IO00 of instance: gpio5
111 ALT7 — Select mux mode: ALT7 mux port: NMI of instance: CM7
 
Back
Top