- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm using Altera Cyclone V board (Board Info http://www.altera.com/products/devkits/altera/kit-cyclone-v-soc.html ). And tried to set User Push Button [0 :3] as low level trigger mode, but when I push these button, the interrupt handle will be called many many times. However, it works well under low edge trigger mode, the interrupt handle was called only once. BTW, I’ve already set the debounce clock value gpio divide register in clock manager and set it enabled in gpio_debounce register. Any suggestion is appreciated, thanks.Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What clock frequency and clock divider settings do you use for the GPIO? In order for the edge to propogate to the interrupt logic the button active period would need to be at least 2 debounce clocks in width.
*Sorry I just read the post again and I had it backwards, I thought you said the level interrupts worked but the edge interrupts were not. I agree with what dsl said, your finger is probably still on the button when the ISR completes and you end up re-entering the ISR again. *- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is what I'd expect from a level triggered interrupt.
As soon as the ISR returns and enables interrupts, if the IRQ is still asserted (and not masked) then the ISR will be re-executed.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- That is what I'd expect from a level triggered interrupt. As soon as the ISR returns and enables interrupts, if the IRQ is still asserted (and not masked) then the ISR will be re-executed. --- Quote End --- Thank you for your reply, I agree with your answer, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- What clock frequency and clock divider settings do you use for the GPIO? In order for the edge to propogate to the interrupt logic the button active period would need to be at least 2 debounce clocks in width. *Sorry I just read the post again and I had it backwards, I thought you said the level interrupts worked but the edge interrupts were not. I agree with what dsl said, your finger is probably still on the button when the ISR completes and you end up re-entering the ISR again. * --- Quote End --- Thanks BadOmen!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page