GPIO gives Multiple Interrupt events for single interrupt generation
-
- Posts: 62
- Joined: Wed Apr 19, 2017 6:35 am
GPIO gives Multiple Interrupt events for single interrupt generation
Hello,
I have set several GPIOs for interrupt mode with Negative edge interrupt. In the ISR, I check the gpio level of respective GPIO. I am getting multiple times interrupt event for single interrupt generation (pressing push-button), getting gpio level '0' (using gpio_get_level()) first time and then level '1' for rest of the (bug) interrupt events, which are normally 2-3 times.
Can anyone have idea why I am getting multiple times interrupt event for single interrupt generation.? Push button is used to generate interrupt.
My configurations are as below:
int_type: GPIO_INTR_NEGEDGE,
pull_up: GPIO_PULLUP_ENABLE,
pull_down: GPIO_PULLDOWN_DISABLE. GPIOs 5,16,0 with ESP32 Dev kit. with ESP IDFv2.0.
Thank You.
I have set several GPIOs for interrupt mode with Negative edge interrupt. In the ISR, I check the gpio level of respective GPIO. I am getting multiple times interrupt event for single interrupt generation (pressing push-button), getting gpio level '0' (using gpio_get_level()) first time and then level '1' for rest of the (bug) interrupt events, which are normally 2-3 times.
Can anyone have idea why I am getting multiple times interrupt event for single interrupt generation.? Push button is used to generate interrupt.
My configurations are as below:
int_type: GPIO_INTR_NEGEDGE,
pull_up: GPIO_PULLUP_ENABLE,
pull_down: GPIO_PULLDOWN_DISABLE. GPIOs 5,16,0 with ESP32 Dev kit. with ESP IDFv2.0.
Thank You.
Re: GPIO gives Multiple Interrupt events for single interrupt generation
Contact bounce maybe?
Re: GPIO gives Multiple Interrupt events for single interrupt generation
Hi,
I and Rahul are working together for this stuffs and we have used same gpio_test.c file from examples/periphirals/gpio section.
So, We have simply tested GPIO0 button which is on ESP32 Development Kit and have verified that we are getting multiple ISR calls with GPIO Level 0 and 1 for single press or release after settings Negative or Positive Edge Trigger.
Please let us know if anyone has any idea or is it still bug into ESP32-IDF 2.0 Official Release SDK.
I and Rahul are working together for this stuffs and we have used same gpio_test.c file from examples/periphirals/gpio section.
So, We have simply tested GPIO0 button which is on ESP32 Development Kit and have verified that we are getting multiple ISR calls with GPIO Level 0 and 1 for single press or release after settings Negative or Positive Edge Trigger.
Please let us know if anyone has any idea or is it still bug into ESP32-IDF 2.0 Official Release SDK.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: GPIO gives Multiple Interrupt events for single interrupt generation
No, There is no any issue of contact Debounce as we have verified it into Arduino DUE board in which it is working fine without any issue after setting Negative or Positive Edge Trigger.sintech wrote:Contact bounce maybe?
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: GPIO gives Multiple Interrupt events for single interrupt generation
We checked into Arduino DUE board in which it is working fine without any issue so it means no any issue of Switch Bounce or De-Bounce issue.
Regards,
Ritesh Prajapati
Ritesh Prajapati
- martinayotte
- Posts: 141
- Joined: Fri Nov 13, 2015 4:27 pm
Re: GPIO gives Multiple Interrupt events for single interrupt generation
Switches always have bounces, so don't rely on the fact that you were not able to reproduce the issue on DUE.Ritesh wrote:We checked into Arduino DUE board
Check with an oscilloscope like shown on the article mentioned above.
Re: GPIO gives Multiple Interrupt events for single interrupt generation
Ok. We will check using CRO. But my concern is that we have used same mechanism like GPIO pull up and Negative Edge configurations for GPIO interrupt and getting multiple time interrupt for single press.martinayotte wrote:Switches always have bounces, so don't rely on the fact that you were not able to reproduce the issue on DUE.Ritesh wrote:We checked into Arduino DUE board
Check with an oscilloscope like shown on the article mentioned above.
That is why I have compared with Arduino DUE as we checked same on that board which is working fine without any issue.
Regards,
Ritesh Prajapati
Ritesh Prajapati
-
- Posts: 6
- Joined: Mon Feb 13, 2017 1:07 pm
Re: GPIO gives Multiple Interrupt events for single interrupt generation
I'm not much of a HW guy, but my guess would be the speed. Maybe there is a bounce, but for the Due it's so fast it's negligible.
The ESP32 may "sample" a bit faster, so it gets more sensitive to that.
I'm just basing this on the clock speed.
But the oscilloscope will show everything though.
The ESP32 may "sample" a bit faster, so it gets more sensitive to that.
I'm just basing this on the clock speed.
But the oscilloscope will show everything though.
Re: GPIO gives Multiple Interrupt events for single interrupt generation
Hi,Hubberthus wrote:I'm not much of a HW guy, but my guess would be the speed. Maybe there is a bounce, but for the Due it's so fast it's negligible.
The ESP32 may "sample" a bit faster, so it gets more sensitive to that.
I'm just basing this on the clock speed.
But the oscilloscope will show everything though.
We are running our code into ESP32 with CPU clock speed as maximum 240 MHz while Arduino DUE is running into 86 MHz approximately.
Still we will check using CRO as well..
Regards,
Ritesh Prajapati
Ritesh Prajapati
Who is online
Users browsing this forum: No registered users and 262 guests