You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever i use analogRead(), an unrelated interrupt will also trigger, and by changing around a little i could even get 2 interrupts to trigger with every analogRead().
I have not testet every analog pin, but so far this bug happens with A0, A3, A4, A5, A6, A7, but not A10, A11, A12, A13, A14.
I can reproduce the issue with the code below - every 2 seconds it will trigger AnalogRead() and this will trigger one of the button Interrupts. I have have multiple components hooked up as well, but this did not seem to change anything when i tried removing some of them, or having the button GPIOs unconnected.
Hey
Tried the code you posted along with just the board, and yes, the interrupts are being triggered.
If you're looking for a workaround
Change the Pull type to PULLDOWN (and of course you should change the button trigger from GND to Vcc since it's pulled down)
Also, maybe you already know this , but just in case, it's never good to Serial.println() inside of an ISR. The best idea would be to update a volatile bool inside of ISR and based on the bool, print in void loop()
I have tried this with ESP32, C3, S2 and S3 and could not reproduce...
I'm closing this issue. If anyone experiences this error again, fell free to reopen this issue, or open a new one. Please don't forget to add as much info as possible.
I am experiencing a strange bug:
Whenever i use analogRead(), an unrelated interrupt will also trigger, and by changing around a little i could even get 2 interrupts to trigger with every analogRead().
I have not testet every analog pin, but so far this bug happens with A0, A3, A4, A5, A6, A7, but not A10, A11, A12, A13, A14.
I can reproduce the issue with the code below - every 2 seconds it will trigger AnalogRead() and this will trigger one of the button Interrupts. I have have multiple components hooked up as well, but this did not seem to change anything when i tried removing some of them, or having the button GPIOs unconnected.
The text was updated successfully, but these errors were encountered: