aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/pwm_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-24 20:49:28 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-24 20:49:28 +0000
commitea76e46321f31f09db8c620ab249a5a230934f66 (patch)
treeab87918d3622a801f380716c272a4b17b5da48a8 /os/hal/platforms/STM32/pwm_lld.c
parentebf1e0a6041726db3ea64434fd1b439307c39c7d (diff)
downloadChibiOS-ea76e46321f31f09db8c620ab249a5a230934f66.tar.gz
ChibiOS-ea76e46321f31f09db8c620ab249a5a230934f66.tar.bz2
ChibiOS-ea76e46321f31f09db8c620ab249a5a230934f66.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2527 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 8c8f56920..6970217e7 100644
--- a/os/hal/platforms/STM32/pwm_lld.c
+++ b/os/hal/platforms/STM32/pwm_lld.c
@@ -105,7 +105,8 @@ PWMDriver PWMD5;
static void serve_interrupt(PWMDriver *pwmp) {
uint16_t sr;
- sr = pwmp->pd_tim->SR & pwmp->pd_tim->DIER;
+ sr = pwmp->pd_tim->SR;
+ sr &= pwmp->pd_tim->DIER;
pwmp->pd_tim->SR = ~(TIM_SR_CC1IF | TIM_SR_CC2IF | TIM_SR_CC3IF |
TIM_SR_CC4IF | TIM_SR_UIF);
if ((sr & TIM_SR_CC1IF) != 0)