Interrupt speed

Interrupt handling in arduino ide is bit slow. Now the question is which is the better interrupt handling Arduino IDE or PlatformIO?. Which is most speed compares boths?

IDEs don’t do interrupt handling, the micro controller does the interrupt handling Oo.
I have not tried the Arduino IDE, so I don’t know how fast the stuff there is, might be the debugging overhead that makes the interrupt response slow. But if the stuff is executed directly on the micro controller, both responses should be the same speed.(PlatformIO uses the Arduino Framework).

1 Like

Im arduino ide user so im getting slow interrupt in esp32 dev kit . Can i overcome the problem using platformIO?


This is absolutely correct. PlatformIO is just a build system to build your firmware. The code doesn’t magically execute faster if a different build system invokes the GCC compiler.

What might make a slight difference is applied optimization flags, i.e. -O3 over -O2 or -Os. With PIO it’s possible to alter this using the directives

build_unflags = -Os
build_flags = -O3

However, the compiler can do very little if the code is just designed to be slow.

If you want help on making the interrupt handling code faster, you would need to show us the affected code.


As pointed out above, the IDE (Arduino, PlatformIO, Eclipse, whatever) does not do interrupt handling… the micro-controller does. If it’s slow, it’s because of your code. It’s either not optimised well enough, you have serial logging or other tasks happening which are blocking, you haven’t played with the compiler optimisation flags enough, or your expectations don’t match reality. To be able to help you out further, we’ll need a summary of your goal/setup (what are you trying to do?) and your code (how are you trying to do it).