Device Guide - XMC1000

Device Guide - XMC1000
XMC1000
Microcontroller Series
for Industrial Applications
O SCI LLAT O R HANDLI NG
 System clock calibration with an external clock reference
 DCO1 calibration with respect to temperature
Device G uide
V1.5 2015-06
Microcontrollers
Edition 2015-06
Published by
Infineon Technologies AG
81726 Munich, Germany
© 2015 Infineon Technologies AG
All Rights Reserved.
Legal Disclaimer
The information given in this document shall in no event be regarded as a guarantee of conditions or
characteristics. With respect to any examples or hints given herein, any typical values stated herein and/or any
information regarding the application of the device, Infineon Technologies hereby disclaims any and all
warranties and liabilities of any kind, including without limitation, warranties of non-infringement of intellectual
property rights of any third party.
Information
For further information on technology, delivery terms and conditions and prices, please contact the nearest
Infineon Technologies Office (www.infineon.com).
Warnings
Due to technical requirements, components may contain dangerous substances. For information on the types in
question, please contact the nearest Infineon Technologies Office.
Infineon Technologies components may be used in life-support devices or systems only with the express written
approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the
failure of that life-support device or system or to affect the safety or effectiveness of that device or system. Life
support devices or systems are intended to be implanted in the human body or to support and/or maintain and
sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other
persons may be endangered.
OSCILLATOR HANDLING
Revision History
Revision History
Page or Item
V1.5, 2015-06
Chapter 1.2.3
Chapter 1.6
Subjects (major changes since previous revision)
Added an example to handle boundary conditions
Added a section for calibrating of system clock at maximum frequency
Trademarks of Infineon Technologies AG
AURIX™, C166™, CanPAK™, CIPOS™, CIPURSE™, EconoPACK™, CoolMOS™, CoolSET™,
CORECONTROL™, CROSSAVE™, DAVE™, DI-POL™, EasyPIM™, EconoBRIDGE™,
EconoDUAL™, EconoPIM™, EconoPACK™, EiceDRIVER™, eupec™, FCOS™, HITFET™,
HybridPACK™, I²RF™, ISOFACE™, IsoPACK™, MIPAQ™, ModSTACK™, my-d™, NovalithIC™,
OptiMOS™, ORIGA™, POWERCODE™; PRIMARION™, PrimePACK™, PrimeSTACK™,
PRO-SIL™, PROFET™, RASIC™, ReverSave™, SatRIC™, SIEGET™, SINDRION™, SIPMOS™,
SmartLEWIS™, SOLID FLASH™, TEMPFET™, thinQ!™, TRENCHSTOP™, TriCore™.
Other Trademarks
Advance Design System™ (ADS) of Agilent Technologies, AMBA™, ARM™, MULTI-ICE™, KEIL™,
PRIMECELL™, REALVIEW™, THUMB™, µVision™ of ARM Limited, UK. AUTOSAR™ is licensed by
AUTOSAR development partnership. Bluetooth™ of Bluetooth SIG Inc. CAT-iq™ of DECT Forum.
COLOSSUS™, FirstGPS™ of Trimble Navigation Ltd. EMV™ of EMVCo, LLC (Visa Holdings Inc.).
EPCOS™ of Epcos AG. FLEXGO™ of Microsoft Corporation. FlexRay™ is licensed by FlexRay
Consortium. HYPERTERMINAL™ of Hilgraeve Incorporated. IEC™ of Commission Electrotechnique
Internationale. IrDA™ of Infrared Data Association Corporation. ISO™ of INTERNATIONAL
ORGANIZATION FOR STANDARDIZATION. MATLAB™ of MathWorks, Inc. MAXIM™ of Maxim
Integrated Products, Inc. MICROTEC™, NUCLEUS™ of Mentor Graphics Corporation. MIPI™ of
MIPI Alliance, Inc. MIPS™ of MIPS Technologies, Inc., USA. muRata™ of MURATA
MANUFACTURING CO., MICROWAVE OFFICE™ (MWO) of Applied Wave Research Inc.,
OmniVision™ of OmniVision Technologies, Inc. Openwave™ Openwave Systems Inc. RED HAT™
Red Hat, Inc. RFMD™ RF Micro Devices, Inc. SIRIUS™ of Sirius Satellite Radio Inc. SOLARIS™ of
Sun Microsystems, Inc. SPANSION™ of Spansion LLC Ltd. Symbian™ of Symbian Software Limited.
TAIYO YUDEN™ of Taiyo Yuden Co. TEAKLITE™ of CEVA, Inc. TEKTRONIX™ of Tektronix Inc.
TOKO™ of TOKO KABUSHIKI KAISHA TA. UNIX™ of X/Open Company Limited. VERILOG™,
PALLADIUM™ of Cadence Design Systems, Inc. VLYNQ™ of Texas Instruments Incorporated.
VXWORKS™, WIND RIVER™ of WIND RIVER SYSTEMS, INC. ZETEX™ of Diodes Zetex Limited.
Last Trademarks Update 2011-11-11
OSCILLATOR HANDLING
Table of Contents
Table of Contents
1
1.1
1.2
1.2.1
1.2.2
1.2.3
1.2.4
1.3
1.4
1.4.1
1.4.2
1.5
1.6
System Clock calibration with an external clock reference ........................................................ 7
Overview......................................................................................................................................... 7
Implementation ............................................................................................................................... 8
Oscillator circuit to generate reference clock.................................................................................... 8
Clock Configuration ....................................................................................................................... 10
Capture Compare Unit 4 (CCU4) ................................................................................................... 11
External Request Unit (ERU) ......................................................................................................... 13
Reference Clock Output ................................................................................................................ 13
Temperature Test.......................................................................................................................... 14
Test Setup .................................................................................................................................... 14
Test Result.................................................................................................................................... 14
Conclusion .................................................................................................................................... 15
Extension for applications requiring maximum frequency ............................................................... 15
2
2.1
2.2
2.3
2.4
2.4.1
2.4.2
DCO1 calibration with respect to temperature .......................................................................... 17
Calibration Parameters.................................................................................................................. 17
Initialization Code .......................................................................................................................... 18
Calibration Routine........................................................................................................................ 19
Temperature test for calibration code ............................................................................................ 20
Test setup ..................................................................................................................................... 20
Test result ..................................................................................................................................... 20
Device Guide
4
V1.5, 2015-06
OSCILLATOR HANDLING
Table of Contents
About this document
Scope and purpose
This document covers frequency calibration options for the on-chip oscillator. Two methods for
calibrating the internal clock are covered: Using an external reference signal
 Using the on-chip temperature sensor
Intended audience
Engineers or developers who would like to improve the accuracy of the XMC1000 internal oscillator.
Related information
Table 1
Supplementary links and document references
Reference
Description
XMC1000 Data Sheet
Usef u l p ar am et er s an d p er f o r m an ce
in d icat io n .
Device Guide
5
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
System clock calibration
with an external clock
reference
Device Guide
6
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
1
System Clock calibration with an external clock reference
1.1
Overview
The XMC1000 family of devices provides an internal oscillator for the generation of the system clock,
which is available to the CPU and the on-chip peripherals.
When there are temperature changes, the frequency of the internal clock will vary. In some
applications the accuracy of the system clock is crucial and such variation may not be acceptable,
and so calibration of the internal clock has to be carried out during runtime. Calibration is performed
by adjusting the fractional divider of the MCLK in the Clock Control Register (CLKCR).
In this guide we introduce an example for calibrating the internal clock with an external reference
clock. The external reference clock is fed into the microcontroller and the frequency is captured by the
Capture Compare Unit 4 (CCU4). After capturing the frequency, the application will determine
whether the system clock is still running within the correct range. If the system clock is out of range, it
will adjust the MCKL fractional divider.
Note: The circuit provided and the method of calibrating the MCLK described in this document is given
only as an example implementation. If you chose to follow this implementation, then it is your
responsibility to validate and fine tune your actual board accordingly.
Device Guide
7
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
1.2
Implementation
1.2.1
Oscillator circuit to generate reference clock
An external oscillator circuit is required to ensure a stable reference clock signal. The clock signal
generated from the oscillator circuit will be used as a reference clock by the microcontroller. In this
example, we use an oscillator circuit that will generate a 32.76kH clock signal.
Figure 1
32kHz oscillator circuit
For the XMC1200 and XMC1300 devices, which have an on-chip analog comparator, it can be used
as part of the oscillator circuit. This can reduce the component cost for the external comparator.
The following figure shows the oscillator circuit design using the on-chip comparator.
Figure 2
Oscillator circuit with XMC1200 on-chip analog comparator
Device Guide
8
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
The analog comparator has to be initialized before it can start working.
In this example:
 ACMP0 is used
 Pin P0.10 is used as ACMP0.OUT
 P2.8 is used as ACMP0.INN
 P2.9 is used as ACMP0.INP
void CMPCU_Init(void){
COMPARATOR->ANACMP0 =
((0x0 << COMPARATOR_ANACMP0_CMP_OUT_Pos) & COMPARATOR_ANACMP0_CMP_OUT_Msk) |
((0x0 << COMPARATOR_ANACMP0_CMP_LPWR_Pos) & COMPARATOR_ANACMP0_CMP_LPWR_Msk) |
((0x0 << COMPARATOR_ANACMP0_ACMP0_SEL_Pos) & COMPARATOR_ANACMP0_ACMP0_SEL_Msk) |
((0x0 << COMPARATOR_ANACMP0_CMP_HYST_ADJ_Pos)
& COMPARATOR_ANACMP0_CMP_HYST_ADJ_Msk)|
((0x0 << COMPARATOR_ANACMP0_CMP_INV_OUT_Pos)
& COMPARATOR_ANACMP0_CMP_INV_OUT_Msk) |
((0x1 << COMPARATOR_ANACMP0_CMP_FLT_OFF_Pos)
& COMPARATOR_ANACMP0_CMP_FLT_OFF_Msk) |
((0x1 << COMPARATOR_ANACMP0_CMP_EN_Pos) & COMPARATOR_ANACMP0_CMP_EN_Msk) ;
}
void PORTS_Init(void)
{
PORT0->IOCR8 =
((0x0 << PORT0_IOCR8_PC11_Pos) & PORT0_IOCR8_PC11_Msk) |
((0x14 << PORT0_IOCR8_PC10_Pos) & PORT0_IOCR8_PC10_Msk) |
((0x0 << PORT0_IOCR8_PC9_Pos) & PORT0_IOCR8_PC9_Msk) |
((0x0 << PORT0_IOCR8_PC8_Pos) & PORT0_IOCR8_PC8_Msk) ;
}
Device Guide
9
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
1.2.2
Clock Configuration
The CPU clock should be configured to a smaller value than the maximum MCLK value that can be
set, because when the clock is running slower than expected, there should be room for adjustment.
In this example, we set the CPU clock to run at 16MHz and the peripheral clock to run at 2 times the
CPU clock (i.e. 32MHz).
The following code extract includes the code for disabling the CCU4 clock gating.
void SCU_Clock_Init (void)
{
SCU_GENERAL->PASSWD = 0x000000C0UL;
SCU_CLK->CLKCR = 0x3FF10200;
while((SCU_CLK->CLKCR)&0x40000000UL);
SCU_GENERAL->PASSWD = 0x000000C3UL;
SCU_GENERAL->PASSWD = 0x000000C0UL;
SCU_CLK->CGATCLR0 |= 0x04;
while((SCU_CLK->CLKCR)&0x40000000UL);
SCU_GENERAL->PASSWD = 0x000000C3UL;
// Config SCU Clock
// wait for VDDC to stabilize
// Disable CCU4 Gating
// wait for VDDC to stabilize
}
Device Guide
10
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
1.2.3
Capture Compare Unit 4 (CCU4)
CCU4 will be used to capture the frequency of the reference clock. The reference clock is fed into the
input pin of the CCU4 timer slice and the period of the reference clock is captured.
In this example, the CCU4 timer slice is configured to capture on every raising edge of the signal and
the capture is performed continuously. As we need an interrupt for every period captured, an interrupt
is enabled for the capture event. The following extract shows the CCU4 timer slice initialization code.
void CCU40_CC41_init(void)
{
// Prescaler Run Bit Set
CCU40->GIDLC
|= CCU4_GIDLC_SPRB_Msk;
CCU40_CC41->INS |= 0x03;
// Configures the Event 0 to be active on raising edges
CCU40_CC41->INS |= 0x90000;
// External Capture on Event 0
CCU40_CC41->CMC |= 0x0090;
// Timer is cleared on a capture event
CCU40_CC41->TC = 0x1048;
// Event 0 interrupt
CCU40_CC41->INTE = 0x0100;
// Interrupt is forward to CC4ySR0
CCU40_CC41->SRS = 0x0100;
// Configure NVIC for interrupt
NVIC_SetPriority(CCU40_1_IRQn, 20);
NVIC_EnableIRQ(CCU40_1_IRQn);
}
With this setting, the period of the clock signal will be captured and an interrupt will be generated
when the capture is made. In this example the timer resolution is set to 32.25nsec, which means that
the captured value for the period of a 32.76kHz reference clock is expected to be 977.
In the Interrupt Service Routine (ISR), the captured value is read out. If the captured value is not
below 975 or above 980, the fractional divider of the MCLK will be adjusted.
Device Guide
11
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
The following code example shows the capture event Interrupt Service Routine:
void CCU40_1_IRQHandler (void)
{
uint32_t Period;
uint32_t NewFDIV;
Period = CCU40_CC41->CV[1];
Period &= 0x000FFFF;
if(Period > 980)
{
NewFDIV = SCU_CLK->CLKCR;
NewFDIV++;
SCU_GENERAL->PASSWD = 0x000000C0UL;
SCU_CLK->CLKCR = NewFDIV;
while((SCU_CLK->CLKCR)&0x40000000UL);
SCU_GENERAL->PASSWD = 0x000000C3UL;
}
else if(Period < 975)
{
NewFDIV = SCU_CLK->CLKCR;
NewFDIV--;
SCU_GENERAL->PASSWD = 0x000000C0UL;
SCU_CLK->CLKCR = NewFDIV;
while((SCU_CLK->CLKCR)&0x40000000UL);
SCU_GENERAL->PASSWD = 0x000000C3UL;
}
// wait for VDDC to stabilize
// wait for VDDC to stabilize
}
The code above is an example for generic applications targeting CPU clock configured to a smaller
value than the maximum MCLK value that can be set (as highlighted in section 1.2.2). Specific
implementations may require adaptations to handle boundary conditions, such as situation of a
broken wire or a missing external clock.
In such cases the application should implement additional steps and provide handling on a higher
application level, according to the system requirements.
The following figure shows the addition of a lower and upper limit for the NewFDIV value. Such limits
should be implemented in the application software to improve robustness of operation in multiple
application scenarios.
16 MHz
/////////////
Lower Limit
(NewFDIV - 12)
Figure 3
/////////////
NewFDIV
(IDIV.FDIV)
Upper Limits
(NewFDIV + 12)
An example on the lower/upper limit for 16MHz MCLK
Device Guide
12
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
1.2.4
External Request Unit (ERU)
To reduce the use of the CCU4 input pin, the output from the analog comparator (ACMP0.OUT) can
be connected internally with the CCU4 input via the ERU module. In our example, ACMP0.OUT is
connected to ERU0.0A0 input, and this signal is routed to ERU output ERU0.PDOUT0. This signal is
then fed into CCU4 input.
void ERU0_Init(void)
{
ERU0->EXISEL &= 0xFFFC;
ERU0->EXICON[0] |= 0x0007;
ERU0->EXOCON[0] |= 0x1024;
// Event S0A from input 0A0
// Rising edge trigger, Output to OGU0
// Enable event detection
}
1.3
Reference Clock Output
The reference clock generated from the oscillator circuit took about 5msec to stabilize after power on.
Once the reference clock is stable, there will be only minimal fluctuation in frequency or noise.
Figure 4
32.67KHz reference clock
Device Guide
13
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
1.4
Temperature Test
A temperature test has been conducted to measure the accuracy of the oscillator over the
temperature range of -40ᴼC to 105ᴼC with the clock calibration methodology shown in this device
guide.
1.4.1
Test Setup
XMC1200 bootkit is used in the test. The device was configured to run the calibration continuously
and output a 100KHz PWM signal at the same time.
The bootkit was placed in the temperature chamber and the PWM output connected to an
oscilloscope outside the temperature chamber.
The test started at room temperature (25ᴼC), and slowly ramped up to 105ᴼC, and was then kept at
105ᴼC for 15 minutes. The temperature was then adjusted to slowly ramp down to -40ᴼC and and to
remain at that temperature for 15 minutes.
The fluctuation on the PWM signal was observed.
1.4.2
Test Result
The maximum frequency observed during the temperature test on the 100KHz PWM signal was
100.4KHz and the minimum frequency observed was 99.9KHz. Therefore, we can conclude that the
fluctuation of the oscillator for temperature -40ᴼC to 105ᴼC is within 0.5%.
Attention: The test was done on 3 device units under laboratory conditions. The test results shared in
this documentation are for reference purposes only.
Device Guide
14
V1.5, 2015-06
OSCILLATOR HANDLING
System Clock calibration with an external clock reference
1.5
Conclusion
Because the reference clock is periodically captured, any changes in the system clock can be
adjusted back to the required value. With this implementation, the accuracy of the system clock can
improved upon internal oscillator characteristics.
1.6
Extension for applications requiring maximum frequency
As mentioned in section 1.2.2, the fractional divider approach is primarily using a divider and can only
be used when targeting frequencies smaller than the maximum MCLK value that can be set. For
cases where for example, 32MHz needs to be reached, alternative methods are suggested, making
use of the ANAOFFSET register.
The ANAOFFSET register provides the means to adjust the DCO with an additional offset in both
positive and negative directions. The detailed description, range and settings can be found in the
ANAOFFSET register definition, in the SCU chapter of the Reference Manual.
The basic principle is outlined in the following figure:
Init()
ANAOFFSET = 0x08
IDIV = 0x01
FDIV = 0x00
More than
32MHz ?
MCLK >32MHz
Upper limit?
Y
Less than
32MHz ?
N
MCLK <32MHz
FDIV < 0x20
Reduce MCLK
Y
Lower limit?
Y
FDIV > 0x00
FDIV ++
Increase MCLK
Y
FDIV --
N
Exit
Figure 5
Basic principle of using ANAOFFSET for MCLK=32MHz
Note: The same application specific checks on boundary conditions may be required here as, as
described in section 1.2.3.
Device Guide
15
V1.5, 2015-06
OSCILLATOR HANDLING
DCO1 calibration with
respect to temperature
Device Guide
16
V1.5, 2015-06
OSCILLATOR HANDLING
DCO1 calibration with respect to temperature
2
DCO1 calibration with respect to temperature
Clock frequency drifts when temperature changes. The datasheet states that, the internal oscillator
(DCO1) accuracy for the XMC1000 family device could drift in the range of -3.9% to 4% with respect
to the whole temperature range (-40ᴼC to 105ᴼC). The DCO1 clock frequency would fall in cold
temperature and rise with higher temperatures. XMC1000 family devices therefore provide a solution
to calibrate the internal oscillator during runtime with respect to temperature changes.
With the XMC1000 on-chip temperature sensor, die temperature can be measured.
Based on the measured temperature, an offset value can be obtained for the DCO1 calibration. The
offset adjustment for DCO1 is made via the ANAOFFSET register.
2.1
Calibration Parameters
Parameters are defined in the flash configuration sector for the DCO1 calibration, located between
flash address range 0x10000F30 to 0x10000F33. These parameters must be defined in the project in
order to use the calibration code.
#define
#define
#define
#define
#define
CONFIG_BASE 0x10000000
ANA_TSE_T1
(CONFIG_BASE
ANA_TSE_T2
(CONFIG_BASE
DCO_ADJLO_T1
(CONFIG_BASE
DCO_ADJLO_T2
(CONFIG_BASE
+
+
+
+
0x0F30)
0x0F31)
0x0F32)
0x0F33)
Attention: Only productive devices (No 'EE' or 'ES' on device marking) have these parameters
defined. DCO calibration can only be applied on productive devices. Applying
calibration software to ES or EES devices is undefined.
Device Guide
17
V1.5, 2015-06
OSCILLATOR HANDLING
DCO1 calibration with respect to temperature
2.2
Initialization Code
Initialize the calibration code by calling the software function TSE_Calibration_Init(). This function
enables the on-chip temperature sensor and assigns the parameters.
int32_t var_ANA_TSE_T1;
int32_t var_ANA_TSE_T2;
void TSE_Calibration_Init (void)
{
int32_t TSE1, TSE2;
// Enable Temperature sensor
SCU_ANALOG->ANATSECTRL = 0x01;
// Get parameters from flash config sector
TSE1 = *((uint8_t*)ANA_TSE_T1);
TSE2 = *((uint8_t*)ANA_TSE_T2);
// Check for device parameters
if((TSE1 == 0) && (TSE2 == 0))
{
var_ANA_TSE_T1 = 25;
var_ANA_TSE_T2 = 115;
}
else
{
var_ANA_TSE_T1 = TSE1;
var_ANA_TSE_T2 = TSE2;
}
}
Device Guide
18
V1.5, 2015-06
OSCILLATOR HANDLING
DCO1 calibration with respect to temperature
2.3
Calibration Routine
The calibration routine is provided in the software function TSE_DCO_Calibration().
TSE_DCO_Calibration() is called during run time to calibrate the internal oscillator. One method of
running it is to periodically call it with a system timer interrupt.
When the routine runs, the device temperature is measured. A temperature sensor library file is
required in order to get the temperature measurement from the on-chip temperature sensor. Once the
current temperature has been measured, it is used to calculate the new offset value. The offset
calculation described in this document includes rounding the calculated value to the nearest integer.
This new offset value must be programmed into the ANAOFFSET register if it is different from the
previous offset value.
 If the calculated offset value is less than 0, then 0 should be used.
 If the calculated offset value is more than 8, then 8 should be used.
The internal oscillator frequency will be adjusted automatically if the new offset value is different from
the previous offset value.
#define PASSWD_OPEN_ACCESS
(0x000000C0)
void TSE_DCO_Calibration (void)
{
int32_t a,b,c,d,e;
int32_t ADJL_OFFSET;
a
b
d
e
=
=
=
=
*((uint8_t*)DCO_ADJLO_T2);
*((uint8_t*)DCO_ADJLO_T1);
var_ANA_TSE_T1;
var_ANA_TSE_T2;
// Get current temperature and convert to celcius
c = XMC1000_CalcTemperature();
c = c - 273;
// Calculate the offset value
ADJL_OFFSET = ((a-b)*(c-d) + ((e-d)>>1) + b*(e-d))/(e-d);
// Configure the offset value into ANAOFFSET register
if(ADJL_OFFSET >= 0 && ADJL_OFFSET <= 8)
{
SCU_GENERAL->PASSWD = PASSWD_OPEN_ACCESS;
WR_REG( SCU_ANALOG->ANAOFFSET,
SCU_ANALOG_ANAOFFSET_ADJL_OFFSET_Msk,
SCU_ANALOG_ANAOFFSET_ADJL_OFFSET_Pos, ADJL_OFFSET);
}
}
Device Guide
19
V1.5, 2015-06
OSCILLATOR HANDLING
DCO1 calibration with respect to temperature
2.4
Temperature test for calibration code
A temperature test has been conducted on a microcontroller with and without the calibration code.
The test covered the temperature range from -40ᴼC to 105ᴼC. The device is output a 100KHz PWM
and the frequency variation on this PWM was observed.
2.4.1
Test setup
The XMC1302-T038X0200 microcontroller was tested. First, the microcontroller was run without the
calibration code and then run again with the calibration code added in the temperature chamber.
The test started at room temperature (25ᴼC), before slowly ramping up to 105ᴼC and kept there for 15
minutes. The temperature was then slowly ramped down to -40ᴼC and remained at that temperature
for 15 minutes.
The frequency variation on the PWM signal throughout the test was observed.
2.4.2
Test result
The graph show the frequency variations of the 100KHz PWM signal over the temperature range.
Without Calibration Code
Figure 6
100KHz PWM output without DCO1 calibration
With calibration
Device Guide
20
V1.5, 2015-06
OSCILLATOR HANDLING
DCO1 calibration with respect to temperature
Figure 7
100KHz PWM output with DCO1 calibration
From the observation, the frequency of the 100KHz PWM can be varied to as high as 101.4KHz at
105ᴼC and as low as 98.1KHz at -40ᴼC without the calibration code.
After adding the calibration code, the highest frequency observed was 100.4KHz at 38ᴼC – 53ᴼC and
the lowest frequency observed was 98.8KHz at -40ᴼC.
The conclusion is that frequency variation is significantly reduced after adding the calibration code.
Attention: The test results given are from only a single device although two devices go through
the test under laboratory conditions with similar results. The test results given here
are for reference purposes only.
Typically the clock accuracy with respect to the nominal frequency is expected to be improved by a
factor of 2 for temperatures above 0°C.
The
example
project
for
DCO
calibration
with
respect
to
temperature
(DCO_Calibration_Example_XMC13) is downloadable from DAVE 3 Support Portal:
http://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html
Device Guide
21
V1.5, 2015-06
w w w . i nf i n eo n. com
Published by Infineon Technologies AG
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement