Skip to content

Commit 8a7fc16

Browse files
ABOSTMfpistm
authored andcommitted
HardwareTimer: start timer in case only CC interrupts are used
Start timer in case only CaptureCompare interrupts are used, without update interrupt (and without pin used). fixes #1544 Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
1 parent 375f6fb commit 8a7fc16

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cores/arduino/HardwareTimer.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,13 @@ void HardwareTimer::resumeChannel(uint32_t channel)
439439
HAL_TIM_IC_Start(&(_timerObj.handle), timChannel);
440440
}
441441
break;
442-
case TIMER_NOT_USED:
443442
case TIMER_OUTPUT_COMPARE:
443+
case TIMER_DISABLED:
444+
if (!LL_TIM_IsEnabledCounter(_timerObj.handle.Instance)) {
445+
HAL_TIM_Base_Start(&(_timerObj.handle));
446+
}
447+
break;
448+
case TIMER_NOT_USED:
444449
default :
445450
break;
446451
}

0 commit comments

Comments
 (0)