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

Regarding USB HID Demo

Dear Sir,

I am using the the demo code of keil for USB HID for my custom made board. I have successfully uploaded the code to the controller. But when i connect the device to PC, it doesn't recognize the device. It shows the error usb device connected is malfunctioned. I am using windows 7- 64bit. What should i do? Can you help me in this? Thanks in advance.

Regards,
Deepak

Parents Reply Children
  • Ok, the last check is switching of the pull-up resistor and bus reset detection.

    1) Load the USBHID example to your MCU
    2) Run uVision debugger
    3) Reset the MCU on the debugger
    4) Place a break point in the USB ISR, at bus reset handler,

    usbhw_STM32F10x.c
    
    /*
     *  USB Interrupt Service Routine
     */
    
    void USB_LP_CAN1_RX0_IRQHandler (void) {
      U32 istr, num, val;
    
      istr = ISTR;
    
      /* USB Reset Request */
      if (istr & ISTR_RESET) {
        USB_Reset();         // <--- place a break point here
    


    4) start your firmware on the debugger

    You should see
    - Windows detect "unknown" device
    - Above break point meets

    If you see these responses, the pull-up resistor and bus reset detection work fine.

    Even if your device passes this test, swapped D+/D- connection is still suspicious.

    Tsuneo

  • Thanks Tsuneo. I'll do this and will let you know the status.