aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/UART/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32/UART/main.c')
-rw-r--r--testhal/STM32/UART/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/testhal/STM32/UART/main.c b/testhal/STM32/UART/main.c
index e111935d7..121a1f4cb 100644
--- a/testhal/STM32/UART/main.c
+++ b/testhal/STM32/UART/main.c
@@ -73,8 +73,9 @@ static void rxchar(uint16_t c) {
/* Flashing the LED each time a character is received.*/
palClearPad(IOPORT3, GPIOC_LED);
chSysLockFromIsr();
- if (!chVTIsArmedI(&vt2))
- chVTSetI(&vt2, MS2ST(200), ledoff, NULL);
+ if (chVTIsArmedI(&vt2))
+ chVTResetI(&vt2);
+ chVTSetI(&vt2, MS2ST(200), ledoff, NULL);
chSysUnlockFromIsr();
}