- add scu_pinmux(0x2, 5, MD_PLN | MD_EZI | MD_ZI, FUNC2); // USB1_VBUS monitor presence

- USB1 host run ok with NGX4330
This commit is contained in:
hathach
2013-04-08 14:57:00 +07:00
parent ef850984da
commit 94e25880dc
5 changed files with 6 additions and 2 deletions

View File

@@ -78,6 +78,7 @@ tusb_error_t hal_init(void)
#if TUSB_CFG_CONTROLLER1_MODE
/* connect CLK_USB1 to 60 MHz clock */
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_USB1); /* FIXME Run base BASE_USB1_CLK clock from PLL1 (assume PLL1 is 60 MHz, no division required) */
LPC_CREG->CREG0 &= ~(1<<5); /* Turn on the phy */
LPC_SCU->SFSUSB = (TUSB_CFG_CONTROLLER1_MODE & TUSB_MODE_HOST) ? 0x16 : 0x12; // enable USB1 with on-chip FS PHY
#if TUSB_CFG_CONTROLLER1_MODE & TUSB_MODE_HOST