From 8f7e1d18b943d1e2ba808f9a8e1e79cc78b6044e Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Wed, 2 May 2018 07:53:01 -0700 Subject: Always use IRC48M clock for USB on MK66F18 --- os/hal/ports/KINETIS/LLD/hal_usb_lld.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'os') diff --git a/os/hal/ports/KINETIS/LLD/hal_usb_lld.c b/os/hal/ports/KINETIS/LLD/hal_usb_lld.c index 694f5e2..a01b92e 100644 --- a/os/hal/ports/KINETIS/LLD/hal_usb_lld.c +++ b/os/hal/ports/KINETIS/LLD/hal_usb_lld.c @@ -407,6 +407,8 @@ void usb_lld_init(void) { #elif KINETIS_MCG_MODE == KINETIS_MCG_MODE_PEE +#if !defined(MK66F18) + /* Note: We don't need this for MK66F18, we can use IRC48M clock for USB */ #define KINETIS_USBCLK_FREQUENCY 48000000UL uint32_t i,j; for(i=0; i < 2; i++) { @@ -419,6 +421,7 @@ void usb_lld_init(void) { } usbfrac_match_found: osalDbgAssert(i<2 && j <8,"USB Init error"); +#endif #else /* KINETIS_MCG_MODE == KINETIS_MCG_MODE_PEE */ #error USB clock setting not implemented for this KINETIS_MCG_MODE -- cgit v1.2.3