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 host clk doesnt start!

Hallo

Im trying to get the USB Host on the LPC2478 to work.
Im using the USBHOst lite sample from NXP.

I cant get the USB Host clock started.

Im setting the bit in USBClkCtrl register to start the clock.
Then I poll the USBClkSt to see if the clock starts. It never does.

I have verified that the USB clock is at 48 MHz (Verified with the Peripheral->Clocking and Power control->Clock dividers.)
The CPU clk is 72 MHz (Above the required 18 MHz for correct USB function). PCONP is set to enable the USB.

I have read the UM several time recarding the USB in the LPC2478.

Could it be any external HW thing? (Some signal missing to switch to USB Host mode?)
Schouldnt the USB clock start any way?

/Thomas

Parents
  • Hello Thomas Johansen'

    I am using the USB Device on the LPC24xx and I configure the clocks as follows:

      PCONP   |= 0x80000000;                  /* USB PCLK -> enable USB Per.       */
      /* To set OTG_STAT_CTRL register, OTG clock needs to be enabled */
      OTG_CLK_CTRL = 0x1B;                    /* Host, Dev, AHB clock enable       */
      while ((OTG_CLK_STAT & 0x1B) != 0x1B);
      /* This has to be set after OTG_CLK_CTRL configuration. */
      OTG_STAT_CTRL = 0x03;                   /* U2 = device                       */
    

    I think it is necessary to set AHB_CLK_EN and OTG_CLK_EN together with HOST_CLK_EN or DEV_CLK_EN.

    Best Regards,
    Martin Guenther

Reply
  • Hello Thomas Johansen'

    I am using the USB Device on the LPC24xx and I configure the clocks as follows:

      PCONP   |= 0x80000000;                  /* USB PCLK -> enable USB Per.       */
      /* To set OTG_STAT_CTRL register, OTG clock needs to be enabled */
      OTG_CLK_CTRL = 0x1B;                    /* Host, Dev, AHB clock enable       */
      while ((OTG_CLK_STAT & 0x1B) != 0x1B);
      /* This has to be set after OTG_CLK_CTRL configuration. */
      OTG_STAT_CTRL = 0x03;                   /* U2 = device                       */
    

    I think it is necessary to set AHB_CLK_EN and OTG_CLK_EN together with HOST_CLK_EN or DEV_CLK_EN.

    Best Regards,
    Martin Guenther

Children
No data