summaryrefslogtreecommitdiffstats
path: root/platforms/chibios/drivers/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/chibios/drivers/serial.c')
-rw-r--r--platforms/chibios/drivers/serial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/platforms/chibios/drivers/serial.c b/platforms/chibios/drivers/serial.c
index 3fae5cd3a4..0dd8e71ae8 100644
--- a/platforms/chibios/drivers/serial.c
+++ b/platforms/chibios/drivers/serial.c
@@ -20,7 +20,8 @@
# error "chSysPolledDelayX method not supported on this platform"
#else
# undef wait_us
-# define wait_us(x) chSysPolledDelayX(US2RTC(CPU_CLOCK, x))
+// Force usage of polled waiting - in case WAIT_US_TIMER is activated
+# define wait_us(us) chSysPolledDelayX(US2RTC(REALTIME_COUNTER_CLOCK, us))
#endif
#ifndef SELECT_SOFT_SERIAL_SPEED