Skip to content

Commit ca4b1ed

Browse files
committed
HardwareTimer: Fix incoherent ICPolarity initial setting
Signed-off-by: Alexandre Bourdiol <[email protected]>
1 parent 1ff37f0 commit ca4b1ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/HardwareTimer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ void HardwareTimer::setMode(uint32_t channel, TimerModes_t mode, PinName pin)
652652
channelOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
653653
#endif
654654
#endif
655-
channelIC.ICPolarity = TIMER_NOT_USED;
655+
channelIC.ICPolarity = TIM_ICPOLARITY_RISING;
656656
channelIC.ICSelection = TIM_ICSELECTION_DIRECTTI;
657657
channelIC.ICPrescaler = TIM_ICPSC_DIV1;
658658
channelIC.ICFilter = 0;

0 commit comments

Comments
 (0)