I would like to reset the value of a timer counter in an ISR. Is this safe? Do I need to take any precautions (semaphore, portENTER_CRITICAL_ISR)?
Example:
Code: Select all
void ARDUINO_ISR_ATTR myISR() {
timerWrite(timer, newValue);
timerRestart(timer);
}