lpcware

LPC1837 over OM13061 USB Host enumeration fail

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by brunoalmeida on Fri Jul 25 17:51:08 MST 2014
Hello LPCXpresso Support,

  I've been working with the sample code from link when i found out a problem. The code present in link is not enumerating a USB MassStorage while in host mode. What we found out about this problem:

  *software/LPCUSBLib/Drivers/USB/Core/HCD/EHCI/EHCI.c:889 - void HcdIrqHandler(uint8_t HostID)

  After intercepting the USB interruption, USB_REG(HostID)->USBINTR_H register have 0x000c0026 and USB_REG(HostID)->USBSTS_H have 0x00008088. At line 893 the operation USB_REG(HostID)->USBSTS_H & t where t = USB_REG(HostID)->USBINTR_H the result is 0, so its not possible to handle the rest of the interruptions (EHC_USBSTS_PortChangeDetect, EHC_USBSTS_UsbAsyncInt, EHC_USBSTS_UsbPeriodInt, EHC_USBSTS_UsbErrorInt, EHC_USBSTS_IntAsyncAdvance) and the program loops infinity in software/LPCUSBLib/Drivers/USB/Core/Host.c:47 void USB_Host_ProcessNextHostState(uint8_t corenum) because  USB_HostState[corenum] is set as HOST_STATE_Unattached.

  We believe that USBSTS_H should have at least EHC_USBSTS_PortChangeDetect set, but we can't figure out why it is not set.

Thanks in advance.  ;-) 

Outcomes