This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB Host example errors for LPC17xx

Hello, i'm trying to run USB Host code example provided by NXP for LPC17xx.
I have LPC1768 and I'm using the mass storage example.
I already check my board, it doesn't matter what I do I always get an error returning from "USBH_MSC_DriveGetMediaStatus" function.
USBH_Initialize returns OK.
The USB led works great, when I put a pendrive it blinks and thn stays On, and the opposite when flashdrive is removed.
Does anyone have an idea?

Parents Reply Children
  • -> Can you explain me how works the USB led pin in LPC17xx?

    It is reasonable that it might use the technology called USB GoodLink.

    UM10360

    Chapter 7: LPC176x/5x Pin configuration

    USB_UP_LED — USB GoodLink LED indicator. It is LOW when the device is
    configured (non-control endpoints enabled), or when the host is enabled and has
    detected a device on the bus. It is HIGH when the device is not configured, or
    when host is enabled and has not detected a device on the bus, or during global
    suspend. It transitions between LOW and HIGH (flashes) when the host is enabled
    and detects activity on the bus.

    11.6.7 SoftConnect
    The connection to the USB is accomplished by bringing D+ (for a full-speed device) HIGH
    through a 1.5 kOhm pull-up resistor. The SoftConnect feature can be used to allow
    software to finish its initialization sequence before deciding to establish connection to the
    USB. Re-initialization of the USB bus connection can also be performed without having to
    unplug the cable.
    To use the SoftConnect feature, the CONNECT signal should control an external switch
    that connects the 1.5 kOhm resistor between D+ and +3.3V. Software can then control the
    CONNECT signal by writing to the CON bit using the SIE Set Device Status command.

    11.6.8 GoodLink
    Good USB connection indication is provided through GoodLink technology. When the
    device is successfully enumerated and configured, the LED indicator will be permanently
    ON. During suspend, the LED will be OFF.
    This feature provides a user-friendly indicator on the status of the USB device. It is a
    useful field diagnostics tool to isolate faulty equipment.
    To use the GoodLink feature the UP_LED signal should control an LED. The UP_LED
    signal is controlled using the SIE Configure Device command.

  • Thanks!

    It really makes no sense to me..
    I have the Error 33: usbDeviceError.

    But the USB Led is ON! Indicating that the device is detected!

    I've already checked all connections, USB clock configuration..
    T don't know what else to do..