USB host (for MSD) example and test problem at USB1 interface in LPC54618.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB host (for MSD) example and test problem at USB1 interface in LPC54618.

跳至解决方案
1,543 次查看
toipaz
Contributor III


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.

 

0 项奖励
回复
1 解答
1,523 次查看
toipaz
Contributor III

The USB hw block did not work properly because the GND wiring of the USB circuit was connected incorrectly.
Corrected the GND wiring and it worked normally.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,537 次查看
toipaz
Contributor III

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?

0 项奖励
回复
1,524 次查看
toipaz
Contributor III

The USB hw block did not work properly because the GND wiring of the USB circuit was connected incorrectly.
Corrected the GND wiring and it worked normally.

0 项奖励
回复