Fix USB on Kinetis devices

Set correct SYSMPU register for proper USB operation.  This bug was
introduced when the SYSMPU register names and defines were updated
in the commit:
"K64F: Updated the SYSMPU SDK driver"
93f8cfed05
feature-hal-spec-usb-device
Russ Butler 2018-06-08 10:53:16 -05:00
parent c31dfbc174
commit 589b7f626d
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ void USBPhyHw::init(USBPhyEvents *events)
MPU->CESR=0;
#endif
#if (defined(FSL_FEATURE_SOC_SYSMPU_COUNT) && (FSL_FEATURE_SOC_SYSMPU_COUNT > 0U))
SYSMPU->CESR=0;
#endif
#if defined(TARGET_KL43Z) || defined(TARGET_K22F) || defined(TARGET_K64F)
// enable USBFS clock
CLOCK_EnableUsbfs0Clock(kCLOCK_UsbSrcIrc48M, 48000000U);