SPRUI33H November 2015 – June 2024 TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1
Example 1: Using INTOSC2 (10MHz) as a reference, generate a CPU frequency of 100MHz - 3%:
CLKSRCCTL1.OSCCLKSRCSEL = 0x0 | ||
SYSPLLMULT = 0x00113 | IMULT = 19 (0x13), FMULT = 0.25 (0x1), ODIV = 1 (0x0) | |
SYSCLKDIVSEL.PLLSYSCLKDIV = 2 (0x1) | ||
SYSPLLCTL1.PLLCLKEN = 1 | ||
This gives a PLLRAWCLK of 192.5MHz, which is within the acceptable range of 150 to 200MHz. The CPU frequency is 96.25MHz with a 3% tolerance due to variation in the internal oscillator.
Example 2: Using a crystal (20MHz) as a reference, generate a CPU frequency of 85MHz:
XTALCR.OSCOFF = 0 | ||
XTALCR.X1CNT.CLR = 1 | ||
(wait for X1CNT to reach 0x3ff) | ||
CLKSRCCTL1.OSCCLKSRCSEL = 0x1 | ||
(check MCDCR.MCLKSTS and repeat the above if necessary) | ||
SYSPLLMULT = 0x00208 | IMULT = 8 (0x08), FMULT = .50 (0x2), ODIV = 1 (0x0 | |
SYSCLKDIVSEL.PLLSYSCLKDIV = 2 (0x1) | ||
SYSPLLCTL1.PLLCLKEN = 1 | ||
This gives a PLLRAWCLK of 170MHz, which is in the acceptable range. The CPU frequency is exactly 85MHz.