Skip to content

Commit 7711df7

Browse files
fix pwm config for channel 4
(thanks @FoniksFox)
1 parent 49e4ad7 commit 7711df7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Inc/HALAL/Services/Time/TimerWrapper.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ template <const TimerDomain::Timer& dev> struct TimerWrapper {
616616
CLEAR_BIT(tmpccmrx, TIM_CCMR2_OC4M);
617617
CLEAR_BIT(tmpccmrx, TIM_CCMR2_CC4S);
618618

619-
SET_BIT(tmpccmrx, OC_Config->OCMode);
619+
SET_BIT(tmpccmrx, OC_Config->OCMode << 8U);
620620
CLEAR_BIT(tmpccer, TIM_CCER_CC4P);
621621
SET_BIT(tmpccer, OC_Config->OCPolarity << 12U);
622622
} else if constexpr (ch == TimerChannel::CHANNEL_5) {

0 commit comments

Comments
 (0)