diff options
| author | Ha Thach <[email protected]> | 2020-11-07 10:52:14 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-07 10:52:14 +0700 |
| commit | a708ab62540cf952048c97e6952bd95fdc823d90 (patch) | |
| tree | 9280e1a6138859d765af4b2c4aae7dc62a620e75 /hw | |
| parent | 075334af80303488a8c874255d725cb4ca15a7de (diff) | |
| parent | 2907b1e4382df313ba8eb713fa4d0e3d3bc6e7cf (diff) | |
Merge pull request #553 from hathach/host-async-control
Host async control
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/ea4088qs/ea4088qs.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/hw/bsp/ea4088qs/ea4088qs.c b/hw/bsp/ea4088qs/ea4088qs.c index f164526d7..b25f9101c 100644 --- a/hw/bsp/ea4088qs/ea4088qs.c +++ b/hw/bsp/ea4088qs/ea4088qs.c @@ -98,6 +98,11 @@ void SystemInit(void) Chip_IOCON_Init(LPC_IOCON); Chip_IOCON_SetPinMuxing(LPC_IOCON, pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T)); + + /* CPU clock source starts with IRC */ + /* Enable PBOOST for CPU clock over 100MHz */ + Chip_SYSCTL_EnableBoost(); + Chip_SetupXtalClocking(); } @@ -130,13 +135,15 @@ void board_init(void) Chip_USB_Init(); enum { - USBCLK = 0x1B // Host + Device + OTG + AHB + USBCLK_DEVCIE = 0x12, // AHB + Device + USBCLK_HOST = 0x19 , // AHB + OTG + Host + USBCLK_ALL = 0x1B // Host + Device + OTG + AHB }; - LPC_USB->OTGClkCtrl = USBCLK; - while ( (LPC_USB->OTGClkSt & USBCLK) != USBCLK ) {} + LPC_USB->OTGClkCtrl = USBCLK_ALL; + while ( (LPC_USB->OTGClkSt & USBCLK_ALL) != USBCLK_ALL ) {} - // USB1 = host, USB2 = device + // set portfunc: USB1 = host, USB2 = device LPC_USB->StCtrl = 0x3; } |
