Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Spresense SDK - Setting Up GPIO Interrupts
-
Hello everyone!
As the topic title mentions, I'm curious if anyone knows how to setup GPIO interrupts on pins available on the extension board?
In past efforts, I managed to extracts parts of the Spresense Arduino library to understand how to setup certain GPIO functionality (Stuff like setting up pins for normal I/O RWs).
However, a cursory glance at how the Spresense Arduino library sets up interrupts is a bit more intensive and will require a bit of time to understand. Which I'm not 100% opposed to doing since its enjoyable (except when things don't work).
So if anyone knows any code samples, pointers, or documentation on how to setup interrupts, let me know! I'd appreciate the help.
-
Hello, @Sean-Phillips!
Good to see that you're enjoying your Spresense learning process
About the interrupts, there are some resources that might help you!
In https://developer.sony.com/develop/spresense/docs/arduino_developer_guide_en.html#_functional_differences, check out the section on Interrupts. It has a lot of important information.Also, check out the Arduino example that's under "Low Power -> External Wake Up"
https://github.com/sonydevworld/spresense-arduino-compatible/blob/master/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LowPower/examples/ExternalWakeup/ExternalWakeup.inoTo choose the pins from the Extension board, you only need to change the pin number for a pin in the extension board. If you're unsure about the pin numbers of the extension board, check out the extension board section in our introduction https://developer.sony.com/develop/spresense/docs/introduction_en.html#_extension_board.
Let me know if the material makes sense to you or if I can help you with anything else.
Have fun!