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

LPC2148 usb controller

I use usb controller in Lpc2148. I get example code from keil website in HID class. I need adapt InReport up to 64 byte( InReport[0],InReport[1]....,InReport[64]) for send more data but I donn't good enough in C programming. How can I do? pleas give code. How can I develop application software in the host side. I need Visual Basic 6
thanks you

Parents
  • The output of USBView on your post is fine.
    It is confirmed that the enumeration finishes successfully.

    "I've downloaded the win DDK and also the VC++ 9.0. I tried to compile with VC++ and had no luck."

    WinDDK is distributed with its own C compiler.

    To compile USBView on WinDDK,
    1) Select one of environment which fits to your OS version (Win XP/2k/2k3)
    - Start button > Development Kits > Windows DDK 3790.1830 > Build Environments > WinXP [/ Win Server 2k3 / Win2k] > Free build
    - DOS window pops up.

    2) Move to usbview directory and build it
    > cd src\wdm\usb\usbview
    > build -cZg

    It is documented in "Building a Sample Driver" section of WinDDK help.

    "As to the third thest, I don't have a high speed hub so that won't work."

    I think you have.
    "USB2.0 hub" is a High-Speed hub :-)

    "Now to the OutReport the kit doesn't even get a USB_EVT_OUT. I suppose the problem is also on the win application but I haven't found out what it is."

    When you aren't sure which side the problem lies on, the firmware or the host app, look at the USB traffic.

    In this case,
    - Step execute your host app around WriteFile
    - If you see nothing on the sniffer (or hardware bus analyzer), the host app is the culprit.
    - If you see expected URB (USB Request Block), but it doesn't finish, the firmware is the culprit.

    For this purpose, any software sniffer will do.

    I recommend you SourceUSB in my above post, because this (and BusHound) is the only software sniffer which can catch erroneous enumeration process. Other software sniffers fail to show the enumeration process when it doesn't complete.
    However, once the enumeration finishes, you can use any software sniffer for debug.

    Free, open-source:
    SnoopyPro sourceforge.net/.../

    Commercial, 1-month eval:
    HHD USB Monitor www.hhdsoftware.com/.../usb-monitor.html
    etc.

    Tsuneo

Reply
  • The output of USBView on your post is fine.
    It is confirmed that the enumeration finishes successfully.

    "I've downloaded the win DDK and also the VC++ 9.0. I tried to compile with VC++ and had no luck."

    WinDDK is distributed with its own C compiler.

    To compile USBView on WinDDK,
    1) Select one of environment which fits to your OS version (Win XP/2k/2k3)
    - Start button > Development Kits > Windows DDK 3790.1830 > Build Environments > WinXP [/ Win Server 2k3 / Win2k] > Free build
    - DOS window pops up.

    2) Move to usbview directory and build it
    > cd src\wdm\usb\usbview
    > build -cZg

    It is documented in "Building a Sample Driver" section of WinDDK help.

    "As to the third thest, I don't have a high speed hub so that won't work."

    I think you have.
    "USB2.0 hub" is a High-Speed hub :-)

    "Now to the OutReport the kit doesn't even get a USB_EVT_OUT. I suppose the problem is also on the win application but I haven't found out what it is."

    When you aren't sure which side the problem lies on, the firmware or the host app, look at the USB traffic.

    In this case,
    - Step execute your host app around WriteFile
    - If you see nothing on the sniffer (or hardware bus analyzer), the host app is the culprit.
    - If you see expected URB (USB Request Block), but it doesn't finish, the firmware is the culprit.

    For this purpose, any software sniffer will do.

    I recommend you SourceUSB in my above post, because this (and BusHound) is the only software sniffer which can catch erroneous enumeration process. Other software sniffers fail to show the enumeration process when it doesn't complete.
    However, once the enumeration finishes, you can use any software sniffer for debug.

    Free, open-source:
    SnoopyPro sourceforge.net/.../

    Commercial, 1-month eval:
    HHD USB Monitor www.hhdsoftware.com/.../usb-monitor.html
    etc.

    Tsuneo

Children