I'm having problems with external interrupt latency in my 'DIY Oscilloscope" project using the Arduino IDE. I'm assuming that this is mostly due to the processor attempting to save and restore processor context at the entrance and exit from the ISR. Is there any way to reduce the ISR overhead? I'm guessing that it would involve reducing the context save/restore to the bare minimum needed by the ISR code, possibly by programming in assembly language (with Arduino IDE or some other development environment)?
Alternative, I might need to switch to an ESP32 module (or does this not reduce the latency problem somewhat, but not into insignificance)? The ESP32-cam looks like one possibility, although I would like it to have more than 10 I/O pins. Other candidates are "ESP32 Pico" ($15 from Adafruit), or TinyPICO (a bit expensive).
Edit: The other annoyance is the large amount of time that passes between the end of the 'loop' and re-entering it...seems to be about 6.5 uS.
Alternative, I might need to switch to an ESP32 module (or does this not reduce the latency problem somewhat, but not into insignificance)? The ESP32-cam looks like one possibility, although I would like it to have more than 10 I/O pins. Other candidates are "ESP32 Pico" ($15 from Adafruit), or TinyPICO (a bit expensive).
Edit: The other annoyance is the large amount of time that passes between the end of the 'loop' and re-entering it...seems to be about 6.5 uS.
Last edited: