Skip to main content
Visitor II
October 10, 2005
Question

4MHz to 48MHz for USB at STR711

  • October 10, 2005
  • 3 replies
  • 635 views
Posted on October 10, 2005 at 06:12

4MHz to 48MHz for USB at STR711

    This topic has been closed for replies.

    3 replies

    Visitor II
    October 10, 2005
    Posted on October 10, 2005 at 03:09

    see:

    http://www.olimex.com/dev/pdf/str-p711.pdf

    Only 4MHz in sch for CK, and I can not find 48 MHz for USBCLK(P1.10). USBCLK(P1.10) is used to check SD card.

    4MHz Clock to HCLK(P1.13) for HDLC. can HCLK uses as USB clock?

    if it can , how can i setup ?

    Visitor II
    October 10, 2005
    Posted on October 10, 2005 at 04:56

    yes you can feed 4Mhz into the HCLK and use this for the USB clock. This is what I am doing. You just need to setup PLL2CR register.

    /* setup clock */

    PCU->PLL2CR = 0x0050; /* x12 /1 */

    while( (PCU->PLL2CR & 0x8000) == 0) { /* wait for pll to lock */

    asm(''nop'');

    };

    PCU->PLL2CR |= 0x0180; /* enable pll output and to use as usb clock */

    Doing this means the HDLC and USB share the same clock.

    Visitor II
    October 10, 2005
    Posted on October 10, 2005 at 06:12

    Quote:

    On 10-10-2005 at 08:26, Anonymous wrote:

    yes you can feed 4Mhz into the HCLK and use this for the USB clock. This is what I am doing. You just need to setup PLL2CR register.

    /* setup clock */

    PCU->PLL2CR = 0x0050; /* x12 /1 */

    while( (PCU->PLL2CR & 0x8000) == 0) { /* wait for pll to lock */

    asm(''nop'');

    };

    PCU->PLL2CR |= 0x0180; /* enable pll output and to use as usb clock */

    Doing this means the HDLC and USB share the same clock.

    Thanks, i understand now