Am I correct in thinking that the ESP32 timer peripheral has no integration with GPIO?
As far as I can tell, when a timer counter match (or "alarm" in their terminology) occurs, it can only trigger an interrupt. So you can't, for example, have a GPIO pin toggled in hardware on counter match?
One thing I am looking to do is to use a one-shot timer to implement an output pulse of a few hundred milliseconds on a GPIO pin with as little software involvement as possible. So far, as mentioned above, I don't think I can have a purely hardware-based solution. What are my alternatives?
From my research, other potential solutions seem to be:
- Simple delay - undesirable as it's not asynchronous
- ESP-IDF GPTimer API
- ESP-IDF High-Resolution Timer API
From reading the docs, it seems to me that the High-Resolution Timer API is basically an abstraction that allows multiple timers on top of a single hardware timer with a fixed 1 usec timebase. Whereas the GPTimer is more flexible, essentially a wrapper around the hardware timer peripheral.
One thing I would particularly like to have is to ensure with as much certainty as possible that the output pulse will be turned off after the desired period. What guarantees do these APIs provide that the callback function will be run when the timer alarm is triggered?