Re: The black magic of returning from Deep Sleep every time
Posted: Thu Jan 30, 2020 11:22 pm
I'm curious about how you get the chip in 'zombie mode' with Deep Sleep. I've never seen it. I've hit Deep Sleep a few hundred times in the last few weeks without a single failure using the current Arduino git.
Most of the time I have a germanium or Schottky between GPIO16 and RST, sometimes a 330 ohm resistor, every now and then a 2 inch wire. All worked, depending on whether I wanted an external RESET switch.
I've never used a delay() after Deep Sleep. It shouldn't need it, as it's a different mechanism / Sleep mode than the others that DO absolutely need at least delay(1) before activating.
You don't need to do Serial.flush() before Deep Sleep. Trust me, it'll cut off in mid-byte during a printf.
The maximum theoretical deep sleep is ~ 71.58 minutes, and due to the calculation for time it's something less than that. The longest I think I got was 68 minutes and change, not 3.5 hours. How do you get 3.5 hours from 2^32 microseconds? Are you travelling near the speed of light or near the event horizon of a black hole?
I'd really like to see zombie mode, but alas my code and hardware have always worked. It's almost not worth keeping the shotgun next to my work bench.
Most of the time I have a germanium or Schottky between GPIO16 and RST, sometimes a 330 ohm resistor, every now and then a 2 inch wire. All worked, depending on whether I wanted an external RESET switch.
I've never used a delay() after Deep Sleep. It shouldn't need it, as it's a different mechanism / Sleep mode than the others that DO absolutely need at least delay(1) before activating.
You don't need to do Serial.flush() before Deep Sleep. Trust me, it'll cut off in mid-byte during a printf.
The maximum theoretical deep sleep is ~ 71.58 minutes, and due to the calculation for time it's something less than that. The longest I think I got was 68 minutes and change, not 3.5 hours. How do you get 3.5 hours from 2^32 microseconds? Are you travelling near the speed of light or near the event horizon of a black hole?
I'd really like to see zombie mode, but alas my code and hardware have always worked. It's almost not worth keeping the shotgun next to my work bench.