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
pull/7228/head
Russ Butler 2018-06-08 10:53:33 -05:00 committed by adbridge
parent 0aff4e836b
commit 607f78213d
1 changed files with 5 additions and 0 deletions

View File

@ -100,6 +100,11 @@ USBHAL::USBHAL(void) {
#if (defined(FSL_FEATURE_SOC_MPU_COUNT) && (FSL_FEATURE_SOC_MPU_COUNT > 0U))
MPU->CESR=0;
#endif
#if (defined(FSL_FEATURE_SOC_SYSMPU_COUNT) && (FSL_FEATURE_SOC_SYSMPU_COUNT > 0U))
SYSMPU->CESR=0;
#endif
// fill in callback array
epCallback[0] = &USBHAL::EP1_OUT_callback;
epCallback[1] = &USBHAL::EP1_IN_callback;