XMC1000 On-chip oscillator problem?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I have just started using the XMC1300 boot kit and when I run the blinky example the measured toggling interval is 0.194 s instead of the configured SystemCoreClock / 5 = 0.2 s, (3% lower). The difference seems too much, any idea what the problem could be?
0 Likes
7 Replies
Not applicable
Hi mfsn,

What is the system frequency you are using?
0 Likes
Not applicable
It should be SystemCoreClock=8MHz, since the divider selection was set to 4. The code is very simple:

int main(void)
{

SCU_GENERAL->PASSWD = 0x000000C0UL;
SCU_CLK->CLKCR = 0x3FF00400UL;
while((SCU_CLK->CLKCR)&0x40000000UL);
SCU_GENERAL->PASSWD = 0x000000C3UL;


P0_0_set_mode(OUTPUT_PP_GP);

SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / 5);

while(1)
{

}
return 0;
}

void SysTick_Handler(void)
{
P0_0_toggle();
}
0 Likes
Not applicable
Hi mfsn,

According to the datasheet, the oscillator accuracy is between -3.9% to 4%.
Therefore, it may not be so precise.
However, to increase the accuracy, you can implement the clock calibration based on external reference signal.
You can refers to this Device Guide
0 Likes
Not applicable
Jackson, I know, the datasheet claims: "-3.9% - 4% with respect to fNOM(typ), over temperature (-40 °C to 105 °C)". But it also says that the nominal frequency is "63.5MHz to 64.5MHz under nominal conditions after trimming. The deviation is relative to the factory trimmed frequency at nominal VDDC and TA = + 25 °C".

I just cannot believe that the default calibration from factory is 3% inaccurate for the device on my boot kit!!! Has anybody else measured or noticed this discrepancy in the clock frequency?
0 Likes
Not applicable
Hi mfsn,

i also measured a deviation of about 3% with my XMC1300-Bootkit. (under nominal conditions: ~25°C)
0 Likes
Not applicable
Hi mfsn,

The oscillator deviation should be around 1% at 25 °C.
Could it be the oscilloscope measurement giving some error?
Since the measurement is in term of msec, the resolution for the oscilloscope is low which may not give an accurate measurement.
Could you try to change the system frequency to 32MHz and set the systick to 3200 ticks?

Additionally, there is example code available for calibration with respect to temperature.
This can be downloaded from the DAVE Example Portal
However, only productive devices includes the required parameters for the calibration.
So the device on our boot kit now is unable to perform the calibration as the device is either EES or ES.
Therefore, it could be also that the device on your bootkit does not trim correctly too.
0 Likes
Not applicable
Hi all,

Trimming of XMC1000 internal oscillator is possible to improve the clock accuracy over the temperature range.
Please refers to XMC1000 TIP of the day: DCO1 calibration with respect to temperature
0 Likes