Clearing the interrupt occurred flag before gpio_intr_enable

Superkurt
Posts: 15
Joined: Thu Mar 03, 2016 11:38 pm

Clearing the interrupt occurred flag before gpio_intr_enable

Postby Superkurt » Sun May 07, 2017 11:33 pm

Hello,

In my program I use gpio interrupts. In the ISR I disable the interrupt and send a signal to a freertos task. The task do some work and then enable the interrupt again. If in the meantime where the interrupt was disabled an gpio interrupt has occurred the ISR will be called immediately. But I don't want this. I would clear the "gpio interrupt has occured" flag manually, so that after enabling the interrupt again only an interrupt after that point in time will trigger the ISR. In the end I would ignore all interrupts that had ocurred between gpio_intr_disable and gpio_intr_enable.

Is it possible to clear the interrupt occurred flag manually?

Thanks in advance.


Superkurt
Posts: 15
Joined: Thu Mar 03, 2016 11:38 pm

Re: Clearing the interrupt occurred flag before gpio_intr_enable

Postby Superkurt » Mon May 08, 2017 6:38 pm

Thanks for your support! That's working!

thoraz
Posts: 27
Joined: Tue Jan 28, 2020 4:02 pm

Re: Clearing the interrupt occurred flag before gpio_intr_enable

Postby thoraz » Thu Nov 11, 2021 12:19 pm

I think the code is changed since 2017 (in the 365 and 372 lines there are only curly brackets). Is possible to have the function that clear the flag? Is the gpio_hal_clear_intr_status()? And how I should use it?

Who is online

Users browsing this forum: No registered users and 127 guests