aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32')
-rw-r--r--os/hal/platforms/STM32/pwm_lld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.c b/os/hal/platforms/STM32/pwm_lld.c
index 56273b5a6..8c8f56920 100644
--- a/os/hal/platforms/STM32/pwm_lld.c
+++ b/os/hal/platforms/STM32/pwm_lld.c
@@ -535,7 +535,7 @@ void pwm_lld_enable_channel(PWMDriver *pwmp,
void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) {
*(&pwmp->pd_tim->CCR1 + (channel * 2)) = 0;
- pwmp->pd_tim->DIER = ~(2 << channel);
+ pwmp->pd_tim->DIER &= ~(2 << channel);
pwmp->pd_enabled_channels &= ~(1 << channel);
}