aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
index 19269617e..73ee37681 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
@@ -241,7 +241,8 @@
#error "unsupported STM32 platform for OTG functionality"
#endif
-#if STM32_USBCLK != 48000000
+/* Allowing for a small tolerance.*/
+#if STM32_USBCLK < 47880000 || STM32_USBCLK > 48120000
#error "the USB OTG driver requires a 48MHz clock"
#endif