Skip to content

Commit 701e9cb

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

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
@@ -647,7 +647,7 @@ void HardwareTimer::setMode(uint32_t channel, TimerModes_t mode, PinName pin)
647647
channelOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
648648
#endif
649649
#endif
650-
channelIC.ICPolarity = TIMER_NOT_USED;
650+
channelIC.ICPolarity = TIM_ICPOLARITY_RISING;
651651
channelIC.ICSelection = TIM_ICSELECTION_DIRECTTI;
652652
channelIC.ICPrescaler = TIM_ICPSC_DIV1;
653653
channelIC.ICFilter = 0;

0 commit comments

Comments
 (0)