Part Number: LAUNCHXL-F28377S
Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
Dear Sir/Ma'am,
I have written c code to check the SYSCLK frequency.
It has the following code:
// This should generate 200KHz SYSCLK from 10MHz oscillator using the PLL multipliers. --> 10*(1/50)MHz --> 5 microseconds.
ClkCfgRegs.CLKSRCCTL1.bit.OSCCLKSRCSEL = 0x0;
ClkCfgRegs.SYSPLLMULT.bit.IMULT = 1;
ClkCfgRegs.SYSPLLMULT.bit.FMULT = 0;
ClkCfgRegs.SYSCLKDIVSEL.bit.PLLSYSCLKDIV =50;
ClkCfgRegs.SYSPLLCTL1.bit.PLLCLKEN = 1;
Further, I have configured Timer-1 and toggled a GPIO to measure this frequency. My timer period is 10000. So, I need to get 5us*10000 = 0.05seconds on the CRO.
But, I get a waveform whose frequency is scaled by a factor 4 (measured time: 2s). I tried checking all the related pre-scalars but couldn't find where the extra factor 4 is coming from.
Can someone please help me with this?
Also, what is the relation between the PLLSYSCLK and SYSCLK (CPU). I suspect that factor is in here. But, I can't find from the manuals.
Thank you,
Subrahmanyam,