Jump to ID:
QNX Chinese Community

Project Home

Discussions

Wiki

Project Info
Forum Topic - AM3517 BSP IPL中的时钟初始化问题: (1 Item)
   
 
 
AM3517 BSP IPL中的时钟初始化问题  
am3517evm.c 中 static void init_clocks(void) 无用初始化代码 导致启动时间变长
 /* IVA2 ---- m: 0x168, n: 0x0C, fsel: 0x03, m2: 0x01 --DSP 360MHz*/
    out32(OMAP35XX_CM_CLKEN_PLL_IVA2, (in32(OMAP35XX_CM_CLKEN_PLL_IVA2) & ~0x7)| PLL_STOP);
    count = LDELAY;
    while ((in32(OMAP35XX_CM_IDLEST_PLL_IVA2) & 1) && count--) 
        ;

    out32(OMAP35XX_CM_CLKSEL2_PLL_IVA2, (in32(OMAP35XX_CM_CLKSEL2_PLL_IVA2) & ~0x1f)| 0x1);/* set M2 */
    out32(OMAP35XX_CM_CLKSEL1_PLL_IVA2, (in32(OMAP35XX_CM_CLKSEL1_PLL_IVA2) &  ~0x7ff00) | (0x168<<8)); /* set M */
    out32(OMAP35XX_CM_CLKSEL1_PLL_IVA2, (in32(OMAP35XX_CM_CLKSEL1_PLL_IVA2) & ~0x7f) | 0x0c); /* set N */
    out32(OMAP35XX_CM_CLKEN_PLL_IVA2,  (in32(OMAP35XX_CM_CLKEN_PLL_IVA2) & ~0xf0) | 0x3<<4);    /* FREQSEL */
    out32(OMAP35XX_CM_CLKEN_PLL_IVA2, (in32(OMAP35XX_CM_CLKEN_PLL_IVA2) & ~0x7)| PLL_LOCK);
    count = LDELAY;
    while ((!(in32(OMAP35XX_CM_IDLEST_PLL_IVA2) & 1)) && count--) 
        ;