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).