SPRUHM8K December 2013 – May 2024 TMS320F28374D , TMS320F28375D , TMS320F28376D , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28378D , TMS320F28379D , TMS320F28379D-Q1
Example 1: Using a crystal (15 MHz) as a reference, generates a CPU frequency of 100 MHz and a USB clock of 60 MHz:
CLKSRCCTL1.OSCCLKSRCSEL = 0x1 | ||
SYSPLLMULT.IMULT = 26 (0x1A) | ||
SYSPLLMULT.FMULT = .50 (0x2) | ||
SYSCLKDIVSEL.PLLSYSCLKDIV = 4 (0x2) | ||
SYSPLLCTL1.PLLCLKEN = 1 | ||
PERCLKDIVSEL.EPWMCLKDIV = 1 (0x0) | ||
PERCLKDIVSEL.EMIF1CLKDIV = 1 (0x0) | ||
PERCLKDIVSEL.EMIF2CLKDIV = 1 (0x0) | ||
CLKSRCCTL2.AUXOSCCLKSRCSEL = 0x1 | ||
AUXPLLMULT.IMULT = 8 (0x08) | ||
AUXPLLMULT.FMULT = .00 (0x0) | ||
AUXCLKDIVSEL.AUXPLLDIV = 2 (0x1) | ||
AUXPLLCTL1.PLLCLKEN = 1 |
This gives a PLLRAWCLK of 397.5 MHz and an AUXPLLRAWCLK of 120 MHz, both of which are in the acceptable range. The CPU frequency is 99.375 MHz. Crystals have tight frequency tolerances, which can keep the system clock from exceeding 100 MHz. The USB frequency is exactly 60 MHz. Since the CPU frequency is less than 100 MHz, the ePWM and EMIF clock dividers can be set to /1.
Example 2: Using INTOSC2 (10 MHz) as a reference, generates a CPU frequency of 200 MHz - 3%:
CLKSRCCTL1.OSCCLKSRCSEL = 0x0 | ||
SYSPLLMULT.IMULT = 38 (0x26) | ||
SYSPLLMULT.FMULT = .75 (0x3) | ||
SYSCLKDIVSEL.PLLSYSCLKDIV = 2 (0x1) | ||
SYSPLLCTL1.PLLCLKEN = 1 | ||