aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/pwm_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-23 09:53:42 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-23 09:53:42 +0000
commit64431d076bc0c3415b54960a518289ec99ef9cbd (patch)
tree892ec48826c14ef93dc273d23df2604173ac436f /os/hal/platforms/STM32/pwm_lld.c
parent11a55ca41a489a805d512e2709c5fe72875c0724 (diff)
downloadChibiOS-64431d076bc0c3415b54960a518289ec99ef9cbd.tar.gz
ChibiOS-64431d076bc0c3415b54960a518289ec99ef9cbd.tar.bz2
ChibiOS-64431d076bc0c3415b54960a518289ec99ef9cbd.zip
Fixed bug 3598177.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4952 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/pwm_lld.c')
-rw-r--r--os/hal/platforms/STM32/pwm_lld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.c b/os/hal/platforms/STM32/pwm_lld.c
index dcd0d166f..a90c0b44a 100644
--- a/os/hal/platforms/STM32/pwm_lld.c
+++ b/os/hal/platforms/STM32/pwm_lld.c
@@ -104,7 +104,8 @@ PWMDriver PWMD8;
static void pwm_lld_serve_interrupt(PWMDriver *pwmp) {
uint16_t sr;
- sr = pwmp->tim->SR & pwmp->tim->DIER;
+ sr = pwmp->tim->SR;
+ sr &= pwmp->tim->DIER;
pwmp->tim->SR = ~sr;
if ((sr & TIM_SR_CC1IF) != 0)
pwmp->config->channels[0].callback(pwmp);