Skip to content

Commit 7d54df6

Browse files
author
Cruz Monrreal
authored
Merge pull request #7993 from evva-sfw/hotfix/efm32_hal_pwmout_set_period_fix
Fix EFM32 pwmout hal function pwmout_period
2 parents 9f3437a + dd2e93f commit 7d54df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/pwmout_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ void pwmout_period(pwmout_t *obj, float seconds)
302302
}
303303

304304
//Check if anything changed
305-
if(((PWM_TIMER->CTRL & ~_TIMER_CTRL_PRESC_MASK) == (pwm_prescaler_div << _TIMER_CTRL_PRESC_SHIFT)) && (TIMER_TopGet(PWM_TIMER) == cycles)) return;
305+
if(((PWM_TIMER->CTRL & _TIMER_CTRL_PRESC_MASK) == (pwm_prescaler_div << _TIMER_CTRL_PRESC_SHIFT)) && (TIMER_TopGet(PWM_TIMER) == cycles)) return;
306306

307307
//Save previous period for recalculation of duty cycles
308308
uint32_t previous_period_cycles = PWM_TIMER->TOPB;

0 commit comments

Comments
 (0)