From 9df937b2ce9017fdb694630924f3ee0c53ba4c38 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 23 Dec 2012 09:53:31 +0000 Subject: [PATCH] Fixed bug 3598177. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.4.x@4951 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/icu_lld.c | 5 +++-- readme.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/os/hal/platforms/STM32/icu_lld.c b/os/hal/platforms/STM32/icu_lld.c index 0f8bc4bc7..f9305d786 100644 --- a/os/hal/platforms/STM32/icu_lld.c +++ b/os/hal/platforms/STM32/icu_lld.c @@ -106,8 +106,9 @@ ICUDriver ICUD8; static void icu_lld_serve_interrupt(ICUDriver *icup) { uint16_t sr; - sr = icup->tim->SR & icup->tim->DIER; - icup->tim->SR = 0; + sr = icup->tim->SR; + sr &= icup->tim->DIER; + icup->tim->SR = ~sr; if ((sr & TIM_SR_CC1IF) != 0) _icu_isr_invoke_period_cb(icup); if ((sr & TIM_SR_CC2IF) != 0) diff --git a/readme.txt b/readme.txt index 22cbcefcd..27e4f5866 100644 --- a/readme.txt +++ b/readme.txt @@ -79,6 +79,7 @@ ***************************************************************************** *** 2.4.3 *** +- FIX: Fixed warning in STM32 ICU driver using IAR compiler (bug 3598177). - FIX: Fixed typo in chOQGetEmptyI() macro (bug 3595910). - FIX: Fixed possible false detect of loaded prescaler in RTCv1 driver (bug 3595489).