Arduino_XI
Arduino_XI copied to clipboard
Power management unit (PMU) can't handle analogRead
inside the main loop:
if I do:
digitalRead(A3); PMU.sleep(PM_POFFS0, SLEEP_4S);
it goes to sleep for 4 seconds
if I do:
analogRead(A3); PMU.sleep(PM_POFFS0, SLEEP_4S);
no sleep will happen and it will continuously run the loop.
Same problem...
I found that if you call PMU.sleep twice after analogRead, the second will work...