Page 1 of 1

Esp32 gpio pins ISR misfired

Posted: Tue Dec 22, 2020 2:30 pm
by MobileMicro
I have esp32 devkit plugged into the breadboard to test out motor rpm sensor attaching simple gpio pin ISR with rising. The kit is also communicating with Dshot esc via uart and another gpio port directly. When the motor battery is plugged in , the gpio pin which is not even wired to rpm sensor signal line constantly misfires. Is there a way to fix this problem. When the motor battery is taken off, this problem doesn’t appear to happen.

Thanks

Re: Esp32 gpio pins ISR misfired

Posted: Tue Dec 22, 2020 2:44 pm
by ESP_Sprite
If nothing is connected to it, the GPIO will act as an antenna and pick up any ambient noise, for instance as generate by the motor.

Re: Esp32 gpio pins ISR misfired

Posted: Tue Dec 22, 2020 3:18 pm
by liebman
Maybe add (or enable) a pull-down resistor?

Re: Esp32 gpio pins ISR misfired

Posted: Tue Dec 22, 2020 3:47 pm
by MobileMicro
Is there a better way to filter out the noise ? I think it likely comes from esc which is connected to one gpio pin and uart pin plus the gnd. Decoupling capacitor for esc probably is not an option at this moment.

Re: Esp32 gpio pins ISR misfired

Posted: Tue Dec 22, 2020 6:15 pm
by MobileMicro
Enabled pulldown resistor, but it still misfires a lot

Re: Esp32 gpio pins ISR misfired

Posted: Wed Dec 23, 2020 1:34 am
by ESP_Sprite
MobileMicro wrote:
Tue Dec 22, 2020 6:15 pm
Enabled
You mean in software? If so, that's only a 50K'ish pullup; you may want to add a much lower external pullup instead.

Re: Esp32 gpio pins ISR misfired

Posted: Wed Dec 23, 2020 6:16 pm
by MobileMicro
I have 2k external pullup/down resistor plugged in. But it still behaves the same. Even if the gpio pin is plugged in gnd, it still misfire when battery is on with esc which has same ground.

Re: Esp32 gpio pins ISR misfired

Posted: Wed Dec 23, 2020 6:24 pm
by liebman
Are there any other GPIOs used for interrupts? (especially if they are edge interrupts)

Re: Esp32 gpio pins ISR misfired

Posted: Thu Dec 24, 2020 3:50 pm
by MobileMicro
No other pins are used for edge interrupt. One pin is using rmt to talk to esc. And if I take this off, no misfire but functions will not work. What I have found is that the interrupt pin somehow is corrupted due to this rmt pin connected to esc. When esc is off power, no corruption. Is the esp32 hardware having issues ?