manuals.online logo
Brands
  1. Home
  2. •
  3. Brands
  4. •
  5. Infineon Technologies
  6. •
  7. Microcontroller
  8. •
  9. Infineon Technologies XMC4000 Application Kit User manual

Infineon Technologies XMC4000 Application Kit User manual

Microcontroller
XMC4000
XMC4500 Family
User Guide
Device Guide
<Revision 1.0>, <2012-30-03>
CCU4 and External Load
Timer Reload on External Events
Edition <2012-30-03>
Published by
Infineon Technologies AG
81726 Munich, Germany
© 2012 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.
Device Guide XMC4500
External Load - CCU4
Confidential
Revision History
Page or Item
Subjects (major changes since previous revision)
<Revision 1.0>, <2012-30-03>
Trademarks of Infineon Technologies AG
AURIX™, C166™, CanPAK™, CIPOS™, CIPURSE™, EconoPACK™, CoolMOS™, CoolSET™,
CORECONTROL™, CROSSAVE™, DAVE™, EasyPIM™, EconoBRIDGE™, EconoDUAL™, EconoPIM™,
EiceDRIVER™, eupec™, FCOS™, HITFET™, HybridPACK™, I²RF™, ISOFACE™, IsoPACK™, MIPAQ™,
ModSTACK™, my-d™, NovalithIC™, OptiMOS™, ORIGA™, 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. Mifare™ of NXP. 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-02-24
Device Guide XMC4500
External Load - CCU4
Confidential List of Figures
Table of Contents
1Timer Reload on External Events.....................................................................................................5
1.1 Timer Load Basics................................................................................................................................5
1.2 Timer Load by External Events Control ...............................................................................................5
2Getting Started with CCU4 and External Load................................................................................7
2.1 Ultimate Initialization Sequence...........................................................................................................7
2.1.1 Ultimate Start-Up Enable .....................................................................................................................7
2.2 External Events Control Setup Registers.............................................................................................7
2.2.1 Using the External Load Control Register Bitfields..............................................................................7
2.2.2 Using the External Up/Down Control Register Bitfields .......................................................................7
2.3 Pseudo Code for the External Load Setup ..........................................................................................7
List of Figures
Figure 1 CCU4 Basic Slice and Timer Load on External Events.......................................................................5
Figure 2 Timer Load Selection Control...............................................................................................................5
Figure 3 Timer Reload from Compare Register or Period Register on External Events ...................................6
Device Guide XMC4500
External Load - CCU4
Confidential Timer Reload on External Events
1 Timer Reload on External Events
Each CAPCOM4 (CCU40/../43) is a multi-purpose timer unit for many use cases. It is designed with repetitive
structures with multiple timer slices that have all the same base functionalities. This allows the development of
re-usable SW low level drivers. The main function blocks of 1 of the 4 CC4y slices on a CCU4x are shown here.
See Figure 1.
Figure 1 CCU4 Basic Slice and Timer Load on External Events
1.1 Timer Load Basics
See Figure 2.
An external source may trigger a Timer Reload transfer from either the compare register CRy (if counting up) or
from the period register PRy (if counting down). The count direction bit CC4yTCST.CDIR can be set by HW by
another source. The input source(s) and function(s) should be mapped to the CC4yINS & CC4yCMC registers.
Figure 2 Timer Load Selection Control
1.2 Timer Load by External Events Control
This scenario regards how to link the Timer Load input function to external trigger requests –from any of the
following sources: GPIO, ERU, POSIF, CAN, CCU4x, USIC, ADC, CCU8x or SCU. Pin Connections are given
by the Top-Level Interconnect and the CC4yINS[P:A] Input Select - and Load function by the CC4yCMC.LDS.
Device Guide XMC4500
External Load - CCU4
Confidential Timer Reload on External Events
See Figure 3.
Figure 3 Timer Reload from Compare Register or Period Register on External Events
Device Guide XMC4500
External Load - CCU4
Confidential Getting Started with CCU4 and External Load
2 Getting Started with CCU4 and External Load
2.1 Ultimate Initialization Sequence
Before start and execution of a timer slice SW first time, the CAPCOM4 must have been initialized appropriately
according to a specific CAPCOM4 Initialization Sequence: 1. Apply Reset, 2. Release Reset, 3. Enable Clock,
4. Enable Prescaler Block, 5. Configure Global Control, 6. Configure Slice(s) Functions, Interrupts and Start-up.
2.1.1 Ultimate Start-Up Enable
In the last part of the ultimate CAPCOM4 Initialization Sequence the startup value(s) for a specific Compare
Channel Status of the Timer Slice(s) may be configured by the respective GCSS.SyTS bit. After that the default
IDLE mode has to be removed from the Timer Slice(s) in register GIDLC and Start or Global Start can be done!
All these topics are covered in detail by the Reference Manual: <<< Link to 23.6.1 Initialization Sequence >>>
2.2 External Events Control Setup Registers
The Input Selection register CC4yINS maps External-Event-Sources and Edge/Level Mode conditions to the
Event[2:0] Input Lines. In turn the Connection Matrix Control register CC4yCMC maps the three Event[2:0] Input
Lines to any of the 11 Input Functions. The Timer Status bit CC4yTCST.CDIR controls the Counting Direction.
2.2.1 Using the External Load Control Register Bitfields
1. CC4yCMC.LDS Map the Load Function Selector to an Event Input Line Number x=0-2
2. CC4yINS.<Event-x bitfields> Event-x Source EVxIS (CC4yINS[P:A]) and Edge Mode EVxEM bitfields
2.2.2 Using the External Up/Down Control Register Bitfields
3. CC4yCMC.UDS Map the Up/Down Function Selector to an Event Input Line Number x=0-2
4. CC4yINS.<Event-x bitfields> Event-x Source EVxIS (CC4yINS[P:A]) and Level Mode EVxLM bitfields
Note:The Up/Down Counting Direction control works indirectly via the unwritable CC4yTCST.CDIR status bit
Note:The External Load function is Edge Sensitive.
Note:The External Up/Down Direction Control function is Level Sensitive.
Note:When using the index ‘x’ in event nomenclature, it should be understood as ‘Actual Event[2:0] Number ’.
Note:When using the index ‘x’ in CCU4x nomenclature, it should be understood as ‘Actual CCU4 Unit Number’.
Note:The Ultimate Event

Number ‘x’ for the LDS Input Function is always x == <LDS>-1 (when <LDS> != 0).
2.3 Pseudo Code for the External Load Setup
// This is an independent 32-bit based Pseudo Code, regarding that there are no
connections to a certain CAPCOM4 Unit (CCU4x) nor specific Variable Declarations.
// step1
// Make a MASK OPERATION first for bitfield focusing –if not first time –else:
CC4yCMC |= LDS_FUNCTION_AND_EVENT_NUMBER_BITFIELD //Initialize Load and Event Nr
// step 2
CC4yINS &= LDS_SOURCE_AND_EVENT_MODES_BITFIELDS_MASK; //Focus on bitfields
CC4yINS |= LDS_SOURCE_AND_EVENT_MODES_BITFIELDS_PATTERN; //Paste setup pattern
// step3
CC4yCMC |= UDS_FUNCTION_AND_EVENT_NUMBER_BITFIELD //Initialize UDS and Event Nr
// step 4
Device Guide XMC4500
External Load - CCU4
Confidential Getting Started with CCU4 and External Load
CC4yINS &= UDS_SOURCE_AND_EVENT_MODES_BITFIELDS_MASK; // Focus on bitfields
CC4yINS |= UDS_SOURCE_AND_EVENT_MODES_BITFIELDS_PATTERN; //Paste setup pattern
// step 1 & 3 could naturally be merged into one operation sequence, as follows:
// Make a MASK OPERATIONS first for bitfield focusing –if not first time –else:
CC4yCMC |= LDS_AND_UDS_FUNCTIONS_AND_EVENTS_NRS_BITFIELDS //Init Ext. Load and UDS
// step 2 & 4 could naturally be merged into one operation sequence, as follows:
CC4yINS &= LDS_UDS_SOURCES_AND_EVENTS_MODES_BITFIELDS_MASK; //Focus on bitfielfs
CC4yINS |= LDS_UDS_SOURCES_AND_EVENTS_MODES_BITFIELDS_PATTERN; //Paste all setups!
w w w . i n f i n e o n . c o m
Published by Infineon Technologies AG

Other manuals for XMC4000 Application Kit

3

Other Infineon Technologies Microcontroller manuals

Infineon Technologies C166S V2 User manual

Infineon Technologies

Infineon Technologies C166S V2 User manual

Infineon Technologies TriBoard TC2X3 User manual

Infineon Technologies

Infineon Technologies TriBoard TC2X3 User manual

Infineon Technologies XMC4000 Application Kit User manual

Infineon Technologies

Infineon Technologies XMC4000 Application Kit User manual

Infineon Technologies XC800 User manual

Infineon Technologies

Infineon Technologies XC800 User manual

Infineon Technologies XMC4500 Relax kit User manual

Infineon Technologies

Infineon Technologies XMC4500 Relax kit User manual

Infineon Technologies XMC4000 Application Kit User manual

Infineon Technologies

Infineon Technologies XMC4000 Application Kit User manual

Infineon Technologies XC82x User manual

Infineon Technologies

Infineon Technologies XC82x User manual

Infineon Technologies TC1784 User manual

Infineon Technologies

Infineon Technologies TC1784 User manual

Infineon Technologies TC1728 User manual

Infineon Technologies

Infineon Technologies TC1728 User manual

Infineon Technologies TLE9844-2QX User manual

Infineon Technologies

Infineon Technologies TLE9844-2QX User manual

Infineon Technologies XMC4500 series User manual

Infineon Technologies

Infineon Technologies XMC4500 series User manual

Infineon Technologies XC164CS-8FF User manual

Infineon Technologies

Infineon Technologies XC164CS-8FF User manual

Infineon Technologies XMC1000 User manual

Infineon Technologies

Infineon Technologies XMC1000 User manual

Infineon Technologies XMC4000 Application Kit User manual

Infineon Technologies

Infineon Technologies XMC4000 Application Kit User manual

Infineon Technologies CYPRESS Traveo Series User manual

Infineon Technologies

Infineon Technologies CYPRESS Traveo Series User manual

Popular Microcontroller manuals by other brands

NXP Semiconductors KL25 Series Reference manual

NXP Semiconductors

NXP Semiconductors KL25 Series Reference manual

Atmel AT90S2313 manual

Atmel

Atmel AT90S2313 manual

Texas Instruments RM46 user guide

Texas Instruments

Texas Instruments RM46 user guide

ST ST25R3911B-DISCO user manual

ST

ST ST25R3911B-DISCO user manual

Rockwell ZODIAC Set up and operation guide

Rockwell

Rockwell ZODIAC Set up and operation guide

Abov A96G140 user manual

Abov

Abov A96G140 user manual

mikroElektronika ROTARY Y click quick start guide

mikroElektronika

mikroElektronika ROTARY Y click quick start guide

Renesas SKP36912G user manual

Renesas

Renesas SKP36912G user manual

Atmel AVR2054 user guide

Atmel

Atmel AVR2054 user guide

LAPIS Semiconductor ML62Q1000 Series user manual

LAPIS Semiconductor

LAPIS Semiconductor ML62Q1000 Series user manual

Holtek HT46R64 user manual

Holtek

Holtek HT46R64 user manual

NXP Semiconductors FRDM665SPIEVB user manual

NXP Semiconductors

NXP Semiconductors FRDM665SPIEVB user manual

ARTERY AT32F403 Series Get started guide

ARTERY

ARTERY AT32F403 Series Get started guide

Texas Instruments SimpleLink Wi-Fi BoosterPack CC3135 user guide

Texas Instruments

Texas Instruments SimpleLink Wi-Fi BoosterPack CC3135 user guide

NXP Semiconductors UM11483 user manual

NXP Semiconductors

NXP Semiconductors UM11483 user manual

ZiLOG Z8 Encore! quick start guide

ZiLOG

ZiLOG Z8 Encore! quick start guide

Embedded Artists LPC1343 user guide

Embedded Artists

Embedded Artists LPC1343 user guide

Texas Instruments TMS320C6000 DSP Design guide

Texas Instruments

Texas Instruments TMS320C6000 DSP Design guide

manuals.online logo
manuals.online logoBrands
  • About & Mission
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Copyright 2025 Manuals.Online. All Rights Reserved.