aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/gpt_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32/gpt_lld.c')
-rw-r--r--os/hal/platforms/STM32/gpt_lld.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/gpt_lld.c b/os/hal/platforms/STM32/gpt_lld.c
index ffbfe475c..8419cad68 100644
--- a/os/hal/platforms/STM32/gpt_lld.c
+++ b/os/hal/platforms/STM32/gpt_lld.c
@@ -325,6 +325,7 @@ void gpt_lld_stop(GPTDriver *gptp) {
if (gptp->state == GPT_READY) {
gptp->tim->CR1 = 0; /* Timer disabled. */
gptp->tim->DIER = 0; /* All IRQs disabled. */
+ gptp->tim->SR = 0; /* Clear eventual pending IRQs. */
#if STM32_GPT_USE_TIM1
if (&GPTD1 == gptp) {