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.

AM3357: Clock configreation in GEL file

Genius 3186 points
Part Number: AM3357

Tool/software:

Hello,

My customer is porting in AM335x family for use upper clock speed.

Question1

I believe the GEL file can config clocks.

Do you have API guide that using in GEL? such as MPU_PLL_Config( ), CORE_PLL_Config(),...

Question2

If set as CORE_PLL_Config( 25, 24, 1000, 10, 8, 4)

It means the clock input(CLKINP) is 25MHz, CLKDCOLDO(=CLKINPHIFLDO) is 24MHz, M6 (in HSDIVIDER) is 1000MHz. Is this correct?

Question3

How can I read M4, M5 (on HSDIVIDER) output from CORE_PLL_Config() setting?

Thanks,

GR

  • Hello,

    We don't really have an API guide/documentation on the gel scripting. Most of it should be self explanatory and also from the function definitions further down in the GEL file, for example:
    CORE_PLL_Config(UWORD32 CLKIN, UWORD32 N, UWORD32 M, UWORD32 M4, UWORD32 M5, UWORD32 M6)

    The PLL registers are in the CM_WKUP Register section in the TRM. There you can read (from the gel also) how the M4 or M5 values are set. Note you can't really read a register to tell you what the actual current clock output after the dividers is, you will have to calculate it yourself.

    Hope it helps,

    thanks,

    Alex

  • Hello Alex,

    Thanks for your information.

    I understand:

    If set CORE_PLL_Config( 25, 24, 1000, 10, 8, 4),

     PLL lock clock = 25 * 1000/(24+1) = 1000MHz

     M4 output = 1000 /10 = 100MHz

     M5 out = 1000 /8 = 125MHz

     M6 out = 1000 /4 = 250MHz

    Best,

    GR