Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20705 Discussions

Cyclone V GPIO interrupt can not work under low level-trigger mode

Altera_Forum
Honored Contributor II
1,768 Views

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.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
600 Views

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. *
0 Kudos
Altera_Forum
Honored Contributor II
600 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
600 Views

 

--- 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!
0 Kudos
Altera_Forum
Honored Contributor II
600 Views

 

--- 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!
0 Kudos
Reply