Just wondering why you re-enable the alarm. IIRC When you set TIMERG0.hw_timer[0].config.autoreload it should remain enabled even after the alarm is triggered.
To quote the docs https://docs.espressif.com/projects/esp ... interrupts
I don't deny that it works, tho. I just tried it and it has fixed an issue i've been having. Just wondering if it's a mistake in the docs or if I'm just not interpreting them correctly.When auto_reload is enabled, the timer’s counter will automatically be reloaded to start counting again from a previously configured value. This value should be set in advance with timer_set_counter_value().