mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-07 10:21:30 +00:00
fix a bug with USB1, but still cannot get interrupt occurred on USB1
This commit is contained in:
parent
58b41a05db
commit
60d444b452
@ -23,7 +23,7 @@
|
|||||||
* warranty that such application will be suitable for the specified
|
* warranty that such application will be suitable for the specified
|
||||||
* use without further testing or modification.
|
* use without further testing or modification.
|
||||||
* Permission to use, copy, modify, and distribute this software and its
|
* Permission to use, copy, modify, and distribute this software and its
|
||||||
* documentation is hereby granted, under NXP Semiconductors’
|
* documentation is hereby granted, under NXP Semiconductors<EFBFBD>
|
||||||
* relevant copyright in the software, without fee, provided that it
|
* relevant copyright in the software, without fee, provided that it
|
||||||
* is used in conjunction with NXP Semiconductors microcontrollers. This
|
* is used in conjunction with NXP Semiconductors microcontrollers. This
|
||||||
* copyright, permission, and disclaimer notice must appear in all copies of
|
* copyright, permission, and disclaimer notice must appear in all copies of
|
||||||
@ -200,6 +200,7 @@ uint32_t CGU_Init(void){
|
|||||||
// Disable PLL1 CPU hang???
|
// Disable PLL1 CPU hang???
|
||||||
//CGU_EnableEntity(CGU_CLKSRC_PLL1, DISABLE);
|
//CGU_EnableEntity(CGU_CLKSRC_PLL1, DISABLE);
|
||||||
CGU_SetPLL1(6);
|
CGU_SetPLL1(6);
|
||||||
|
// CGU_SetPLL1(5);
|
||||||
CGU_EnableEntity(CGU_CLKSRC_PLL1, ENABLE);
|
CGU_EnableEntity(CGU_CLKSRC_PLL1, ENABLE);
|
||||||
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_M4);
|
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_M4);
|
||||||
CGU_UpdateClock();
|
CGU_UpdateClock();
|
||||||
|
@ -256,6 +256,7 @@ static void lpc43xx_controller_init(uint8_t coreid)
|
|||||||
|
|
||||||
lpc_usb->USBCMD_D &= ~0x00FF0000; // Interrupt Threshold Interval = 0
|
lpc_usb->USBCMD_D &= ~0x00FF0000; // Interrupt Threshold Interval = 0
|
||||||
lpc_usb->ENDPOINTLISTADDR = (uint32_t) p_dcd->qhd; // Endpoint List Address has to be 2K alignment
|
lpc_usb->ENDPOINTLISTADDR = (uint32_t) p_dcd->qhd; // Endpoint List Address has to be 2K alignment
|
||||||
|
lpc_usb->USBSTS_D = lpc_usb->USBSTS_D;
|
||||||
lpc_usb->USBINTR_D = INT_MASK_USB | INT_MASK_ERROR | INT_MASK_PORT_CHANGE | INT_MASK_RESET | INT_MASK_SUSPEND; // | INT_MASK_SOF| INT_MASK_NAK;
|
lpc_usb->USBINTR_D = INT_MASK_USB | INT_MASK_ERROR | INT_MASK_PORT_CHANGE | INT_MASK_RESET | INT_MASK_SUSPEND; // | INT_MASK_SOF| INT_MASK_NAK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ tusb_error_t hal_init(void)
|
|||||||
#if TUSB_CFG_CONTROLLER_1_MODE & TUSB_MODE_HOST
|
#if TUSB_CFG_CONTROLLER_1_MODE & TUSB_MODE_HOST
|
||||||
LPC_USB1->USBMODE_H = LPC43XX_USBMODE_HOST | (LPC43XX_USBMODE_VBUS_HIGH << 5);
|
LPC_USB1->USBMODE_H = LPC43XX_USBMODE_HOST | (LPC43XX_USBMODE_VBUS_HIGH << 5);
|
||||||
#else // TODO OTG
|
#else // TODO OTG
|
||||||
LPC_USB0->USBMODE_D = LPC43XX_USBMODE_DEVICE;
|
LPC_USB1->USBMODE_D = LPC43XX_USBMODE_DEVICE;
|
||||||
dcd_controller_connect(1);
|
dcd_controller_connect(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user