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 CDC on LPC1768 problem

Hi,

I have a problem with running a USB-CDC on the LPC1768. I have a USB circuit identical to the MCB1700 board. I use the sample code for USBCDC MCB1700 board.
My program stops at the following line:
while (! USB_Configuration);
On the computer I get the message: "USB Device not Recognized."
Is it a hardware or rather a software problem? Sorry for my English.

Best Regards,
Lukas

Parents Reply Children
  • The problem is related to the oscillator. I had a 10MHz oscillator and changed to 12MHz. Now it works.
    Previously, I changed the value of XTAL. What else do I need to change to work with the 10MHz oscillator?

  • Can I guess that you have read the user manual for your processor? At least the USB section since you knew you had problems with the USB?

    It specifies that usbclk must be 48MHz from the USB clock divider, to create the 12MHz bus speed. A 12MHz crystal makes it easy to let the PLL step up the frequency by a factor 4 and feed the USB logic. What PLL settings did you use? What usbclk frequency did you get with your settings?

  • So it wasn't identical, then - was it?!

    "What else do I need to change to work with the 10MHz oscillator?"

    Anything & everything that depends upon that oscillator frequency!

  • USB can not work with 10MHz oscillator.
    Quote from the user manual:
    "Choose an oscillator frequency (FOSC). USBCLK (48MHz) must be the whole (non-fractional)multiple of FOSC meaning that the possible values for FOSC are 12 MHz, 16 MHz, and 24 MHz."

    Regards,
    Lukasz

  • The above is limitations for the PLL1 which is a special PLL for the USB.

    It is also possible to take the 48MHz clock from PLL0 (which is also used for processor core and all other peripherials).

    I haven't verified it, but I'm pretty sure that you can run PLL0 with a 10MHz crystal and get your 48MHz USB clock with zero error. After all, 10 * 24 / 5 = 48MHz so there are small integers that you may multiply/divide with to get the required frequency. PLL1 is more limited than PLL0, so it doesn't have the same flexibility.