mirror of https://github.com/ARMmbed/mbed-os.git
Fix EFM32 pwmout hal function pwmout_period
In pwmout_period() is a check for changed values, which is not working because of a wrongly used bitmask. This is fixed now.pull/7993/head
parent
3057c6c722
commit
dd2e93fbd3
|
@ -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