Other Parts Discussed in Thread: C2000WARE
Hi
I have run the example on CPU timer provided in C:\ti\c2000\C2000Ware_1_00_06_00\driverlib\f28004x\examples\timer on an ExperimenterKit with ControlCARD.
On INT function cpuTimer0ISR instead of counting the INT the pin GPIO04 is toggled.
Here are my test results for several expected frequencies:
Frequency Timer expected ; Obtained frequency
1 kHz ; 1 kHz
100 kHz ; 98-100 kHz
500 kHz ; 496-502 kHz
1 MHz ; 0.99-1.01 MHz
1.5 MHz ; 1.07 MHz
2 MHz ; 1.07 MHz
4 MHz ; 768 kHz
Config : 100MHz SYSCLK frequency
#define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_XTAL | SYSCTL_IMULT(10) | SYSCTL_FMULT_NONE | SYSCTL_SYSDIV(2) | SYSCTL_PLL_ENABLE)
#define DEVICE_SYSCLK_FREQ ((DEVICE_OSCSRC_FREQ * 10 * 1) / 2)
#define DEVICE_OSCSRC_FREQ 20000000U
configCPUTimer(CPUTIMER0_BASE, DEVICE_SYSCLK_FREQ, 1000000.0/samplingFreq_hz)
Could you explain me the limitation over 1 MHz ?
Thanks
Yann