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

Help on USB MCB2300

Hi,
We make a custom board work the same as MCB2300 and try to run the USBHID example for LPC 2364 chip. I cannot read the endpoint 1 from libusb command usb_interrupt_read(device, 0x81, buffer, sizeof(buffer), 500). I can make another endpoint 2 and can write to the endpoint 2 OK but I cannot read any endpoint. It gives me a timeout error with error code -110.

Can anyone show me how to fix it?

Parents
  • To trace the bug in systematic way, monitor the USB traffic on a hardware bus analyzer or on a software sniffer

    A hardware bus analyzer suggests the place where the problem lies, as follows
    a) Problem on PC side
    When usb_interrupt_read() is executed on step execution, no IN transaction to the endpoint of the device appear on the bus. If you see any IN transaction, check device and endpoint address of the IN transaction carefully. Does it match to the target device endpoint?

    When the PC puts an IN transaction on correct device and endpoint address,
    b) Problem on the firmware side
    - IN - no response, three times
    Your firmware doesn't initialize (realized/configured) the endpoint

    - Repeated IN - NAK, until cancelled by timeout
    Your firmware doesn't put any packet to the endpoint

    For software sniffers,
    a) Problem on PC side
    When usb_interrupt_read() is executed on step execution, no BULK_OR_INTERRUPT_TRANSFER URB to the endpoint of the device appear on the bus. If you see any BULK_OR_INTERRUPT_TRANSFER URB, check device and endpoint address of the URB carefully. Does it match to the target device endpoint?

    When the PC puts an IN transaction on correct device and endpoint address,
    b) Problem on the firmware side
    - BULK_OR_INTERRUPT_TRANSFER URB finishes immediately with error
    Your firmware doesn't initialize (realized/configured) the endpoint

    - BULK_OR_INTERRUPT_TRANSFER URB goes pending, and cancelled afterward.
    Your firmware doesn't put any packet to the endpoint



    Most likely, "Your firmware doesn't put any packet to the endpoint" is the case.
    If it's the case, see this post

    No HID interrupt IN transfers
    http://www.keil.com/forum/docs/thread15613.asp
    24-Sep-2009 17:48 GMT, Author: Tsuneo Chinzei

    Tsuneo

Reply
  • To trace the bug in systematic way, monitor the USB traffic on a hardware bus analyzer or on a software sniffer

    A hardware bus analyzer suggests the place where the problem lies, as follows
    a) Problem on PC side
    When usb_interrupt_read() is executed on step execution, no IN transaction to the endpoint of the device appear on the bus. If you see any IN transaction, check device and endpoint address of the IN transaction carefully. Does it match to the target device endpoint?

    When the PC puts an IN transaction on correct device and endpoint address,
    b) Problem on the firmware side
    - IN - no response, three times
    Your firmware doesn't initialize (realized/configured) the endpoint

    - Repeated IN - NAK, until cancelled by timeout
    Your firmware doesn't put any packet to the endpoint

    For software sniffers,
    a) Problem on PC side
    When usb_interrupt_read() is executed on step execution, no BULK_OR_INTERRUPT_TRANSFER URB to the endpoint of the device appear on the bus. If you see any BULK_OR_INTERRUPT_TRANSFER URB, check device and endpoint address of the URB carefully. Does it match to the target device endpoint?

    When the PC puts an IN transaction on correct device and endpoint address,
    b) Problem on the firmware side
    - BULK_OR_INTERRUPT_TRANSFER URB finishes immediately with error
    Your firmware doesn't initialize (realized/configured) the endpoint

    - BULK_OR_INTERRUPT_TRANSFER URB goes pending, and cancelled afterward.
    Your firmware doesn't put any packet to the endpoint



    Most likely, "Your firmware doesn't put any packet to the endpoint" is the case.
    If it's the case, see this post

    No HID interrupt IN transfers
    http://www.keil.com/forum/docs/thread15613.asp
    24-Sep-2009 17:48 GMT, Author: Tsuneo Chinzei

    Tsuneo

Children