Migration Guide - XMC1000/XMC4000 - Migration from CCU6 to CCU4/CCU8/POSIF

Migration Guide - XMC1000/XMC4000 - Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000
Microcontroller Series
for Industrial Applications
Mig rati on fro m C C U 6 to
CC U 4/ CC U8/ P O SIF
Mig rati on Gui de
V1.0 2013-06
Microcontrollers
Edition 2013-06
Published by
Infineon Technologies AG
81726 Munich, Germany
© 2013 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.
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Revision History
Revision History
Page or Item
Subjects (major changes since previous revision)
V1.0, 2013-06
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
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Table of Contents
Table of Contents
Revision History .................................................................................................................................................... 3
Table of Contents .................................................................................................................................................. 4
1
1.1
1.2
1.3
Overview ............................................................................................................................................. 5
Intended audience ................................................................................................................................ 5
Scope and purpose .............................................................................................................................. 5
References ........................................................................................................................................... 5
2
2.1
2.2
2.3
2.4
Half-Bridge PWM ................................................................................................................................ 6
CCU6 features...................................................................................................................................... 6
Using CCU8 ......................................................................................................................................... 6
CCU8 versus CCU6 features ............................................................................................................... 6
Document references ........................................................................................................................... 6
3
3.1
3.2
3.3
Multi-Channel Mode ........................................................................................................................... 7
CCU6 features...................................................................................................................................... 7
Using CCU4 and CCU8 ....................................................................................................................... 7
Document references ........................................................................................................................... 7
4
4.1
4.2
4.3
4.4
Hall Effect Mode ................................................................................................................................. 8
Description ........................................................................................................................................... 8
CCU6 features...................................................................................................................................... 8
Using CCU4, CCU8 and POSIF ........................................................................................................... 8
Document references ........................................................................................................................... 9
5
5.1
5.2
5.3
Input Capture Modes ....................................................................................................................... 10
CCU6 features.................................................................................................................................... 10
Using CCU4 and CCU8 ..................................................................................................................... 10
Document references ......................................................................................................................... 10
6
6.1
6.2
6.3
Trap Features.................................................................................................................................... 11
CCU6 features.................................................................................................................................... 11
Using CCU4 and CCU8 ..................................................................................................................... 11
Document references ......................................................................................................................... 11
7
Conclusion ........................................................................................................................................ 12
Migration Guide
4
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Overview
1
Overview
The CCU6 (Capture Compare Unit6) module found in the Infineon XC800 8-bit, XC2000/XE166 16-bit and some
TriCore™ 32-bit MCUs is often used for motor control and power supply applications. In the XMC1000 and
XMC4000 family of products from Infineon, the CCU4s, CCU8s and POSIF peripherals are designed for these
applications and provide features that are similar to those of the CCU6.
When combined, the CCU4, CCU8 and POSIF offer all the functionality of the CCU6 together with many extra
features and performance enhancements.
1.1
Intended audience
This document is intended for users that are already familiar with the CCU6 and want to know how to implement
similar functionality in the XMC1000 or XMC4000 products.
1.2
Scope and purpose
We focus specifically on the following CCU6 features:

Half-Bridge PWM

Multi-Channel Mode

Hall Effect Mode

Input Capture Modes

Trap Features
Although the CCU4, CCU8 and POSIF support all of CCU6 peripheral functionality, it is not possible to create a
simple formula or table for one-to-one conversion between peripherals. For example, it is not possible to say: “If
bit x is set in the CCU6, set bit y in the CCU8 to achieve the same functionality”. Instead we focus on a feature
comparison between the CCU6 and the CCU4, CCU8, and POSIF modules, with references to specific User
Guides that describe the detail of how to implement the required feature.
1.3
References
For the complete list of available documents, please refer to the XMC web pages:

XMC1000 (See the ‘User Guide’ section for peripheral Device Guides)

XMC4000 (See the ‘User Guide’ section for peripheral Device Guides)

www.infineon.com/xmc
Migration Guide
5
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Half-Bridge PWM
2
Half-Bridge PWM
2.1
CCU6 features
The CCU6 can generate PWM to control up to 3 half-bridges with dead-time. The basic features and restrictions
that the CCU6 places on half-bridge PWM generation are:

All 3 channels use Timer 12 (T12) as a time base (unless Multi-Channel or Hall Effect Modes are used). This
means that the 3 PWM signals must all have the same frequency.

The CCU6 can insert a programmable dead-time in the half-bridges, but the dead time must be the same for
the rising and falling edges. The dead-time counter is a 5-bit timer that counts at the same frequency as T12.

There is only one compare register per channel so the PWM must be symmetric when T12 is in the center
aligned (up/down) counting mode.
2.2
Using CCU8
The CCU8 can be used to create PWM that is identical to that produced by the CCU6, however the structure of
the CCU8 is a bit different.
The CCU8 consists of 4 slices, and each slice has 2 compare channels and can generate PWM to control up to
2 half-bridges with dead-time. In total up to 8 half-bridges can be controlled per CCU8 module.
2.3
CCU8 versus CCU6 features
Compared to the CCU6, the CCU8 has the following interesting features:

Each slice has its own 16-bit timer, so a CCU8 module can produce PWM with up to 4 different frequencies.
The timers and the shadow register updates can be synchronized if fewer than 4 different frequencies are
required.

Each channel of each slice has a programmable dead-time for both the falling and rising edges of the PWM,
so asymmetric dead-time is supported. The dead-time counters are 8-bits wide and can be clocked by the
slice clock with a programmable prescaler (ftclk, ftclk/2, ftclk/4 or ftclk/8) so much longer dead-times can be
achieved compared with the CCU6.

The 2 compare channels of each slice can be combined to create a single PWM output with one compare
register controlling the rising edge and the other compare channel controlling the falling edge when the timer
is in the center aligned (up/down) counting mode. This allows asymmetric PWM in center aligned mode (with
or without dead-time)

The CCU8 supports dithered PWM.

The CCU8 timers can be concatenated to create 32, 48 or 64-bit timers.
2.4
Document references
For more information about the CCU8 features described and how to use them, please see the following
chapters of the document Device Guide – CCU8 (See the ‘User Guide’ section of the XMC1000 or XMC4000
Infineon web pages):

Introduction to the Basic Features

Output Pattern Generation using the Compare Mode

Signal Quantification & Quality Enhancement by Dithering

Dead Time Generation

Asymmetric PWM
Migration Guide
6
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Multi-Channel Mode
3
Multi-Channel Mode
3.1
CCU6 features
The CCU6 Multi-Channel Mode is a subset of the Hall Effect Mode that is often used for BLDC or Stepper motor
control.
The Multi-Channel Mode allows one register (MCMOUT) to control which of the six T12 outputs are active or
passive. When an output pin is active, the MODCTR register controls which pins get PWM from either T12 or
T13.
MCMOUT register updates can be synchronized to PWM edges and/or a Correct Hall Event (CHE). See the
section on Hall Effect Mode for further details on CHE.
3.2
Using CCU4 and CCU8
The CCU4 and CCU8 both have a Multi-Channel Mode. Generally speaking, the CCU4 can be used for multichannel PWM that does not require synchronous rectification, and the CCU8 can be used when synchronous
rectification (with or without dead-time) is required. The output pattern is located in the MCMP bit-field of the
MCM register of the POSIF peripheral. So the POSIF works together with the CCU4 or CCU8 to achieve MultiChannel Mode.
The CCU4 and CCU8 peripherals do not have MODCTR registers. When the output pin is Active (i.e. there is a
‘1’ in the corresponding MCMP bit) the PWM from that slice will be gated to the pin, unless a trap, modulation
event or override event prevents this. If it is a requirement to have a pin that is always high or low, the
appropriate compare value must be set. The Multi-Channel Mode of CCU4 and CCU8 is similar to that of the
CCU6 with the T12 related MODCTR bits set.
3.3
Document references
A detailed description of how to setup and use the Multi-Channel Mode can be found in the following chapters of
the respective User Guides (See the ‘User Guide’ section of the XMC1000 or XMC4000 Infineon web pages):

Device Guide – CCU4
− Multi-Phase Output control using the Multi-Channel Mode

Device Guide – CCU8
− Multi-Phase Output control using the Multi-Channel Mode

Device Guide - POSIF
− Multi-Channel Multi-Phase Control
Migration Guide
7
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Hall Effect Mode
4
Hall Effect Mode
4.1
Description
The CCU6 has a special Hall Effect Mode to simplify control of a 3 phase BLDC motor using trapezoidal (6-step
or 12-step) control. There is also a “Reduced Hall Mode” that offers additional functionality (mainly synchronous
rectification) at the expense of automatic speed measurement and angle based delays.
To achieve the same or enhanced functionality, the CCU4 and/or CCU8 are implemented in combination with
the POSIF peripheral. The initial setup of these peripherals is more complex than setting up the Hall Effect
Mode of the CCU6, but there are User Guides and DAVE™ Apps available for free download from the Infineon
website to help ease the setup.
4.2
CCU6 features
The basic features of the CCU6 Hall Effect Mode are:

Three input Signals from latched Hall Effect sensors are monitored for any change in state. When any
sensor changes state, the dead-time counter delays a programmable amount of time and the senor state is
re-evaluated to see if the original transition was real or noise.

The noise filtered sensor state is compared to the next expected state (contained in the MCMOUT register)
to see if the motor is spinning as expected. If the sensor state does not match the expected state this is a
Wrong Hall Event (WHE). The sensors can be ignored or the CCU6 can be placed in IDLE mode where the
outputs are placed in the passive state.

If the sensor state matches the expected state a Correct Hall Event (CHE) internal signal is generated and
the value of T12 is captured into the capture/compare register 0. T12 is reset to zero and continues
counting. Capture/Compare register 0 therefore indicates the speed of the motor.

The MCMOUTS shadow register contains a bit-field for the next output pattern. This bit-field indicates which
of the 6 outputs will be “active”. Whether the “active” outputs receive PWM from T13 is determined by the
MODCTR register. The transfer from the shadow register to the actual register can be triggered by one of
several events including a CHE (for immediate commutation) or when T12 equals the value of compare
register 1 (for a phase delay).
4.3
Using CCU4, CCU8 and POSIF
The CCU6 functionality can be implemented with the combination of the CCU4, CCU8 and POSIF peripherals,
but the implementation is quite different:

The three Hall Effect sensors are connected to the POSIF. When the POSIF detects a change on the
sensors, it triggers a CCU4 (typical) or CCU8 timer in single shot mode to perform a noise filtering delay.
This is similar to how the CCU6 dead-timer counter is used. When the CCU4 or CCU8 timer expires, the
POSIF samples the three inputs again.

The POSIF contains registers that have the current and expected sensors state and can trigger a CHE or
WHE similar to the CCU6. These events can then be connected to the CCU4 or CCU8 running in MultiChannel Mode to trigger updates of the actual output states, or further delays (phase delays).

In the XMC family there is no MODCTR register so the active outputs are always gated by the PWM signal.
For an output to be high or low all of the time, the duty appropriate compare value should be used.

The output pattern shadow transfer occurs after the following 2 events
− After the CHE has become active a phase delay (MSET signal of the POSIF) is required before the output
pattern can be updated. The delay can be small, but must be at least several clock cycles. The delay also
clears the internal CHE signal.
− The update of the output pattern (MCMP) must also be synchronized to another signal (e.g. PWM
synchronization) after the phase delay, for the shadow transfer to occur. This is achieved via the MSYNC
input of the POSIF. If PWM synchronization is not required, then an additional CCU4 or CCU8 slice can
be setup to generate a high frequency MSYNC signal so that the delay between CHE and the output
pattern update is minimized.
Migration Guide
8
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Hall Effect Mode
4.4
Document references
For more information about using the CCU4, CCU8 and POSIF peripherals to achieve the Hall Effect mode
found with CCU6, please refer to the following chapters of the respective User Guides (See the ‘User Guide’
section of the XMC1000 or XMC4000 Infineon web pages):

Device Guide – CCU4
− Multi-Phase Output control using the Multi-Channel Mode

Device Guide – CCU8
− Multi-Phase Output control using the Multi-Channel Mode

Device Guide - POSIF
− Triple-Hall Commutation Control for BLDC motor
Migration Guide
9
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Input Capture Modes
5
Input Capture Modes
5.1
CCU6 features
In the CCU6:

9 capture modes are supported for each of the 3 input channels.

Each of the capture modes are selected using the MSEL6x bit-fields of the T12MSEL register.

Four of the capture modes use one input per channel (CC6xIN).

The remaining five capture modes use 2 inputs per channel (CC6xIN and CCPOSx).

Each channel of input capture can store the T12 contents (or previously captured value) into the CC6xR or
CC6xSR register.

All of the channels use T12 as the time base.
5.2
Using CCU4 and CCU8
The CCU6 Input Capture Modes functionality is reproducible in the CCU4 and CCU8, however the
implementation is different and additional features are also available.
In CCU4 and CCU8:

Each slice supports up to 2 inputs for capture and up to 4 registers to store the captured timer values.

Since each slice has its own timer, and many more time bases can be used.

The timers can be concatenated for capturing 32, 48 or 64-bit time values.

The Floating Prescaler mode can be used to capture signals with unknown or highly dynamic timing.

Hardware low pass filtering can, if required, be performed on the capture inputs.
5.3
Document references
For more information on how to setup and use the Input Capture features of the CCU4 and CCU8, please refer
to the following chapters of the respective User Guides (See the ‘User Guide’ section of the XMC1000 or
XMC4000 Infineon web pages):

Device Guide – CCU4
− Advanced Signal Measurement using the Capture Mode
− External Events Control
− Autonomic Signal Measurement Range Adaption using the Floating Prescaler

Device Guide – CCU8
− Advanced Signal Measurement using the Capture Mode
− External Events Control
− Autonomic Signal Measurement Range Adaption using the Floating Prescaler
Migration Guide
10
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Trap Features
6
Trap Features
6.1
CCU6 features
The CCU6 module has an input signal that, when pulled low, can put any or all of the output pins into a
programmable “passive” state. The signal is connected to a /CTRAP pin and on some devices it is also
connected to internal sources such as an out of range comparator or ADC boundary flag.
This Trap feature is generally used for over current/voltage protection in a motor control or power supply type of
application. One Trap signal is used for the whole CCU6 module and the Trap signal is always active low. It is
possible to leave the Trap state via hardware or software, and it can be optionally synchronized to PWM events
to prevent glitches.
6.2
Using CCU4 and CCU8
Features
The CCU4 and CCU8 support Trap functions with all of the same capability as the CCU6, but also with these
additional features:

One Trap input is available per slice

The Trap signal can be active high or low

An optional hardware low pass filter can be used on the signal

The Trap signals can come from many more internal or external sources
Implementation

The Trap input always uses input Event 2 on each slice.

The Trap is cleared via software using the CC4yINTS.E2AS or CCU8yINTS.E2AS bit.

Hardware clearing of the Trap and synchronization to PWM events is setup in the CC4yTC or CCU8yTC
registers.

The reference manual for each device describes the Trap feature in detail.
6.3
Document references
The following chapters of the respective User Guides describe how to setup the input signals (See the ‘User
Guide’ section of the XMC1000 or XMC4000 Infineon web pages):

Device Guide – CCU4
− External Events Control

Device Guide – CCU8
− External Events Control
Migration Guide
11
V1.0, 2013-06
Migration from CCU6 to CCU4/CCU8/POSIF
XMC1000, XMC4000 Family
Conclusion
7
Conclusion
The CCU4, CCU8 and POSIF peripherals found in the XMC1000 and XMC4000 products offer all of the
functionality of the CCU6 peripheral found in other Infineon devices, but with significant additional features that
reduce software overhead and increase accuracy and performance. These peripherals are designed with
repetitive structures that make automatic code generation easier.
The DAVE™ 3 tool with the DAVE™ Apps can be used to handle the most common use cases for the CCU4,
CCU8 and POSIF. Additionally, example projects, and Users Guides are available for download to ease the
learning curve and help speed-up development and implementation.
Migration Guide
12
V1.0, 2013-06
w w w . i n f i n e o n . c o m
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