Hello,
another noobie question about imp001.
If a piece of code configures the PWM on pin 2 as follows
local pwm_f = 500.0; hardware.pin2.configure(PWM_OUT, 1.0/pwm_f, 0.0);
and then after some processing time on other code (say 5 seconds) then calls
imp.deepsleepfor(3600);
What is the expected state of the PWM pin while the device is in sleep mode?
Is it tri-state?
or is it 3.3V or 0v depending on the PWM state at the time of the imp.deepsleepfor() call?
peter
May 6, 2014, 6:57am
#2
In deep sleep all pins are tri-stated, unless you’ve enabled pin1 for wakeup, in which case pin1 (only) has a weak pull-down.
Peter
That’s great thanks and explains what i am seeing on my hardware setup. Do you have a URL into the imp doco that describes this ? (as I have not been abe to find it yet)
@punkiepunkie - looks like we’re missing that documentation. I’ll get it added to the appropriate pages (imp.deepsleepfor, and server.sleepfor)
hugo
May 6, 2014, 9:15pm
#6
…and if you want to just wait for a bit and keep PWM running, you want a shallow sleep. See: http://www.electricimp.com/docs/resources/wakeupguide/