Skip to content

Commit 9589e87

Browse files
fix pwm config for channel 4 (#635)
* fix pwm config for channel 4 (thanks @FoniksFox) * Create hotfix-pwm-channel4.md
1 parent a6be4c8 commit 9589e87

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.changesets/hotfix-pwm-channel4.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release: patch
2+
summary: fix pwm channel 4 config in TimerWrapper

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)