Why doesn't wakey.zzz(board.D12) return from interrupt? - BitKnitting/wakey_circuitpython GitHub Wiki
The Goal
Write a CP module that puts SamD21G18A into sleep mode. Wakes up on interrupt.
What works
From a modified Atmel Start project, waking from interrupt works as expected.
What doesn't work
From the mu editor:
import board
import wakey
wakey.zzz(board.D12)
does not return.
Expected behavior
I assume when the CP code is running wakey.zzz(board.D12)
it goes into standby model. Applying a 3.3V level to D12 on the Itsy Bitsy m0 (i.e.: PA19) will bring up the next command prompt (i.e.: if started in REPL) or next source line (if in main.py). Specifically:
- apply 3.3V to D12.
- EIC_Handler is called.
- EIC_Handler calls
wakey_interrupt_handler
in wakey_helpers.c
Debug effort
- I have been using CP's make:
make BOARD=itsybitsy_m0_express DEBUG=1
then loading the .elf file into Ozone. For me, Ozone provided the best of what I liked using GDB CLI and Eclipse without the "hard core" GDB CLI or the "heavy (heavy)" Eclipse configuration. I am so enthused, I made a video to show you what I mean. - Walked through PulseIn to verify registers for EIC and GPIO were set similar to those I set.