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

USB HID code not working with LPC2387

Hello Everyone,

I have downlaoded sample code of USB HID of LPC2368 and I am using to test it with LPC2387.
But code is not working properly.

LED of USB connect is blink while I am attaching USB that means it connects properly But its not able to transfer data.
I don't know what is wrong in my code or I am doing something wrong.

Please if anybody had done this before it please suggest me what is wrong.

Thanks in advance.

Parents
  • What is your board, Keil MCB2387 or one from another company?

    Fortunately, LPC2387 belongs to the same device family with LPC2368.
    USB SIE is the same for the USB device, and they are assigned to the same port pins, same PINSELs. The USB examples are expected to run both on KEIL MCB2360 (LPC2368) board and MCB2387 (LPC2387) without any change

    If you are running the example on a board other than MCB2387, check these points.

    Crystal frequency
    The example is tuned for the 12MHz crystal on the LPC23xx board
    To run it on other crystal frequency, touch to PLL / USB clock setting on LPC2300.s

    Open LPC2300.s on Keil uVision, and switch to "Configuration Wizard" tab under edit pane.
    - Clock Setup - PLLCFG - MSEL/NSEL (original: 12/1)
    - Clock Setup - USBCLKCFG - USBSEL (6)

    Tune these parameters, so that they satisfy this calculation.
    crystal frequency * MSEL / NSEL / USBSEL * 2 = 48 MHz

    USB_CONNECT pin (P2.9)
    The example code expects D+ pull-up resistor is controlled by P2.9
    Compare the circuit around P2.9 - D+ with MCB2300 board
    You'll see this circuit at right bottom on the second page of this schematic PDF.

    MCB2300-v47 schematic
    http://www.keil.com/mcb2300/mcb2300-schematics.pdf

    Tsuneo

Reply
  • What is your board, Keil MCB2387 or one from another company?

    Fortunately, LPC2387 belongs to the same device family with LPC2368.
    USB SIE is the same for the USB device, and they are assigned to the same port pins, same PINSELs. The USB examples are expected to run both on KEIL MCB2360 (LPC2368) board and MCB2387 (LPC2387) without any change

    If you are running the example on a board other than MCB2387, check these points.

    Crystal frequency
    The example is tuned for the 12MHz crystal on the LPC23xx board
    To run it on other crystal frequency, touch to PLL / USB clock setting on LPC2300.s

    Open LPC2300.s on Keil uVision, and switch to "Configuration Wizard" tab under edit pane.
    - Clock Setup - PLLCFG - MSEL/NSEL (original: 12/1)
    - Clock Setup - USBCLKCFG - USBSEL (6)

    Tune these parameters, so that they satisfy this calculation.
    crystal frequency * MSEL / NSEL / USBSEL * 2 = 48 MHz

    USB_CONNECT pin (P2.9)
    The example code expects D+ pull-up resistor is controlled by P2.9
    Compare the circuit around P2.9 - D+ with MCB2300 board
    You'll see this circuit at right bottom on the second page of this schematic PDF.

    MCB2300-v47 schematic
    http://www.keil.com/mcb2300/mcb2300-schematics.pdf

    Tsuneo

Children