This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5708: [TI-RTOS]standalone USB demo

Part Number: AM5708

Dear Champs,

Is there standalone USB demo in TI-RTOS SDK?

My customer wants to understand how clock will be set for USB with details.

If there is not, could you please help my customer to understand the clock settings for USB?

When I checked USB demo in the pdk, I found usbClockCfg() function in the usb_wrapper.c and this is all clock settings required for USB, right?

Are there any other things to be set to use USB except usbClockCfg()?

C:\ti\pdk_am57xx_1_0_16\packages\ti\drv\usb\soc\am571x\usb_wrapper.c

void usbClockCfg(uint32_t portNumber)

{

    uint32_t regVal = 0;

    uint32_t phyBase = 0;

   

    /* enable ocp2scp1 */

    /* write this to be able to read/write the PHY registers */

    HW_WR_REG32(CM_L3INIT_OCP2SCP1_CLKCTRL, 0x1);   /* AUTO mode */

    HW_WR_REG32(CM_L3INIT_OCP2SCP3_CLKCTRL, 0x1);   /* AUTO mode - might not need this */

 

    /* set OCP2SCP timing */

    ocp2scp_reset(OCP2SCP1_BASE);

    ocp2scp_set_timing(OCP2SCP1_BASE);

    /* done configurating ocp2scp1 */

 

    /* need this OTG_SS_CLKCLTRL before getting a DPLL_USB lock */

    regVal = HW_RD_REG32(CM_L3INIT_USB_OTG_SSn_CLKCTRL(portNumber));

    regVal |= 0x101U;   /*OPTFCLKEN_REFCLK960M | MODULEMODE__AUTO */

    HW_WR_REG32(CM_L3INIT_USB_OTG_SSn_CLKCTRL(portNumber), regVal);

:

:

My customer is using TI-RTOS SDK v6.1.

Thanks and Best Regards,

SI.