summaryrefslogtreecommitdiff
path: root/platforms/chibios/bootloaders/rp2040.c
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/chibios/bootloaders/rp2040.c')
-rw-r--r--platforms/chibios/bootloaders/rp2040.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/platforms/chibios/bootloaders/rp2040.c b/platforms/chibios/bootloaders/rp2040.c
index 13a54036ef..bedc00f32e 100644
--- a/platforms/chibios/bootloaders/rp2040.c
+++ b/platforms/chibios/bootloaders/rp2040.c
@@ -43,9 +43,8 @@ void __late_init(void) {
if (magic_location != magic_token) {
magic_location = magic_token;
// ChibiOS is not initialized at this point, so sleeping is only
- // possible via busy waiting. The internal timer peripheral is running
- // at this point with a precision of 1us.
- chSysPolledDelayX(MS2RTC(1 * MHZ, RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT));
+ // possible via busy waiting.
+ wait_us(RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT * 1000U);
magic_location = 0;
return;
}