From 8498892265faa1c52c5475073da1c3916141311f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 12 May 2019 12:05:55 +0000 Subject: Small change on USB clock check. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12787 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3