Device Guide XMC4500
Capture Compare Unit - CCU4
Confidential List of Tables
Table of Contents
1 CCU Basics ......................................................................................................................................... 6
1.1 Basic Timer Functions .......................................................................................................................... 7
1.1.1 The Compound CAPCOM4 System CCU40 – CCU43 ........................................................................ 7
1.2 CCU Use Cases ................................................................................................................................... 9
1.3 Typical Use Case Features of the CAPCOM4/8 .................................................................................. 9
2 Additional CCU Features ................................................................................................................. 10
2.1 Single Shot ......................................................................................................................................... 10
2.2 Timer Concatenation .......................................................................................................................... 10
2.3 Dithering PWM ................................................................................................................................... 10
2.4 Dithering Period Time ........................................................................................................................ 10
2.5 Floating Prescaler .............................................................................................................................. 10
2.6 External Modulation ........................................................................................................................... 10
2.7 Output State Override ........................................................................................................................ 10
2.8 Multi Channel Control ......................................................................................................................... 10
2.8.1 Multi Channel Use Case .................................................................................................................... 11
2.9 Timer Load Function .......................................................................................................................... 11
2.10 Trap Function ..................................................................................................................................... 11
2.11 Asymmetric Compare ......................................................................................................................... 11
3 CCU4 Input Control .......................................................................................................................... 11
3.1 Synchronized Control of CAPCOM Units on External Events ........................................................... 11
3.2 External Control Basics ...................................................................................................................... 11
3.3 External Events Control ..................................................................................................................... 11
3.4 External Events Sources .................................................................................................................... 12
3.5 External Events Input Functions ........................................................................................................ 12
3.5.1 Extended Input Functions .................................................................................................................. 12
4 Capture Basics ................................................................................................................................. 12
5 CCU4 Output Control ....................................................................................................................... 13
5.1 External Control by Timer Events ...................................................................................................... 13
5.2 Top-Level Control of Event Requests to/from a Timer Slice .............................................................. 14
6 Compare Basics ............................................................................................................................... 14
6.1.1 CCU4 Shadow Transfers ................................................................................................................... 14
6.1.2 Shadow Transfer of Compare Register values .................................................................................. 14
6.2 Asymmetric Compare Events ............................................................................................................. 15
6.3 Shadow Transfers in General - Compound Shadow Transfers ......................................................... 16
6.4 CCU4 Output State and Output Pin PASSIVE / ACTIVE Level Control ............................................ 16
7 How to Start a Timer ........................................................................................................................ 16
7.1 CAPCOM4 Ultimate Initialization Sequence ...................................................................................... 16
7.2 Ultimate Start-Up Enable ................................................................................................................... 16
7.3 Start Timer Running ........................................................................................................................... 16
7.4 Global Start of CAPCOM Units .......................................................................................................... 17
7.5 Global Start of the CAPCOM Units CCU4 and CCU8 ....................................................................... 17
8 Getting Started with Capture Compare Unit - CCU4 ..................................................................... 18
8.1 How to Start Timer CC4y (y=0-3) ....................................................................................................... 18
8.1.1 Example 1: Start Timer by SW (by Instruction) .................................................................................. 18
8.2 Example 2: Start Timer by HW (by External Event) ........................................................................... 18
8.2.1 External Events Control Setup Registers ........................................................................................... 18
8.2.2 Using the External Start Control Register Bitfields ............................................................................ 18
8.2.3 Example 3: Start Timers Synchronized (by Global Command) ......................................................... 18
9 Runtime Handling of Capture Compare Unit – CCU4 ................................................................... 19
9.1 Example: Handling Shadow Transfers ............................................................................................... 19