Not sure why my code is not working: external interrupt while in standby mode

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
happyday
Posts: 9
Joined: Sat Jan 21, 2017 12:11 pm

Not sure why my code is not working: external interrupt while in standby mode

Post by happyday » Wed Jul 18, 2018 2:49 pm

Hello,
My code is actually for CircuitPython. But, MP and CP are basically the same.

I have written a C module extension that puts the m0 into standby then wakes up on an interrupt (to D12 - right now I am hard coding the pin mapping for simplicity).

The code in my C module extension: https://github.com/BitKnitting/wakey_ci ... bug_test.c does not return from standby upon receiving the external interrupt.

HOWEVER, I stripped down an Arduino library (rtc_zero.cpp): https://github.com/BitKnitting/wakey_ci ... nt_lib.cpp as a way to validate the steps I took. The Arduino code worked as expected.

I cannot find a reason why the code will not return from an external interrupt. Perhaps there is something colliding within MP core with regards to __WFI() or some other stuff that isn't present within the Arduino firmware?

Any advice would be greatly appreciated. Thank you.

Post Reply