This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280025C: Timer accuracy strangely better with internal clock vs external

Part Number: TMS320F280025C

Tool/software:

Hi there,

I have a system which runs off of INT_myCPUTIMER1_ISR and gets triggered every 1ms. Until now we had the system being clocked off the internal oscillators and I noticed this timer is 99.76% accurate against an RTC over time. 

We have a 10 MHz external oscillator part number: SG-210STF 10.0000ML5 connected to GPIO19_X1 which I recently used for the system clock by uncommenting #define USE_PLL_SRC_XTAL  and commenting #define USE_PLL_SRC_INTOSC in the device.h file.

I also changed the following code to indicate the single ended oscillator:

#define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_XTAL_SE | SYSCTL_IMULT(30) | \
SYSCTL_REFDIV(1) | SYSCTL_ODIV(3) | \
SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE | \
SYSCTL_DCC_BASE_0)

This code was previously: 

#define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_OSC2 | SYSCTL_IMULT(30) | \
SYSCTL_REFDIV(1) | SYSCTL_ODIV(3) | \
SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE | \
SYSCTL_DCC_BASE_0)

Now running our code I noticed that with the NEW configuration out timer accuracy is only 99% against an RTC.  This is strange because our external crystal should have an accuracy MUCH higher than this.

Do you have any idea how this could be possible? I have not modified our timer settings at all between the two configurations. Our scope of the clock signal also looks clean enough. (attached).

Thanks in advance,

Steven