Open jamolnng opened 3 years ago
https://github.com/rtic-rs/cortex-m-rtic/issues/331
or
https://github.com/rtic-rs/cortex-m-rtic/issues/403
seems this is might be an issue with rtic
I'm also hitting this issue with GPIOTE and RTIC not working. @jamolnng did you find the issue or a possible fix?
OS: Windows 10 Rust version: 1.48.0 Target: thumbv7em-none-eabihf Platform: nRF52840-DK (10056)
This is a weird one I've been trying to figure out all night. I cannot get the gpiote-demo to work when running the debug or release binary except when I am in debugging mode.
I am using an exact copy of the code/Cargo.toml/Embed.toml from the example. The only thing that works is btn2 toggling the LED1. Buttons 1, 3, and 4 do nothing when not debugging.
When debugging, buttons 1, 3, and 4 behave as intended and this is seen with the
rprintln!
statements appearing, when I set break points inon_gpiote
anddebounce
and they get called, or when I see the LEDs changing as intended.When I try to manually toggle the LEDs in
on_gpiote
ordebounce
when not debugging nothing happens, which is leading me to believe thaton_gpiote
anddebounce
are not getting triggered when the processor is not being debugged, which seems strange.Finally, when not debugging I changed which button uses the PPI to toggle the LED and each button works when they use that.
So I'm really not sure what's going on. The only two things I can think is that it might, but unlikely, be an issue with the ext hfosc since that is bypassed in debugging mode and the debugger's clock is used, but I've tested without it enabled and still have the same issues. Or it also be an issue with this board but I'm not sure how likely that is.
Code here: https://gist.github.com/jamolnng/54d65593488609ae3149eaa665182cb9