1. Environment:
SDK v2.9.0
CPU: LPC54618
example Code: host_msd_fatfs_freertos
2. Goal: USB 2.0 Host MSD @ USB1 interface
3. Problem
The example code only supports OHCI.
Referring to Datasheet, USB1 is EHCI compliant.
Using EHCI in the example, it is not built with a compile error saying that there is no ehci driver source.
4. Questions
4.1. When using usb1 interface, does it work with ohci?
4.2. Can I specify that the example source uses usb1 interface?
attachement: test project code.
已解决! 转到解答。
As I looked at the datasheet and manuals, it says that it uses USB_HOST_CONFIG_IP3516HS.
So
in usb_host_config.h, we test it by changing it as follows.:
#define USB_HOST_CONFIG_OHCI (0U)
#define USB_HOST_CONFIG_IP3516HS (1U)
After that, it'll be waiting forever at the while() statement in usb_host_ip3156hs.c as below.:
static usb_status_t USB_HostIp3516HsControllerReset(usb_host_ip3516hs_state_struct_t *usbHostState)
{
usbHostState->usbRegBase->USBCMD = USB_HOST_IP3516HS_USBCMD_HCRESET_MASK;
while (0U != (usbHostState->usbRegBase->USBCMD & USB_HOST_IP3516HS_USBCMD_HCRESET_MASK))
{
__NOP();
}
return kStatus_USB_Success;
}
The USB1 RESET command is not completed, where should I start to find bug?