Skip to content

Commit b41ae93

Browse files
committed
merge weird
1 parent d47da3d commit b41ae93

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Src/HALAL/Models/TimerPeripheral/TimerPeripheral.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ void TimerPeripheral::init() {
4949
handle->Init.CounterMode = TIM_COUNTERMODE_UP;
5050
for (PWMData pwm_data : init_data.pwm_channels) {
5151
if (pwm_data.mode == PHASED) {
52-
handle->Init.CounterMode = TIM_COUNTERMODE_CENTERALIGNED1;
53-
break;
52+
handle->Init.CounterMode = TIM_COUNTERMODE_CENTERALIGNED3;
53+
handle->Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
54+
break;
5455
}
5556
}
5657
handle->Init.Period = init_data.period;

0 commit comments

Comments
 (0)