aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/icu_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32/icu_lld.c')
-rw-r--r--os/hal/platforms/STM32/icu_lld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/icu_lld.c b/os/hal/platforms/STM32/icu_lld.c
index 82fb39769..703c9dea5 100644
--- a/os/hal/platforms/STM32/icu_lld.c
+++ b/os/hal/platforms/STM32/icu_lld.c
@@ -103,7 +103,8 @@ ICUDriver ICUD8;
static void icu_lld_serve_interrupt(ICUDriver *icup) {
uint16_t sr;
- sr = icup->tim->SR & icup->tim->DIER;
+ sr = icup->tim->SR;
+ sr &= icup->tim->DIER;
icup->tim->SR = ~sr;
if (icup->config->channel == ICU_CHANNEL_1) {
if ((sr & TIM_SR_CC1IF) != 0)