mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7993 from evva-sfw/hotfix/efm32_hal_pwmout_set_period_fix
Fix EFM32 pwmout hal function pwmout_periodpull/8208/head
commit
7d54df66b1
|
@ -302,7 +302,7 @@ void pwmout_period(pwmout_t *obj, float seconds)
|
|||
}
|
||||
|
||||
//Check if anything changed
|
||||
if(((PWM_TIMER->CTRL & ~_TIMER_CTRL_PRESC_MASK) == (pwm_prescaler_div << _TIMER_CTRL_PRESC_SHIFT)) && (TIMER_TopGet(PWM_TIMER) == cycles)) return;
|
||||
if(((PWM_TIMER->CTRL & _TIMER_CTRL_PRESC_MASK) == (pwm_prescaler_div << _TIMER_CTRL_PRESC_SHIFT)) && (TIMER_TopGet(PWM_TIMER) == cycles)) return;
|
||||
|
||||
//Save previous period for recalculation of duty cycles
|
||||
uint32_t previous_period_cycles = PWM_TIMER->TOPB;
|
||||
|
|
Loading…
Reference in New Issue