diff --git a/cores/arduino/HardwareTimer.cpp b/cores/arduino/HardwareTimer.cpp index d26e8342b8..a7142630a5 100644 --- a/cores/arduino/HardwareTimer.cpp +++ b/cores/arduino/HardwareTimer.cpp @@ -1248,7 +1248,7 @@ timer_index_t get_timer_index(TIM_TypeDef *instance) #endif #if defined(TIM22_BASE) if (instance == TIM22) { - index = TIMER2_INDEX; + index = TIMER22_INDEX; } #endif return index;