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

USBHID example

When I run the USBHID example according to
description, it runs well (with Client1) just until I push the reset button on the MCB2140. Then it hungs and one needs to close (kill) HIDClient, disconnect the board, then connect again and run the HIDClient.
As the reset condition is pretty common: Watchdog Reset, Brounout, etc, this example is absolutely not useful for learning how to run a real application.
Is there any possibility to solve the problem so that the connection between HIDClent and the board restarts again after the microcontroller reset?

  • Hi,
    I had similar problem with HID example, with hanging.
    Yesterday, I downloaded news code from Keil web site.
    It seems working now.
    Give it a try.
    Best regards,
    Milan Madzarac

  • I succesed at last to run the USBHID example without hanging after microcontroller reset.
    But for it I soldered additional circuit according the
    http://www.keil.com/support/docs/3141.htm
    Besides it is necessary to make some changes in example:
    void USB_Init (void) {

    PINSEL1 &= ~0xC000C000;
    // PINSEL1 |= 0x40004000; /* Select USB Link, VBUS */
    PINSEL1 |= 0x80004000; /* Select USB CONNECT, VBUS */

    and add in ISR handler USB_Connect(TRUE)
    after USB_Reset().
    Recommended by Philips suppor team in the yahoo discussion forum.

    So I do not understand how you managed to run the example without these changes.
    Please, try again to reset the microcontroller during the example run.
    The USB Client should hang.

    Best regards,

    Varuzhan

  • Hi,
    I have to apologize to misleading you with my replay.
    I had posted the question regarding USB HID example.
    Nobody has responded to it yet.
    In searching for similar problems I found your post but I did not investigate it.
    In the same time I downloaded newest code from Keil web site and that solved my problem
    So I replied to your question thinking it can be helpful to you even I did not investigate the problem.
    Because when I rebooted the hybrid the USB client hang on, like it did to you.
    It is good you answered yourself to that question, it is helpful.
    Looks there are not many people involved with USB on the device and host level in the same time.
    Happy programming.
    Best regards,
    Milan

  • Hi Milan,

    Thank you. I tried all IMHO software versions, but only rewiring according to Olimex works. But again, after the microcontroller RESET, to restart the work, one should again choose the
    LPC2148 from the "Device" menu of the USBHID.
    I am not familiar with the Visual C (I just suppose, that it is the source language of the HID client) so I asked one of my students to make appropriate changes in the HID Client. In case of success I will report it on the forum.
    Regards,
    Varuzhan