-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to attach interrupt to PA0? #103
Comments
I solved this now by changing the first line of the
into
Since I am not using PA10 in my design. But I do wonder whether there is a way to do this without touching the board files? |
Not sure which variant file you are working off, but Grasshopper uses A4 for PA0. And there it is declared like this (more or less):
Your declaration will not work, because some internal use prevents PIN_ATTR_EXTI on PA0 (so either your interrupt will work, or LoRaWAN, but not both). |
The interrupt worked, but I have not tested it with LoRaWan yet. So I will change it back. I am working with the Grasshopper variant file. And let me rephrase the question: is it possible to attach an interrupt to PA0 when using this varaint file? This code does not work:
|
I have it working now. I have PA0 attached to a HALL sensor, which is HIGH when there is no magnet around. When I use Thanks for your help! |
I have a custom made board and use the Grasshopper board files. I want to use PA0 (WKUP) to wake up the device from sleep. I have no problem with waking up the device with a button attached to digital pin 1, but when I try the same code to use with PA0 (which is pin A4 in the definitions), it doesn't wake up after a pin change on WKUP.
How can I make the code below work for PA0?
The text was updated successfully, but these errors were encountered: