⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
RexDevelopment
Offline
Last seen:3 years 1 month ago
Joined:2016-07-25 19:14
GPIO Interrupts

Hi Support!
Are there any peripheral_examples that have example code explaining or demonstrating GPIO Interrupts?

When I test my own code in peripheral_examples with GPIO Interrupt, interrupt will not initiate LED blinking, not sure what happened...
Code Snippet(PNG):
https://www.dropbox.com/s/b72v2xjlig2yt45/Q1.PNG?dl=0
https://www.dropbox.com/s/956f6turi0rb987/Q2.PNG?dl=0

Please help!
Thank you!
-Edward

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi RexDevelopment,

Hi RexDevelopment,

You dont have to Disable the IRQ in the ISR or disable the interrupts, just the condition to toggle the LED is enough, now the code that you pasted seems ok what you should check is the package that you are using, is it a QFN40, since the WCSP doesn't have a port 2.

Thanks MT_dialog

RexDevelopment
Offline
Last seen:3 years 1 month ago
Joined:2016-07-25 19:14
Hi MT_dialog,

Hi MT_dialog,
Thank you for reply,

1. Are there any peripheral_examples that have example code explaining or demonstrating GPIO Interrupts?
2. Thanks!
3.有标志指示的Interr吗upt has been Triggered?
Thank you,
Edward

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi RexDevelopment,

Hi RexDevelopment,

1. No, there are no examples in the peripherals demo that demonstrate the GPIO interrupt functionallity. You will be able to find documentation regarding the GPIO interrupts in UM-B-051 DA1458x Software Platform Reference.pdf, also as i mentioned above, which package are you using, is it the WCSP or a QFN40 ? If its a WCSP try to use Port 0 or Port 1 since is no port 2.

2. You can check if the interrupt is triggered via the NVIC using the NVIC_GetPendingIRQ() function.

Thanks MT_dialog