Other Parts Discussed in Thread: ASH
Hi,
I am using the function call
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
for setting the clock.
I get the required (400/(2*5)) = 40MHz clock at the above settings.
When I increase the SYSCTL_SYSDIV_5 factor to SYSCTL_SYSDIV_6, I get the expected 33.3 MHz clock.
When I decrease the divisor from 5 to 3 and use SYSCTL_SYSDIV_3, I should get System control clock as 400/6 = 66.6 MHz
System control clock should have a time period of 15 nS.
One count input to the SysCtlDelay function gives 3 clock cycles delay = 45 nS delay.
The red led on PF1 has been set to be high for 5,00,000 counts. This should give an ON time of red LED as = 45nS* 5,00,000 = 22.5 mS.
However, the scope shows that the PF1 on time is 25 mS, which means the system control clock is at 60 MHz, not 66.6 MHz. I have attached the scope window showing on time of 25 mS.
Why is this disparity?