This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WEC7 USB driver with AM3517

Other Parts Discussed in Thread: AM3517

Dear Sir,

I am trying to use USB device(K/B)  with AM3517 under WEC7 OS.

I am using the Am3517EVM now. When I inserted K/B to USB plug, the system does not respond.

According to my understaning, WEC7 and BSP does not support CDC class driver. But HID class

driver is supported as the default function.

I recorded the log  until K/B insertion on the Visual Studio. Please see the attached file.3465.AM3517log_VS.txt

I don't know well that USB HID class driver is not added correctly when system booting. But its log shows that it was not happened any action when USB K/B insertion.

What is the wrong? Please advise me.

Best regards,

Michi

  • Michi,

    USB mice and keyboards are indeed supported by the HID class driver in WEC7 so it should just work, provided you have selected the catalog item and done a clean sysgen.

    The catalog item you are looking for is
    (workspace name)
      Core OS
        Windows Embedded Compact
          Device Drivers
            USB
              USB Host
                USB Class Drivers
                  USB Human Input Device (HID) Class

    Have you verified that the USB Host interface does work with other devices? Does it work if you plug in say a USB memory stick?

    When you say that the system does not respond, do you mean that the keyboard just is not detected and the system continues normal operation, or is it that the system locks up and stops responding completely to any input?

    The HID driver doesn't get loaded until a mouse or keyboard is connected, so don't expect it to show up in the log file until then.

    Best,
    Carsten

  • Dear Carsten-san,

    Thank you for your reply.

    I checked USB Host interface by using USB memory stick. And I verified USB memory is recognized correctly.1884.logtest2.txt

    Also, I checked catalog item as you said. USB HID class driver was checked. And I did build with clean again.

    But the result was no good. When I inserted K/B to USB port, K/B was not detected.  And the system continues normal operation.

    What is the wrong? Please advise me again.

    Best regards,

    Michi

  • Hi Michi,

    So the hardware and host driver are working, that's a good start.

    Do you get any debug messages at all when you connect the keyboard?

    Can you confirm that the class driver (usbhid.dll) and registry entries are present in the NK image?

    The registry entries are documented here: http://msdn.microsoft.com/en-us/library/ms894890.aspx
    (I know it's for CE 5.0, but I was having trouble finding a page for WEC 7.0, and anyway they haven't changed as far as I can see)

    You only need the HID entries.

    Carsten

  • Dear Carsten-san,

    Thank you for your support.

    > Do you get any debug messages at all when you connect the keyboard?

    -> No. I don't get any debug message when I connect the keyboard?

    >Can you confirm that the class driver (usbhid.dll) and registry entries are present in the NK image?

    -> I don't know how to confirm it.  I can find usbhid.dll file in debug and checked folder. But I can't find it in release folder.

    Please let me know how to add usbhid.dll driver to NK image.

    Best regards,

    Michi

  • Michi,

    You can open the nk.bin file in Platform Builder and examine its contents. From the File menu, just click Open, then File, and browse to the nk.bin file.

    Expand the tree and look for usbhid.dll under "(All files)". If it is missing, you probably need to do a clean sysgen on the release/retail configuration.

    Hope this helps,
    Carsten

  • Dear Carsten-san,

    Thank you for your quick reply.

    I checked the nk.bin by Visual Studio. I attached its snapshot. Pleasse see the below.

    I think usbhid.dll is included.  How do you think about it from the above picture?

    I appreciate your kindly support.

    Best regards,

    Michi 

  • Michi,

    It looks like the registry entries are there, but just for good measure you should scroll down to "(All files)" and verify that usbhid.dll is indeed included.

    Have you tried a release/retail build?

    You could also try setting a breakpoint in CHub::AttachDevice, just below case DEVICE_CONFIG_STATUS_CREATE_NEW_FUNCTION in the giant switch statement inside that function.

    The CHub class is defined in
    C:\WINCE700\public\common\oak\drivers\usb\hcd\usb20\usb2com\cdevice.cpp
    (note that your BSP may be using its own modified version, in which case you will find cdevice.cpp somewhere under the PLATFORM\COMMON directory).

    Is the ...CREATE_NEW_FUNCTION case ever hit?
    If so, what are the VID, PID and device class of the device that was detected (you can get this from the device Info variable).
    Of particular interest is the device class, which needs to match the HID class in order for usbhid.dll to get loaded.

    Best regards,
    Carsten

  • Dear Carsten-san,

    Thank you for your support.

    I tried to set the breakpoint at case "DEVICE_CONFIG_STATUS_CREATE_NEW_FUNCTION" as you said.

    When I inserted USB memory to USB port, the breakpoint was hit at the point. However when I inserted USB keyboard to USB port, the breakpoint was never hit at that point.

    Could you give me more advices for this symptom?

    I appreciate your kindly support.

    Best regards,

    Michi

     

  • Dear Carsten-san,

    Thank you for your support.

    I solved my issue. The cause of trouble is EHCI controller does not support Low/Full speed.

    I used High speed USB Hub. By using USB hub, AM3517 detected USB keyboard.

    I appreciate your support.

    Best regards,

    Michi

  • Hi Michi,

    That makes sense, thanks for reporting back and good you got it solved.

    Cheers,
    Carsten