XMC Peripheral Library for XMC4000 Family: CCU8

XMC Peripheral Library for XMC4000 Family

XMC Peripheral Library for XMC4000 Family  2.1.16

Data Structures

struct  XMC_CCU8_SLICE_CAPTURE_CONFIG_t
 
struct  XMC_CCU8_SLICE_COMPARE_CONFIG_t
 
struct  XMC_CCU8_SLICE_DEAD_TIME_CONFIG_t
 
struct  XMC_CCU8_SLICE_EVENT_CONFIG_t
 

Typedefs

typedef CCU8_GLOBAL_TypeDef XMC_CCU8_MODULE_t
 
typedef uint8_t XMC_CCU8_SLICE_INPUT_t
 
typedef CCU8_CC8_TypeDef XMC_CCU8_SLICE_t
 

Enumerations

Functions

void XMC_CCU8_DisableClock (XMC_CCU8_MODULE_t *const module, const uint8_t slice_number)
 
void XMC_CCU8_DisableModule (XMC_CCU8_MODULE_t *const module)
 
void XMC_CCU8_EnableClock (XMC_CCU8_MODULE_t *const module, const uint8_t slice_number)
 
void XMC_CCU8_EnableModule (XMC_CCU8_MODULE_t *const module)
 
void XMC_CCU8_EnableMultipleClocks (XMC_CCU8_MODULE_t *const module, const uint8_t clock_mask)
 
void XMC_CCU8_EnableShadowTransfer (XMC_CCU8_MODULE_t *const module, const uint32_t shadow_transfer_msk)
 
void XMC_CCU8_Init (XMC_CCU8_MODULE_t *const module, const XMC_CCU8_SLICE_MCMS_ACTION_t mcs_action)
 
bool XMC_CCU8_IsPrescalerRunning (XMC_CCU8_MODULE_t *const module)
 
void XMC_CCU8_SetModuleClock (XMC_CCU8_MODULE_t *const module, const XMC_CCU8_CLOCK_t clock)
 
void XMC_CCU8_SetMultiChannelShadowTransferMode (XMC_CCU8_MODULE_t *const module, const uint32_t slice_mode_msk)
 
void XMC_CCU8_SLICE_Capture0Config (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event)
 
void XMC_CCU8_SLICE_Capture1Config (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event)
 
void XMC_CCU8_SLICE_CaptureInit (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_CAPTURE_CONFIG_t *const capture_init)
 
void XMC_CCU8_SLICE_ClearEvent (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_IRQ_ID_t event)
 
void XMC_CCU8_SLICE_ClearTimer (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_CompareInit (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_COMPARE_CONFIG_t *const compare_init)
 
void XMC_CCU8_SLICE_ConfigureDeadTime (XMC_CCU8_SLICE_t *const slice, const uint8_t mask)
 
void XMC_CCU8_SLICE_ConfigureEvent (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event, const XMC_CCU8_SLICE_EVENT_CONFIG_t *config)
 
void XMC_CCU8_SLICE_ConfigureStatusBitOutput (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_STATUS_t channel)
 
void XMC_CCU8_SLICE_ConfigureStatusBitOverrideEvent (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_CONFIG_t *const ev1_config, const XMC_CCU8_SLICE_EVENT_CONFIG_t *const ev2_config)
 
void XMC_CCU8_SLICE_CountConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event)
 
void XMC_CCU8_SLICE_DeadTimeInit (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_DEAD_TIME_CONFIG_t *const config)
 
void XMC_CCU8_SLICE_DirectionConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event)
 
void XMC_CCU8_SLICE_DisableAutomaticShadowTransferRequest (XMC_CCU8_SLICE_t *const slice, const uint32_t automatic_shadow_transfer)
 
void XMC_CCU8_SLICE_DisableCascadedShadowTransfer (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_DisableDithering (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_DisableEvent (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_IRQ_ID_t event)
 
void XMC_CCU8_SLICE_DisableFloatingPrescaler (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_DisableMultiChannelMode (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_COMPARE_CHANNEL_t ch_num)
 
void XMC_CCU8_SLICE_DisableMultipleEvents (XMC_CCU8_SLICE_t *const slice, const uint16_t mask)
 
void XMC_CCU8_SLICE_DisableTrap (XMC_CCU8_SLICE_t *const slice, const uint32_t out_mask)
 
void XMC_CCU8_SLICE_EnableAsymmetricCompareMode (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_EnableAutomaticShadowTransferRequest (XMC_CCU8_SLICE_t *const slice, const uint32_t automatic_shadow_transfer)
 
void XMC_CCU8_SLICE_EnableCascadedShadowTransfer (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_EnableDithering (XMC_CCU8_SLICE_t *const slice, const bool period_dither, const bool duty_dither, const uint8_t spread)
 
void XMC_CCU8_SLICE_EnableEvent (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_IRQ_ID_t event)
 
void XMC_CCU8_SLICE_EnableFloatingPrescaler (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_EnableMultiChannelMode (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_COMPARE_CHANNEL_t ch_num)
 
void XMC_CCU8_SLICE_EnableMultipleEvents (XMC_CCU8_SLICE_t *const slice, const uint16_t mask)
 
void XMC_CCU8_SLICE_EnableSymmetricCompareMode (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_EnableTrap (XMC_CCU8_SLICE_t *const slice, const uint32_t out_mask)
 
void XMC_CCU8_SLICE_GateConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event)
 
uint32_t XMC_CCU8_SLICE_GetCapturedValueFromFifo (const XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_CAP_REG_SET_t set)
 
uint32_t XMC_CCU8_SLICE_GetCaptureRegisterValue (const XMC_CCU8_SLICE_t *const slice, const uint8_t reg_num)
 
XMC_CCU8_SLICE_TIMER_COUNT_DIR_t XMC_CCU8_SLICE_GetCountingDir (const XMC_CCU8_SLICE_t *const slice)
 
bool XMC_CCU8_SLICE_GetEvent (const XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_IRQ_ID_t event)
 
XMC_CCU8_STATUS_t XMC_CCU8_SLICE_GetLastCapturedTimerValue (const XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_CAP_REG_SET_t set, uint32_t *val_ptr)
 
XMC_CCU8_SLICE_MODE_t XMC_CCU8_SLICE_GetSliceMode (const XMC_CCU8_SLICE_t *const slice)
 
uint16_t XMC_CCU8_SLICE_GetTimerCompareMatch (const XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_COMPARE_CHANNEL_t channel)
 
XMC_CCU8_SLICE_TIMER_COUNT_MODE_t XMC_CCU8_SLICE_GetTimerCountingMode (const XMC_CCU8_SLICE_t *const slice)
 
uint16_t XMC_CCU8_SLICE_GetTimerPeriodMatch (const XMC_CCU8_SLICE_t *const slice)
 
XMC_CCU8_SLICE_TIMER_REPEAT_MODE_t XMC_CCU8_SLICE_GetTimerRepeatMode (const XMC_CCU8_SLICE_t *const slice)
 
uint16_t XMC_CCU8_SLICE_GetTimerValue (const XMC_CCU8_SLICE_t *const slice)
 
bool XMC_CCU8_SLICE_IsDeadTimeCntr1Running (const XMC_CCU8_SLICE_t *const slice)
 
bool XMC_CCU8_SLICE_IsDeadTimeCntr2Running (const XMC_CCU8_SLICE_t *const slice)
 
bool XMC_CCU8_SLICE_IsExtendedCapReadEnabled (const XMC_CCU8_SLICE_t *const slice)
 
bool XMC_CCU8_SLICE_IsTimerRunning (const XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_LoadConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event)
 
void XMC_CCU8_SLICE_LoadSelector (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_COMPARE_CHANNEL_t ch_num)
 
void XMC_CCU8_SLICE_ModulationConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event, const XMC_CCU8_SLICE_MODULATION_MODE_t mod_mode, const XMC_CCU8_SLICE_MODULATION_CHANNEL_t channel, const bool synch_with_pwm)
 
void XMC_CCU8_SLICE_SetDeadTimePrescaler (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_DTC_DIV_t div_val)
 
void XMC_CCU8_SLICE_SetDeadTimeValue (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_COMPARE_CHANNEL_t channel, const uint8_t rise_value, const uint8_t fall_value)
 
void XMC_CCU8_SLICE_SetDitherCompareValue (XMC_CCU8_SLICE_t *const slice, const uint8_t comp_val)
 
void XMC_CCU8_SLICE_SetEvent (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_IRQ_ID_t event)
 
void XMC_CCU8_SLICE_SetFloatingPrescalerCompareValue (XMC_CCU8_SLICE_t *const slice, const uint8_t cmp_val)
 
void XMC_CCU8_SLICE_SetInput (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event, const XMC_CCU8_SLICE_INPUT_t input)
 
void XMC_CCU8_SLICE_SetInterruptNode (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_IRQ_ID_t event, const XMC_CCU8_SLICE_SR_ID_t sr)
 
void XMC_CCU8_SLICE_SetOutPath (XMC_CCU8_SLICE_t *const slice, const uint32_t out_path_msk)
 
void XMC_CCU8_SLICE_SetPassiveLevel (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_OUTPUT_t out, const XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_t level)
 
void XMC_CCU8_SLICE_SetPrescaler (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_PRESCALER_t div_val)
 
void XMC_CCU8_SLICE_SetShadowTransferMode (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_SHADOW_TRANSFER_MODE_t shadow_transfer_mode)
 
void XMC_CCU8_SLICE_SetTimerCompareMatch (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_COMPARE_CHANNEL_t channel, const uint16_t compare_val)
 
void XMC_CCU8_SLICE_SetTimerCompareMatchChannel1 (XMC_CCU8_SLICE_t *const slice, const uint16_t compare_val)
 
void XMC_CCU8_SLICE_SetTimerCompareMatchChannel2 (XMC_CCU8_SLICE_t *const slice, const uint16_t compare_val)
 
void XMC_CCU8_SLICE_SetTimerCountingMode (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_TIMER_COUNT_MODE_t mode)
 
void XMC_CCU8_SLICE_SetTimerPeriodMatch (XMC_CCU8_SLICE_t *const slice, const uint16_t period_val)
 
void XMC_CCU8_SLICE_SetTimerRepeatMode (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_TIMER_REPEAT_MODE_t mode)
 
void XMC_CCU8_SLICE_SetTimerValue (XMC_CCU8_SLICE_t *const slice, const uint16_t timer_val)
 
void XMC_CCU8_SLICE_StartConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event, const XMC_CCU8_SLICE_START_MODE_t start_mode)
 
void XMC_CCU8_SLICE_StartTimer (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_StatusBitOverrideConfig (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_StopClearTimer (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_StopConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_EVENT_t event, const XMC_CCU8_SLICE_END_MODE_t end_mode)
 
void XMC_CCU8_SLICE_StopTimer (XMC_CCU8_SLICE_t *const slice)
 
void XMC_CCU8_SLICE_TrapConfig (XMC_CCU8_SLICE_t *const slice, const XMC_CCU8_SLICE_TRAP_EXIT_MODE_t exit_mode, bool synch_with_pwm)
 
void XMC_CCU8_SLICE_WriteCoherentlyWithPWMCycle (XMC_CCU8_SLICE_t *const slice, const uint32_t coherent_write)
 
void XMC_CCU8_SLICE_WriteImmediateAfterShadowTransfer (XMC_CCU8_SLICE_t *const slice, const uint32_t immediate_write)
 
void XMC_CCU8_StartPrescaler (XMC_CCU8_MODULE_t *const module)
 
void XMC_CCU8_StopPrescaler (XMC_CCU8_MODULE_t *const module)
 

Detailed Description

The CCU8 peripheral functions play a major role in applications that need complex Pulse Width Modulation (PWM) signal generation, with complementary high side and low side switches, multi phase control. These functions in conjunction with a very flexible and programmable signal conditioning scheme, make the CCU8 the must have peripheral for state of the art motor control, multi phase and multi level power electronics systems.
Each CCU8 module is comprised of four identical 16 bit Capture/Compare Timer slices, CC8y (where y = [0..4]). Each timer slice can work in compare mode or in capture mode.

APIs provided in this file cover the following functional blocks of CCU8: – Timer configuration, Capture configuration, Function/Event configuration, Interrupt configuration

Note:
  1. SLICE (APIs prefixed with e.g. XMC_CCU8_SLICE_)
  2. Module (APIs are not having any prefix e.g. XMC_CCU8_)
Timer(Compare mode) configuration:
This section of the LLD provides the configuration structure XMC_CCU8_SLICE_COMPARE_CONFIG_t, XMC_CCU8_SLICE_DEAD_TIME_CONFIG_t and the initialization functions XMC_CCU8_SLICE_CompareInit(), XMC_CCU8_SLICE_DeadTimeInit().

It can be used to:

  1. Start and Stop the timer. (XMC_CCU8_SLICE_StartTimer(), XMC_CCU8_SLICE_StopTimer())
  2. Update the period, compare, Dither, Prescaler and Passive values. (XMC_CCU8_SLICE_SetTimerPeriodMatch(), XMC_CCU8_SLICE_SetTimerCompareMatch(), XMC_CCU8_SLICE_SetPrescaler(), XMC_CCU8_SLICE_SetDitherCompareValue(), XMC_CCU8_SLICE_SetPassiveLevel())
  3. Configure the dead time.(XMC_CCU8_SLICE_SetDeadTimeValue(), XMC_CCU8_SLICE_SetDeadTimePrescaler())
  4. Enable the slices to support multichannel mode. (XMC_CCU8_SLICE_EnableMultiChannelMode())
Capture configuration:
This section of the LLD provides the configuration structure XMC_CCU8_SLICE_CAPTURE_CONFIG_t and the initialization function XMC_CCU8_SLICE_CaptureInit().

It can be used to:

  1. Configure the capture functionality. (XMC_CCU8_SLICE_Capture0Config(), XMC_CCU8_SLICE_Capture1Config())
  2. Read the captured values along with the status, which indicate the value is latest or not. (XMC_CCU8_SLICE_GetCaptureRegisterValue())
Function/Event configuration:
This section of the LLD provides the configuration structure XMC_CCU8_SLICE_EVENT_CONFIG_t.

It can be used to:

  1. Enable and Disable the events. (XMC_CCU8_SLICE_EnableEvent(), XMC_CCU8_SLICE_DisableEvent())
  2. Configure to start and stop the timer on external events.(XMC_CCU8_SLICE_StartConfig(), XMC_CCU8_SLICE_StopConfig())
  3. Modulation, external load and Gating of the timer output.(XMC_CCU8_SLICE_ModulationConfig(), XMC_CCU8_SLICE_LoadConfig(), XMC_CCU8_SLICE_GateConfig())
  4. Control the count direction of the timer based on the external event. (XMC_CCU8_SLICE_DirectionConfig())
  5. Count the external events.(XMC_CCU8_SLICE_CountConfig())
  6. External Trap. Which can be used as protective feature.(XMC_CCU8_SLICE_EnableTrap(), XMC_CCU8_SLICE_DisableTrap(), XMC_CCU8_SLICE_TrapConfig())
Interrupt configuration:
This section of the LLD provides the function to configure the interrupt node to each event (XMC_CCU8_SLICE_SetInterruptNode())

Typedef Documentation

typedef CCU8_GLOBAL_TypeDef XMC_CCU8_MODULE_t

Typedef for CCU8 Global data structure

typedef uint8_t XMC_CCU8_SLICE_INPUT_t

External Event Input list. This list depicts the possible input connections to the CCU8 slice. Interconnects are specific to each device.

typedef CCU8_CC8_TypeDef XMC_CCU8_SLICE_t

Typedef for CCU8 Slice data structure

Enumeration Type Documentation

CCU8 module clock

Enumerator
XMC_CCU8_CLOCK_SCU 

Select the fCCU as the clock

XMC_CCU8_CLOCK_EXTERNAL_A 

External clock-A

XMC_CCU8_CLOCK_EXTERNAL_B 

External clock-B

XMC_CCU8_CLOCK_EXTERNAL_C 

External clock-C

CCU8 set the shadow transfer type for multichannel mode

Enumerator
XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_SLICE0 

Shadow transfer through software only for slice 0

XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_MCSS_SLICE0 

Shadow transfer through software and hardware for slice 0

XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_SLICE1 

Shadow transfer through software only for slice 1

XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_MCSS_SLICE1 

Shadow transfer through software and hardware for slice 1

XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_SLICE2 

Shadow transfer through software only for slice 2

XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_MCSS_SLICE2 

Shadow transfer through software and hardware for slice 2

XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_SLICE3 

Shadow transfer through software only for slice 3

XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_SW_MCSS_SLICE3 

Shadow transfer through software and hardware for slice 3

Output selector for CCU8x.OUT0-3

Enumerator
XMC_CCU8_OUT_PATH_OUT0_ST1 

CCU8yST1 signal path is connected the CCU8x.OUT0

XMC_CCU8_OUT_PATH_OUT0_INV_ST1 

Inverted CCU8yST1 signal path is connected the CCU8x.OUT0

XMC_CCU8_OUT_PATH_OUT1_ST1 

CCU8yST1 signal path is connected the CCU8x.OUT1

XMC_CCU8_OUT_PATH_OUT1_INV_ST1 

Inverted CCU8yST1 signal path is connected the CCU8x.OUT1

XMC_CCU8_OUT_PATH_OUT2_ST2 

CCU8yST2 signal path is connected the CCU8x.OUT2

XMC_CCU8_OUT_PATH_OUT2_INV_ST2 

Inverted CCU8yST2 signal path is connected the CCU8x.OUT2

XMC_CCU8_OUT_PATH_OUT3_ST2 

CCU8yST2 signal path is connected the CCU8x.OUT2

XMC_CCU8_OUT_PATH_OUT3_INV_ST1 

Inverted CCU8yST2 signal path is connected the CCU8x.OUT3

Slice shadow transfer options.

Enumerator
XMC_CCU8_SHADOW_TRANSFER_SLICE_0 

Transfer Period, Compare and Passive Level shadow register values to actual registers for SLICE-0

XMC_CCU8_SHADOW_TRANSFER_DITHER_SLICE_0 

Transfer Dither compare shadow register value to actual register for SLICE-0

XMC_CCU8_SHADOW_TRANSFER_PRESCALER_SLICE_0 

Transfer Prescaler shadow register value to actual register for SLICE-0

XMC_CCU8_SHADOW_TRANSFER_SLICE_1 

Transfer Period, Compare and Passive Level shadow register values to actual registers for SLICE-1

XMC_CCU8_SHADOW_TRANSFER_DITHER_SLICE_1 

Transfer Dither compare shadow register value to actual registers for SLICE-1

XMC_CCU8_SHADOW_TRANSFER_PRESCALER_SLICE_1 

Transfer Prescaler shadow register value to actual register for SLICE-1

XMC_CCU8_SHADOW_TRANSFER_SLICE_2 

Transfer Period, Compare and Passive Level shadow register values to actual registers for SLICE-2

XMC_CCU8_SHADOW_TRANSFER_DITHER_SLICE_2 

Transfer Dither compare shadow register value to actual register for SLICE-2

XMC_CCU8_SHADOW_TRANSFER_PRESCALER_SLICE_2 

Transfer Prescaler shadow register value to actual register for SLICE-2

XMC_CCU8_SHADOW_TRANSFER_SLICE_3 

Transfer Period, Compare and Passive Level shadow register values to actual registers for SLICE-3

XMC_CCU8_SHADOW_TRANSFER_DITHER_SLICE_3 

Transfer Dither compare shadow register value to actual register for SLICE-3

XMC_CCU8_SHADOW_TRANSFER_PRESCALER_SLICE_3 

Transfer Prescaler shadow register value to actual register for SLICE-3

Capture mode register sets

Enumerator
XMC_CCU8_SLICE_CAP_REG_SET_LOW 

Capture register-0, Capture register-1 used

XMC_CCU8_SLICE_CAP_REG_SET_HIGH 

Capture register-0, Capture register-1 used

Compare Channel selection

Enumerator
XMC_CCU8_SLICE_COMPARE_CHANNEL_1 

Compare Channel-1

XMC_CCU8_SLICE_COMPARE_CHANNEL_2 

Compare Channel-2

Dead Time Generator Clock Divider

Enumerator
XMC_CCU8_SLICE_DTC_DIV_1 

DTC clock = Slice Clock

XMC_CCU8_SLICE_DTC_DIV_2 

DTC clock = Slice Clock/2

XMC_CCU8_SLICE_DTC_DIV_4 

DTC clock = Slice Clock/4

XMC_CCU8_SLICE_DTC_DIV_8 

DTC clock = Slice Clock/8

Actions that can be performed upon detection of an external Timer STOP event

Enumerator
XMC_CCU8_SLICE_END_MODE_TIMER_STOP 

Stops the timer, without clearing TIMER register

XMC_CCU8_SLICE_END_MODE_TIMER_CLEAR 

Without stopping timer, clears the TIMER register

XMC_CCU8_SLICE_END_MODE_TIMER_STOP_CLEAR 

Stops the timer and clears the TIMER register

External Event trigger criteria - Edge sensitivity

Enumerator
XMC_CCU8_SLICE_EVENT_EDGE_SENSITIVITY_NONE 

None

XMC_CCU8_SLICE_EVENT_EDGE_SENSITIVITY_RISING_EDGE 

Rising Edge of the input signal generates event trigger

XMC_CCU8_SLICE_EVENT_EDGE_SENSITIVITY_FALLING_EDGE 

Falling Edge of the input signal generates event trigger

XMC_CCU8_SLICE_EVENT_EDGE_SENSITIVITY_DUAL_EDGE 

Both Rising and Falling edges cause an event trigger

Low pass filter Configuration. The External Event input should be stable for a selected number of clock cycles.

Enumerator
XMC_CCU8_SLICE_EVENT_FILTER_DISABLED 

No Low Pass Filtering is applied

XMC_CCU8_SLICE_EVENT_FILTER_3_CYCLES 

Input should be stable for 3 clock cycles

XMC_CCU8_SLICE_EVENT_FILTER_5_CYCLES 

Input should be stable for 5 clock cycles

XMC_CCU8_SLICE_EVENT_FILTER_7_CYCLES 

Input should be stable for 7 clock cycles

External Event trigger criteria - Level sensitivity

Enumerator
XMC_CCU8_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_HIGH 

Level sensitive functions react to a high signal level

XMC_CCU8_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_LOW 

Level sensitive functions react to a low signal level

XMC_CCU8_SLICE_EVENT_LEVEL_SENSITIVITY_COUNT_UP_ON_LOW 

Timer counts up, during Low state of the control signal

XMC_CCU8_SLICE_EVENT_LEVEL_SENSITIVITY_COUNT_UP_ON_HIGH 

Timer counts up, during High state of the control signal

External Event list

Enumerator
XMC_CCU8_SLICE_EVENT_NONE 

None

XMC_CCU8_SLICE_EVENT_0 

Event-0

XMC_CCU8_SLICE_EVENT_1 

Event-1

XMC_CCU8_SLICE_EVENT_2 

Event-2

External Function list

Enumerator
XMC_CCU8_SLICE_FUNCTION_START 

Start function

XMC_CCU8_SLICE_FUNCTION_STOP 

Stop function

XMC_CCU8_SLICE_FUNCTION_CAPTURE_EVENT0 

Capture Event-0 function, CCycapt0 signal is used for event generation

XMC_CCU8_SLICE_FUNCTION_CAPTURE_EVENT1 

Capture Event-1 function, CCycapt1 signal is used for event generation

XMC_CCU8_SLICE_FUNCTION_GATING 

Gating function

XMC_CCU8_SLICE_FUNCTION_DIRECTION 

Direction function

XMC_CCU8_SLICE_FUNCTION_LOAD 

Load function

XMC_CCU8_SLICE_FUNCTION_COUNT 

Counting function

XMC_CCU8_SLICE_FUNCTION_OVERRIDE 

Override function

XMC_CCU8_SLICE_FUNCTION_MODULATION 

Modulation function

XMC_CCU8_SLICE_FUNCTION_TRAP 

Trap function

Available Interrupt Event Ids

Enumerator
XMC_CCU8_SLICE_IRQ_ID_PERIOD_MATCH 

Period match counting up

XMC_CCU8_SLICE_IRQ_ID_ONE_MATCH 

One match counting down

XMC_CCU8_SLICE_IRQ_ID_COMPARE_MATCH_UP_CH_1 

Compare match counting up for channel 1

XMC_CCU8_SLICE_IRQ_ID_COMPARE_MATCH_DOWN_CH_1 

Compare match counting down for channel 1

XMC_CCU8_SLICE_IRQ_ID_COMPARE_MATCH_UP_CH_2 

Compare match counting up for channel 2

XMC_CCU8_SLICE_IRQ_ID_COMPARE_MATCH_DOWN_CH_2 

Compare match counting down for channel 2

XMC_CCU8_SLICE_IRQ_ID_EVENT0 

Event-0 occurrence

XMC_CCU8_SLICE_IRQ_ID_EVENT1 

Event-1 occurrence

XMC_CCU8_SLICE_IRQ_ID_EVENT2 

Event-2 occurrence

XMC_CCU8_SLICE_IRQ_ID_TRAP 

Trap occurrence

CCU8 slice mask which can be used for the APIs as input where multi slice support is available

Enumerator
XMC_CCU8_SLICE_MASK_SLICE_0 

SLICE-0

XMC_CCU8_SLICE_MASK_SLICE_1 

SLICE-1

XMC_CCU8_SLICE_MASK_SLICE_2 

SLICE-2

XMC_CCU8_SLICE_MASK_SLICE_3 

SLICE-3

Multi Channel Shadow transfer request configuration options

Enumerator
XMC_CCU8_SLICE_MCMS_ACTION_TRANSFER_PR_CR 

Transfer Compare and Period Shadow register values to the actual registers upon MCS xfer request

XMC_CCU8_SLICE_MCMS_ACTION_TRANSFER_PR_CR_PCMP 

Transfer Compare, Period and Prescaler Compare Shadow register values to the actual registers upon MCS xfer request

XMC_CCU8_SLICE_MCMS_ACTION_TRANSFER_PR_CR_PCMP_DIT 

Transfer Compare, Period ,Prescaler Compare and Dither Compare register values to the actual registers upon MCS xfer request

Operational modes of CCU8 slice

Enumerator
XMC_CCU8_SLICE_MODE_COMPARE 

slice(CC8y) operates in Compare Mode

XMC_CCU8_SLICE_MODE_CAPTURE 

slice(CC8y) operates in Capture Mode

Compare channel for which modulation has to be applied

Enumerator
XMC_CCU8_SLICE_MODULATION_CHANNEL_NONE 

No modulation

XMC_CCU8_SLICE_MODULATION_CHANNEL_1 

Modulation for Compare Channel-1

XMC_CCU8_SLICE_MODULATION_CHANNEL_2 

Modulation for Compare Channel-2

XMC_CCU8_SLICE_MODULATION_CHANNEL_1_AND_2 

Modulation for Compare Channel-1 and Compare Channel-2

Modulation of timer output signals

Enumerator
XMC_CCU8_SLICE_MODULATION_MODE_CLEAR_ST_OUT 

Clear ST and OUT signals

XMC_CCU8_SLICE_MODULATION_MODE_CLEAR_OUT 

Clear only the OUT signal

Available Interrupt Event Ids, which is added to support multi event APIs

Enumerator
XMC_CCU8_SLICE_MULTI_IRQ_ID_PERIOD_MATCH 

Period match counting up

XMC_CCU8_SLICE_MULTI_IRQ_ID_ONE_MATCH 

One match counting down

XMC_CCU8_SLICE_MULTI_IRQ_ID_COMPARE_MATCH_UP_CH_1 

Compare match counting up for channel 1

XMC_CCU8_SLICE_MULTI_IRQ_ID_COMPARE_MATCH_DOWN_CH_1 

Compare match counting down for channel 1

XMC_CCU8_SLICE_MULTI_IRQ_ID_COMPARE_MATCH_UP_CH_2 

Compare match counting up for channel 2

XMC_CCU8_SLICE_MULTI_IRQ_ID_COMPARE_MATCH_DOWN_CH_2 

Compare match counting down for channel 2

XMC_CCU8_SLICE_MULTI_IRQ_ID_EVENT0 

Event-0 occurrence

XMC_CCU8_SLICE_MULTI_IRQ_ID_EVENT1 

Event-1 occurrence

XMC_CCU8_SLICE_MULTI_IRQ_ID_EVENT2 

Event-2 occurrence

Timer output passive level

Enumerator
XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_LOW 

Passive level = Low

XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_HIGH 

Passive level = High

Slice Output selection

Enumerator
XMC_CCU8_SLICE_OUTPUT_0 

Slice Output-0

XMC_CCU8_SLICE_OUTPUT_1 

Slice Output-1

XMC_CCU8_SLICE_OUTPUT_2 

Slice Output-2

XMC_CCU8_SLICE_OUTPUT_3 

Slice Output-3

Prescaler mode

Enumerator
XMC_CCU8_SLICE_PRESCALER_MODE_NORMAL 

Fixed division of module clock

XMC_CCU8_SLICE_PRESCALER_MODE_FLOAT 

Floating divider

Timer clock Divider

Enumerator
XMC_CCU8_SLICE_PRESCALER_1 

Slice Clock = fccu8

XMC_CCU8_SLICE_PRESCALER_2 

Slice Clock = fccu8/2

XMC_CCU8_SLICE_PRESCALER_4 

Slice Clock = fccu8/4

XMC_CCU8_SLICE_PRESCALER_8 

Slice Clock = fccu8/8

XMC_CCU8_SLICE_PRESCALER_16 

Slice Clock = fccu8/16

XMC_CCU8_SLICE_PRESCALER_32 

Slice Clock = fccu8/32

XMC_CCU8_SLICE_PRESCALER_64 

Slice Clock = fccu8/64

XMC_CCU8_SLICE_PRESCALER_128 

Slice Clock = fccu8/128

XMC_CCU8_SLICE_PRESCALER_256 

Slice Clock = fccu8/256

XMC_CCU8_SLICE_PRESCALER_512 

Slice Clock = fccu8/512

XMC_CCU8_SLICE_PRESCALER_1024 

Slice Clock = fccu8/1024

XMC_CCU8_SLICE_PRESCALER_2048 

Slice Clock = fccu8/2048

XMC_CCU8_SLICE_PRESCALER_4096 

Slice Clock = fccu8/4096

XMC_CCU8_SLICE_PRESCALER_8192 

Slice Clock = fccu8/8192

XMC_CCU8_SLICE_PRESCALER_16384 

Slice Clock = fccu8/16384

XMC_CCU8_SLICE_PRESCALER_32768 

Slice Clock = fccu8/32768

Slice shadow transfer mode options.

Note
Not available for XMC4500 series
Enumerator
XMC_CCU8_SLICE_SHADOW_TRANSFER_MODE_IN_PERIOD_MATCH_AND_ONE_MATCH 

Shadow transfer is done in Period Match and One match.

XMC_CCU8_SLICE_SHADOW_TRANSFER_MODE_ONLY_IN_PERIOD_MATCH 

Shadow transfer is done only in Period Match.

XMC_CCU8_SLICE_SHADOW_TRANSFER_MODE_ONLY_IN_ONE_MATCH 

Shadow transfer is done only in One Match.

Service Request Lines for CCU8. Event are mapped to these SR lines and these are used to generate the interrupt.

Enumerator
XMC_CCU8_SLICE_SR_ID_0 

Service Request Line-0 selected

XMC_CCU8_SLICE_SR_ID_1 

Service Request Line-1 selected

XMC_CCU8_SLICE_SR_ID_2 

Service Request Line-2 selected

XMC_CCU8_SLICE_SR_ID_3 

Service Request Line-3 selected

Actions that can be performed upon detection of an external Timer START event

Enumerator
XMC_CCU8_SLICE_START_MODE_TIMER_START 

Start the timer from the current count of TIMER register

XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR 

Clears the TIMER register and start the timer

The compare channel output which is routed to the slice output signal(STy).

Enumerator
XMC_CCU8_SLICE_STATUS_CHANNEL_1 

Channel-1 status connected to Slice Status

XMC_CCU8_SLICE_STATUS_CHANNEL_2 

Channel-2 status connected to Slice Status

XMC_CCU8_SLICE_STATUS_CHANNEL_1_AND_2 

Wired AND of Channel-1 and Channel-2 status connected to Slice status

XMC_CCU8_SLICE_STATUS_CHANNEL_1_OR_2 

Wired OR of Channel-1 and Channel-2 status connected to Slice status.

Note
Only available for XMC1300 and XMC1400 series

Timer clear on capture

Enumerator
XMC_CCU8_SLICE_TIMER_CLEAR_MODE_NEVER 

Never clear the timer on any capture event

XMC_CCU8_SLICE_TIMER_CLEAR_MODE_CAP_HIGH 

Clear only when timer value has been captured in C3V and C2V

XMC_CCU8_SLICE_TIMER_CLEAR_MODE_CAP_LOW 

Clear only when timer value has been captured in C1V and C0V

XMC_CCU8_SLICE_TIMER_CLEAR_MODE_ALWAYS 

Always clear the timer upon detection of any capture event

Timer counting direction for the CCU8 slice

Enumerator
XMC_CCU8_SLICE_TIMER_COUNT_DIR_UP 

Counting up

XMC_CCU8_SLICE_TIMER_COUNT_DIR_DOWN 

Counting down

Timer counting modes for the slice

Enumerator
XMC_CCU8_SLICE_TIMER_COUNT_MODE_EA 

Edge Aligned Mode

XMC_CCU8_SLICE_TIMER_COUNT_MODE_CA 

Centre Aligned Mode

Timer repetition mode for the slice

Enumerator
XMC_CCU8_SLICE_TIMER_REPEAT_MODE_REPEAT 

Repetitive mode: continuous mode of operation

XMC_CCU8_SLICE_TIMER_REPEAT_MODE_SINGLE 

Single shot mode: Once a Period match/One match occurs timer goes to idle state

Trap exit mode

Enumerator
XMC_CCU8_SLICE_TRAP_EXIT_MODE_AUTOMATIC 

Clear trap state as soon as the trap signal is de-asserted

XMC_CCU8_SLICE_TRAP_EXIT_MODE_SW 

Clear only when acknowledged by software

Output sources for OUTy0 signal

Note
Only available for XMC1400 series
Enumerator
XMC_CCU8_SOURCE_OUT0_ST1 

CCU8yST1 signal path is connected the CCU8x.OUT0

XMC_CCU8_SOURCE_OUT0_INV_ST1 

Inverted CCU8yST1 signal path is connected the CCU8x.OUT0

XMC_CCU8_SOURCE_OUT0_ST2 

CCU8yST2 signal path is connected the CCU8x.OUT0

XMC_CCU8_SOURCE_OUT0_INV_ST2 

Inverted CCU8yST2 signal path is connected the CCU8x.OUT0

Output sources for OUTy1 signal

Note
Only available for XMC1400 series
Enumerator
XMC_CCU8_SOURCE_OUT1_ST1 

CCU8yST1 signal path is connected the CCU8x.OUT1

XMC_CCU8_SOURCE_OUT1_INV_ST1 

Inverted CCU8yST1 signal path is connected the CCU8x.OUT1

XMC_CCU8_SOURCE_OUT1_ST2 

CCU8yST2 signal path is connected the CCU8x.OUT1

XMC_CCU8_SOURCE_OUT1_INV_ST2 

Inverted CCU8yST2 signal path is connected the CCU8x.OUT1

Output sources for OUTy2 signal

Note
Only available for XMC1400 series
Enumerator
XMC_CCU8_SOURCE_OUT2_ST2 

CCU8yST2 signal path is connected the CCU8x.OUT2

XMC_CCU8_SOURCE_OUT2_INV_ST2 

Inverted CCU8yST2 signal path is connected the CCU8x.OUT2

XMC_CCU8_SOURCE_OUT2_ST1 

CCU8yST1 signal path is connected the CCU8x.OUT2

XMC_CCU8_SOURCE_OUT2_INV_ST1 

Inverted CCU8yST1 signal path is connected the CCU8x.OUT2

Output sources for OUTy3 signal

Note
Only available for XMC1400 series
Enumerator
XMC_CCU8_SOURCE_OUT3_ST2 

CCU8yST2 signal path is connected the CCU8x.OUT2

XMC_CCU8_SOURCE_OUT3_INV_ST2 

Inverted CCU8yST2 signal path is connected the CCU8x.OUT2

XMC_CCU8_SOURCE_OUT3_ST1 

CCU8yST1 signal path is connected the CCU8x.OUT2

XMC_CCU8_SOURCE_OUT3_INV_ST1 

Inverted CCU8yST1 signal path is connected the CCU8x.OUT2

Return Value of an API

Enumerator
XMC_CCU8_STATUS_OK 

API fulfils request

XMC_CCU8_STATUS_ERROR 

API cannot fulfil request

XMC_CCU8_STATUS_RUNNING 

The timer slice is currently running

XMC_CCU8_STATUS_IDLE 

The timer slice is currently idle

Function Documentation

void XMC_CCU8_DisableClock ( XMC_CCU8_MODULE_t *const  module,
const uint8_t  slice_number 
)
Parameters
moduleConstant pointer to CCU8 module
slice_numberSlice for which the clock should be disabled. Range: [0x0 to 0x3]
Returns

None
Description:
Disables the slice timer clock, by configuring GIDLS.SS0I, GIDLS.SSS1I, GIDLS.SSS2I, GIDLS.SSS3I bits according to the selected slice_number .

It is possible to disable clock at slice level using the module pointer. slice_number is used to disable the clock to a given slice of the module.
Related APIs:
XMC_CCU8_EnableClock()
XMC_CCU8_EnableMultipleClocks()
XMC_CCU8_StartPrescaler()
XMC_CCU8_StopPrescaler().
void XMC_CCU8_DisableModule ( XMC_CCU8_MODULE_t *const  module)
Parameters
moduleConstant pointer to CCU8 module
Returns

None
Description:
Brings the CCU8 module to reset state and enables gating of the clock signal(if applicable depending on the device being selected).

Invoke this API when a CCU8 module needs to be disabled completely. Any operation on the CCU8 module will have no effect after this API is called.
Related APIs:
XMC_CCU8_EnableModule()
XMC_CCU8_DisableModule().
void XMC_CCU8_EnableClock ( XMC_CCU8_MODULE_t *const  module,
const uint8_t  slice_number 
)
Parameters
moduleConstant pointer to CCU8 module
slice_numberSlice for which the clock should be Enabled. Range: [0x0 to 0x3]
Returns

None
Description:
Enables the slice timer clock, by configuring GIDLC.CS0I, GIDLC.CS1I, GIDLC.CS2I, GIDLC.CS3I bits according to the selected slice_number.

It is possible to enable/disable clock at slice level. This uses the slice_number to indicate the slice whose clock needs to be enabled. Directly accessed register is GIDLC.
Related APIs:
XMC_CCU8_DisableClock()
XMC_CCU8_EnableMultipleClocks()
XMC_CCU8_StartPrescaler()
XMC_CCU8_StopPrescaler().
void XMC_CCU8_EnableModule ( XMC_CCU8_MODULE_t *const  module)
Parameters
moduleConstant pointer to CCU8 module
Returns

None
Description:
Enables the CCU8 module and brings it to active state.

Also disables the gating of the clock signal (if applicable depending on the device being selected). Invoke this API before any operations are done on the CCU8 module. Invoked from XMC_CCU8_Init().
Related APIs:
XMC_CCU8_SetModuleClock()
XMC_CCU8_DisableModule()
XMC_CCU8_StartPrescaler().
void XMC_CCU8_EnableMultipleClocks ( XMC_CCU8_MODULE_t *const  module,
const uint8_t  clock_mask 
)
Parameters
moduleConstant pointer to CCU8 module
clock_maskSlices whose clocks are to be enabled simultaneously. Bit location 0/1/2/3 represents slice-0/1/2/3 respectively. Range: [0x1 to 0xF]
Returns

None
Description:
Enables clocks of multiple slices at a time, by configuring GIDLC.CS0I, GIDLC.CS1I, GIDLC.CS2I, GIDLC.CS3I bits.

Takes an input clock_mask, which determines the slices that would receive the clock. Bring them out of the idle state simultaneously.
Related APIs:
XMC_CCU8_EnableClock()
XMC_CCU8_DisableClock().
void XMC_CCU8_EnableShadowTransfer ( XMC_CCU8_MODULE_t *const  module,
const uint32_t  shadow_transfer_msk 
)
Parameters
moduleConstant pointer to CCU8 module
shadow_transfer_mskShadow transfer request mask for various transfers. Use XMC_CCU8_SHADOW_TRANSFER_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Requests of shadow transfer for Period, Compare, Passive level, dither and prescaler, by configuring the GCSS register.

The transfer from the shadow registers to the actual registers is done in the immediate next occurrence of the shadow transfer trigger after the API is called.

Any call to XMC_CCU8_SLICE_SetTimerPeriodMatch()
XMC_CCU8_SLICE_SetTimerCompareMatch()
XMC_XMC_CCU8_SLICE_SetPrescaler()
XMC_CCU8_SLICE_CompareInit()
XMC_CCU8_SLICE_CaptureInit(). must be succeeded by this API.

Related APIs:
None.
void XMC_CCU8_Init ( XMC_CCU8_MODULE_t *const  module,
const XMC_CCU8_SLICE_MCMS_ACTION_t  mcs_action 
)
Parameters
moduleConstant pointer to CCU8 module
mcs_actionmulti-channel shadow transfer request configuration
Returns

None
Description:
Initialization of global register GCTRL.

As part of module initialization, behaviour of the module upon detection Multi-Channel Mode trigger is configured. Will also invoke the XMC_CCU8_EnableModule(). The API call would bring up the required CCU8 module and also initialize the module for the required multi-channel shadow transfer.
Related APIs:
XMC_CCU8_SLICE_CompareInit()
XMC_CCU8_SLICE_CaptureInit().
bool XMC_CCU8_IsPrescalerRunning ( XMC_CCU8_MODULE_t *const  module)
Parameters
moduleConstant pointer to CCU8 module
Returns

None
Description:
Returns the state of the prescaler, by reading GSTAT.PRB bit.

If clock is being supplied to the slices of the module then returns as true.
Related APIs:
XMC_CCU8_StartPrescaler()
XMC_CCU8_StopPrescaler()
XMC_CCU8_EnableClock()
XMC_CCU8_DisableClock().
void XMC_CCU8_SetModuleClock ( XMC_CCU8_MODULE_t *const  module,
const XMC_CCU8_CLOCK_t  clock 
)
Parameters
moduleConstant pointer to CCU8 module
clockChoice of input clock to the module
Returns

None
Description:
Selects the Module Clock by configuring GCTRL.PCIS bits.

There are 3 potential clock sources. This API helps to select the required clock source. Call to this API is valid after the XMC_CCU8_Init().
Related APIs:
None.
void XMC_CCU8_SetMultiChannelShadowTransferMode ( XMC_CCU8_MODULE_t *const  module,
const uint32_t  slice_mode_msk 
)
Parameters
moduleConstant pointer to CCU8 module
slice_mode_mskSlices for which the configuration has to be applied. Use XMC_CCU8_MULTI_CHANNEL_SHADOW_TRANSFER_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Enables the Multi-channel shadow transfer request trigger signal either by software or hardware by configuring GCTRL.MSE0, GCTRL.MSE1, GCTRL.MSE2, and GCTRL.MSE3 based on the mask.

The shadow transfer would take place either if it was requested by software or by the CCU8x.MCSS input.
Related APIs:
None.
void XMC_CCU8_SLICE_Capture0Config ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the Capture-0 Function
Returns

None
Description:
Configures the Capture-0 Function of the slice, by configuring CC8yCMC.CAP0S bit.

Capture function is mapped with one of the 3 events. A CCU8 slice can be configured into capture-0 mode with the selected event. In this mode the CCU8 will capture the timer value into CC8yC0V and CC8yC1V.
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_Capture1Config ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the Capture-1 Function
Returns

None
Description:
Configures the Capture-1 Function of the slice, by configuring CC8yCMC.CAP1S bit.

Capture function is mapped with one of the 3 events. A CCU8 slice can be configured into capture-1 mode with the selected event. In this mode the CCU8 will capture the timer value into CC8yC2V and CC8yC3V.
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_CaptureInit ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_CAPTURE_CONFIG_t *const  capture_init 
)
Parameters
sliceConstant pointer to CC8 Slice
capture_initPointer to slice configuration structure
Returns

None
Description:
Initialization of a CC8 slice to capture mode, by configuring CC8yTC, CC8yCMC, CC8yPSC,CC8yFPCS registers.

CC8 slice is configured with Capture configurations in this routine. Timer is stopped before initialization by calling XMC_CCU8_SLICE_StopTimer(). After initialization user has to explicitly enable the shadow transfer for the required values by calling XMC_CCU8_EnableShadowTransfer() with appropriate mask.
Related APIs:
XMC_CCU8_SLICE_Capture0Config()
XMC_CCU8_SLICE_Capture1Config().
void XMC_CCU8_SLICE_ClearEvent ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_IRQ_ID_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventAsserted event which must be acknowledged.
Returns

None
Description:
Acknowledges an asserted event, by setting CC8ySWR with respective event flag.

Related APIs:
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_SetEvent()
XMC_CCU8_SLICE_GetEvent().
void XMC_CCU8_SLICE_ClearTimer ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Resets the timer count to zero, by setting CC8yTCCLR.TCC bit.

A timer which has been stopped can still retain the last counted value. After invoking this API the timer value will be cleared.
Related APIs:
XMC_CCU8_SLICE_StartTimer().
void XMC_CCU8_SLICE_CompareInit ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_COMPARE_CONFIG_t *const  compare_init 
)
Parameters
sliceConstant pointer to CC8 Slice
compare_initPointer to slice configuration structure
Returns

None
Description:
Initialization of a CC8 slice to compare mode, by configuring CC8yTC, CC8yCMC, CC8yPSC, CC8yDITH, CC8yPSL, CC8yFPCS, CC8yCHC registers.

CC8 slice is configured with Timer configurations in this routine. Timer is stopped before initialization by calling XMC_CCU8_SLICE_StopTimer(). After initialization user has to explicitly enable the shadow transfer for the required values by calling XMC_CCU8_EnableShadowTransfer() with appropriate mask.
Related APIs:
None.
void XMC_CCU8_SLICE_ConfigureDeadTime ( XMC_CCU8_SLICE_t *const  slice,
const uint8_t  mask 
)
Parameters
sliceConstant pointer to CC8 Slice
maskThe Dead Time configuration mask. Do a bitwise OR operation on the following values depending on the need. Value 0x1: Dead Time Enable for Compare Channel 1 Value 0x2: Dead Time Enable for Compare Channel 2 Value 0x4: Dead Time Enable for CC8yST1 path is enabled. Value 0x8: Dead Time Enable for Inverted CC8yST1 path is enabled. Value 0x10: Dead Time Enable for CC8yST2 path is enabled. Value 0x20: Dead Time Enable for Inverted CC8yST2 path is enabled. Range: [0x0 to 0x3F]
Description:
Activates or deactivates dead time for compare channel and ST path, by configuring CC8y.DC1R, CC8y.DC1R and CC8y.DTC registers.

Use the provided masks to enable/disable the dead time for the compare channels and the ST signals. It is possible to deactivate the dead time for all the options by passing a 0x0 as the mask. Details such as the choice of dead time for channel1, channel2, ST1, Inverted ST1, ST2, Inverted ST2, are programmed by this routine.
Related APIs:
XMC_CCU8_SLICE_DeadTimeInit()
XMC_CCU8_SLICE_SetDeadTimeValue()
XMC_CCU8_SLICE_SetDeadTimePrescaler()
XMC_CCU8_SLICE_IsDeadTimeCntr1Running()
XMC_CCU8_SLICE_IsDeadTimeCntr2Running().
void XMC_CCU8_SLICE_ConfigureEvent ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event,
const XMC_CCU8_SLICE_EVENT_CONFIG_t config 
)
Parameters
sliceConstant pointer to CC8 Slice
eventThe External Event which needs to be configured.
configPointer to event configuration data.
Returns

None
Description:
Configures an External Event of the slice, by updating CC8yINS register .

Details such as the input mapped to the event, event detection criteria and low pass filter options are programmed by this routine. The Event config will configure the input selection, the edge selection, the level selection and the Low pass filter for the event.
Related APIs:
XMC_CCU8_SLICE_StartConfig()
XMC_CCU8_SLICE_StopConfig()
XMC_CCU8_SLICE_LoadConfig()
XMC_CCU8_SLICE_ModulationConfig()
XMC_CCU8_SLICE_CountConfig()
XMC_CCU8_SLICE_GateConfig()
XMC_CCU8_SLICE_Capture0Config()
XMC_CCU8_SLICE_Capture1Config()
XMC_CCU8_SLICE_DirectionConfig()
XMC_CCU8_SLICE_StatusBitOverrideConfig()
XMC_CCU8_SLICE_TrapConfig().
void XMC_CCU8_SLICE_ConfigureStatusBitOutput ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_STATUS_t  channel 
)
Parameters
sliceConstant pointer to CC8 Slice
channelwhich channel status has to be give as out
Returns

None
Description:
Configures status ST1, ST2 mapping to STy, by configuring CC8yTC.STOS bits.

This routine defines the output STy as a function of ST1 or ST2 or both ST1 & ST2. It is possible to make the CCU8x.STy signal to reflect the CC8y.ST1/CC8y.ST2 or a function of the 2 signals.
Related APIs:
None.
void XMC_CCU8_SLICE_ConfigureStatusBitOverrideEvent ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_CONFIG_t *const  ev1_config,
const XMC_CCU8_SLICE_EVENT_CONFIG_t *const  ev2_config 
)
Parameters
sliceConstant pointer to CC8 Slice
ev1_configPointer to event 1 configuration data
ev2_configPointer to event 2 configuration data
Returns

None
Description:
Map Status bit override function with an Event1 & Event 2 of the slice and configure CC8yINS register.

Details such as the input mapped to the event, event detection criteria and Low Pass filter options are programmed by this routine for the events 1 & 2. Event-1 input would be the trigger to override the value. Event-2 input would be the override value.
Related APIs:
XMC_CCU8_SLICE_StatusBitOverrideConfig().
void XMC_CCU8_SLICE_CountConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the External Count Function
Returns

None
Description:
Configures the Count Function of the slice, by configuring CC8yCMC.CNTS bit.

Count function is mapped with one of the 3 events. CCU8 slice can take an external signal to act as the counting event. The CCU8 slice would count the edges present on the event selected.
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_DeadTimeInit ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_DEAD_TIME_CONFIG_t *const  config 
)
Parameters
sliceConstant pointer to CC8 Slice
configPointer to dead time configuration data
Returns

None
Description:
Initializes Dead time configuration for the slice outputs, by configuring CC8yDC1R, CC8yDC2R, CC8yDTC registers.

This routine programs dead time delays (rising & falling) and dead time clock prescaler. Details such as the choice of dead time for channel1, channel2, ST1, Inverted ST1, ST2, Inverted ST2, are also programmed by this routine.
Related APIs:
XMC_CCU8_SLICE_ConfigureDeadTime()
XMC_CCU8_SLICE_SetDeadTimeValue()
XMC_CCU8_SLICE_SetDeadTimePrescaler()
XMC_CCU8_SLICE_IsDeadTimeCntr1Running()
XMC_CCU8_SLICE_IsDeadTimeCntr2Running().
void XMC_CCU8_SLICE_DirectionConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the External Count Direction Function
Returns

None
Description:
Configures the Count Direction of the slice, by configuring CC8yCMC.UDS bit.

Count direction function is mapped with one of the 3 events. A slice can be configured to change the CC8yTIMER count direction depending on an external signal.
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_DisableAutomaticShadowTransferRequest ( XMC_CCU8_SLICE_t *const  slice,
const uint32_t  automatic_shadow_transfer 
)
Parameters
sliceConstant pointer to CC8 Slice
automatic_shadow_transferspecify upon which register update, automatic shadow transfer request should not be generated Use :: XMC_CCU8_SLICE_AUTOMAIC_SHADOW_TRANSFER_WRITE_INTO_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Configure on which shadow register update, automatic shadow transfer request generation has to be disabled. By clearing ASPC, ASCC1, ASCC2, ASLC, ASDC, ASFC bits in STC register.

This disables the generation of automatic shadow transfer request for the specified register update.
Note:
Related APIs:
XMC_CCU8_SLICE_EnableAutomaticShadowTransferRequest().
Note
Only available for XMC1400 series
void XMC_CCU8_SLICE_DisableCascadedShadowTransfer ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Disables the cascaded the shadow transfer operation, by clearing CSE bit in STC register.

If in any slice the cascaded mode disabled, other slices from there onwards does not update the values in cascaded mode.
Related APIs:
XMC_CCU8_SLICE_EnableCascadedShadowTransfer()
.
Note
Not available for XMC4500 series
void XMC_CCU8_SLICE_DisableDithering ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Disables dithering of PWM frequency and duty cycle, by clearing CC8yTC.DITHE bits.

This disables the Dither mode that was set in XMC_CCU8_SLICE_EnableDithering(). This API will not clear the dither compare value.
Related APIs:
XMC_CCU8_SLICE_EnableDithering().
void XMC_CCU8_SLICE_DisableEvent ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_IRQ_ID_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventEvent whose assertion can potentially lead to an interrupt
Returns

None
Description:
Disables the generation of an interrupt pulse for the event, by clearing CC8yINTE register.

Prevents the event from being asserted.
Related APIs:
XMC_CCU8_SLICE_SetInterruptNode()
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_EnableMultipleEvents()
XMC_CCU8_SLICE_DisableMultipleEvents().
void XMC_CCU8_SLICE_DisableFloatingPrescaler ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Disables the floating prescaler, by clearing CC8yTC.FPE bit.

This would return the prescaler to the normal mode. The prescaler that would be applied is the value present in CC8yPSC.
Related APIs:
XMC_CCU8_SLICE_EnableFloatingPrescaler().
void XMC_CCU8_SLICE_DisableMultiChannelMode ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_COMPARE_CHANNEL_t  ch_num 
)
Parameters
sliceConstant pointer to CC8 Slice
ch_numCompare channel for which the multi-channel mode needs to be disabled.
Returns

None
Description:
Disables the multichannel mode, by clearing CC8yTC.MCME1 or CC8yTC.MCME1 bits based on the ch_num.

Returns the slices to the normal operation mode. This takes the slice number as input and configures the multi channel mode for it.
Related APIs:
XMC_CCU8_SLICE_EnableMultiChannelMode().
void XMC_CCU8_SLICE_DisableMultipleEvents ( XMC_CCU8_SLICE_t *const  slice,
const uint16_t  mask 
)
Parameters
sliceConstant pointer to CC8 Slice
maskEvent mask such that multiple events can be enabled. Use XMC_CCU8_SLICE_MULTI_IRQ_ID_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Disables the generation of an interrupt pulse for the required events, by clearing CC8yINTE register.

Prevents selected events of the slice from being asserted.
Related APIs:
XMC_CCU8_SLICE_SetInterruptNode()
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_EnableMultipleEvents()
XMC_CCU8_SLICE_DisableEvent().
void XMC_CCU8_SLICE_DisableTrap ( XMC_CCU8_SLICE_t *const  slice,
const uint32_t  out_mask 
)
Parameters
sliceConstant pointer to CC8 Slice
out_maskOutput signals for which the Trap function needs to be deactivated. Use XMC_CCU8_SLICE_OUTPUT_t enum items to create a mask of choice, using a bit wise OR operation. Range: [0x1 to 0xF]
Returns

None
Description:
Disables the trap feature, by clearing CC8yTC.TRAPE0, CC8yTC.TRAPE1, CC8yTC.TRAPE2 and CC8yTC.TRAPE3 bit based on the out_mask.

.

This API will revert the changes done by XMC_CCU8_SLICE_EnableTrap(). This Ensures that the TRAP function has no effect on the output of the CCU8 slice.
Related APIs:
XMC_CCU8_SLICE_EnableTrap().
void XMC_CCU8_SLICE_EnableAsymmetricCompareMode ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Configures the slice to generate PWM in asymmetric compare mode, by setting CC8yCHC.ASE bit.

In asymmetric compare mode, the compare channels 1 & 2 are grouped to generate the PWM.This would generate an inverted PWM at OUT0 & OUT1. In Edge Aligned mode (counting up), the Status bit is set when a compare match of Compare channel-1 occurs and cleared when a compare match event of Compare channel-2 occurs.
In Center Aligned mode, the status bit is set when a compare match event of Compare channel-1 occurs while counting up and cleared when a compare match event of Compare channel-2 occurs while counting down.
Note:
External count direction function is enabled then the asymmetric mode of operation is not possible.
Related APIs:
XMC_CCU8_SLICE_EnableSymmetricCompareMode()
void XMC_CCU8_SLICE_EnableAutomaticShadowTransferRequest ( XMC_CCU8_SLICE_t *const  slice,
const uint32_t  automatic_shadow_transfer 
)
Parameters
sliceConstant pointer to CC8 Slice
automatic_shadow_transferspecify upon which register update, automatic shadow transfer request is generated Use :: XMC_CCU8_SLICE_AUTOMAIC_SHADOW_TRANSFER_WRITE_INTO_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Configure on which shadow register update, automatic shadow transfer request generation has to be enabled. By setting ASPC, ASCC1, ASCC2, ASLC, ASDC, ASFC bits in STC register.

By updating the configured shadow register, the shadow transfer request is generated to update all the shadow registers.
Note:
Related APIs:
XMC_CCU8_SLICE_DisableAutomaticShadowTransferRequest().
Note
Only available for XMC1400 series
void XMC_CCU8_SLICE_EnableCascadedShadowTransfer ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Cascades the shadow transfer operation throughout the CCU8 timer slices, by setting CSE bit in STC register.

The shadow transfer enable bits needs to be set in all timer slices, that are being used in the cascaded architecture, at the same time. The shadow transfer enable bits, also need to be set for all slices even if the shadow values of some slices were not updated. It is possible to to cascade with the adjacent slices only. CC80 slice is a master to start the operation.
Note:
XMC_CCU8_EnableShadowTransfer() must be called to enable the shadow transfer of the all the slices, which needs to be cascaded.
Related APIs:
XMC_CCU8_EnableShadowTransfer(), XMC_CCU8_SLICE_DisableCascadedShadowTransfer()
.
Note
Not available for XMC4500 series
void XMC_CCU8_SLICE_EnableDithering ( XMC_CCU8_SLICE_t *const  slice,
const bool  period_dither,
const bool  duty_dither,
const uint8_t  spread 
)
Parameters
sliceConstant pointer to CC8 Slice
period_ditherBoolean instruction on dithering of period match
duty_ditherBoolean instruction on dithering of compare match
spreadDither compare value
Returns

None
Description:
Enables dithering of PWM frequency and duty cycle, by configuring CC8yTC.DITHE and CC8yDITS bits.

Some control loops are slow in updating PWM frequency and duty cycle. In such a case, a Bresenham style dithering can help reduce long term errors. Dithering can be applied to period and duty individually, this can be selected using the parameter period_dither and duty_dither. The spread would provide the dither compare value. If the dither counter value is less than this spread then the period/compare values would be dithered according to the dither mode selected. This API would invoke XMC_CCU8_SLICE_SetDitherCompareValue().
Note:
After this API call, XMC_CCU8_EnableShadowTransfer() has to be called with appropriate mask to transfer the dither value.
Related APIs:
XMC_CCU8_SLICE_DisableDithering().
void XMC_CCU8_SLICE_EnableEvent ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_IRQ_ID_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventEvent whose assertion can potentially lead to an interrupt
Returns

None
Description:
Enables the generation of an interrupt pulse for the event, by configuring CC8yINTE register.

For an event to lead to an interrupt, it must first be enabled and bound to a service request line. The corresponding NVIC node must be enabled as well. This API merely enables the event. Binding with SR is performed by another API.
Related APIs:
XMC_CCU8_SLICE_SetInterruptNode()
XMC_CCU8_SLICE_EnableMultipleEvents()
XMC_CCU8_SLICE_DisableEvent()
XMC_CCU8_SLICE_DisableMultipleEvents().
void XMC_CCU8_SLICE_EnableFloatingPrescaler ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Enables the floating prescaler, by setting CC8yTC.FPE bit.

The prescaler divider starts with an initial value and increments upon every period match. It keeps incrementing until a ceiling (prescaler compare value) is hit and thereafter rolls back to the original prescaler divider value.
It is necessary to have programmed an initial divider value and a compare value before the feature is enabled.
Related APIs:
XMC_CCU8_SLICE_SetFloatingPrescalerCompareValue()
XMC_CCU8_SLICE_DisableFloatingPrescaler()
XMC_XMC_CCU8_SLICE_SetPrescaler().
void XMC_CCU8_SLICE_EnableMultiChannelMode ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_COMPARE_CHANNEL_t  ch_num 
)
Parameters
sliceConstant pointer to CC8 Slice
ch_numCompare channel for which the multi-channel mode is needed.
Returns

None
Description:
Enables the multichannel mode, by setting CC8yTC.MCME1 or CC8yTC.MCME1 bits based on the ch_num.

The output state of the Timer slices can be controlled in parallel by a single input signal. A particularly useful feature in motor control applications where the PWM output of multiple slices of a module can be gated and ungated by multi-channel gating inputs connected to the slices. A peripheral like POSIF connected to the motor knows exactly which of the power drive switches are to be turned on and off at any instant. It can thus through a gating bus (known as multi-channel inputs) control which of the slices output stays gated/ungated.
Related APIs:
XMC_CCU8_SLICE_DisableMultiChannelMode()
XMC_CCU8_SetMultiChannelShadowTransferMode().
void XMC_CCU8_SLICE_EnableMultipleEvents ( XMC_CCU8_SLICE_t *const  slice,
const uint16_t  mask 
)
Parameters
sliceConstant pointer to CC8 Slice
maskEvent mask such that multiple events can be enabled. Use XMC_CCU8_SLICE_MULTI_IRQ_ID_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Enables the generation of an interrupt pulse for the required events, by configuring CC8yINTE register.

For an event to lead to an interrupt, it must first be enabled and bound to a service request line. The corresponding NVIC node must be enabled as well. This API merely enables the events. Binding with SR is performed by another API.
Related APIs:
XMC_CCU8_SLICE_SetInterruptNode()
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_DisableEvent()
XMC_CCU8_SLICE_DisableMultipleEvents().
void XMC_CCU8_SLICE_EnableSymmetricCompareMode ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Configures the slice to generate PWM in symmetric(standard) compare mode, by clearing CC8yCHC.ASE bit.

In symmetric compare mode, the compare channels 1 & 2 are independent of each other & each channel generates the PWM & inverted PWM at OUT0, OUT1, OUT2 & OUT3.
Related APIs:
XMC_CCU8_SLICE_EnableAsymmetricCompareMode().
void XMC_CCU8_SLICE_EnableTrap ( XMC_CCU8_SLICE_t *const  slice,
const uint32_t  out_mask 
)
Parameters
sliceConstant pointer to CC8 Slice
out_maskOutput signals for which the Trap function needs to be activated. Use XMC_CCU8_SLICE_OUTPUT_t enum items to create a mask of choice, using a bit wise OR operation Range: [0x1 to 0xF]
Returns

None
Description:
Enables the trap feature, by setting CC8yTC.TRAPE0, CC8yTC.TRAPE1, CC8yTC.TRAPE2 and CC8yTC.TRAPE3 bit based on the out_mask.

A particularly useful feature where the PWM output can be forced inactive upon detection of a trap. The trap signal can be the output of a sensing element which has just detected an abnormal electrical condition.
Related APIs:
XMC_CCU8_SLICE_TrapConfig()
XMC_CCU8_SLICE_DisableTrap()
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_GateConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the External Gating Function
Returns

None
Description:
Configures the Gating Function of the slice, by configuring CC8yCMC.GATES bit.

Gating function is mapped with one of the 3 events. A CCU8 slice can use an input signal that would operate as counter gating. If the configured Active level is detected the counter will gate all the pulses.
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
uint32_t XMC_CCU8_SLICE_GetCapturedValueFromFifo ( const XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_CAP_REG_SET_t  set 
)
Parameters
sliceConstant pointer to CC8 Slice
setThe capture register set from which the captured value is to be retrieved
Returns

uint32_t Returns the value captured in the slice_number Range: [0x0 to 0xFFFF]
Description:
Read captured value from FIFO(CC8yECRD0 and CC8yECRD1).

This is applicable only in the Capture mode of operation. The signal whose timing characteristics are to be measured must be mapped to an event which in turn must be mapped to the capture function. Based on the capture criteria, the instant timer values are captured into capture registers. Timing characteristics of the input signal may then be derived/inferred from the captured values.
Related APIs:
XMC_CCU8_SLICE_IsExtendedCapReadEnabled().
Note
Defined for XMC4800, XMC4700, XMC4500, XMC4400, XMC4200, XMC4100 devices only. For other devices use XMC_CCU8_GetCapturedValueFromFifo() API
uint32_t XMC_CCU8_SLICE_GetCaptureRegisterValue ( const XMC_CCU8_SLICE_t *const  slice,
const uint8_t  reg_num 
)
Parameters
sliceConstant pointer to CC8 Slice
reg_numThe capture register from which the captured value is to be retrieved Range: [0,3]
Returns

uint32_t Returns the Capture register value. Range: [0 to 0x1FFFFF]
Description:
Retrieves timer value which has been captured in the Capture registers, by reading CC8yCV[reg_num] register.

The signal whose timing characteristics are to be measured must be mapped to an event which in turn must be mapped to the capture function. Based on the capture criteria, the timer values are captured into capture registers. Timing characteristics of the input signal may then be derived/inferred from the captured values. The full flag will help to find out if there is a new captured value present.
Related APIs:
XMC_CCU8_SLICE_GetLastCapturedTimerValue().
XMC_CCU8_SLICE_TIMER_COUNT_DIR_t XMC_CCU8_SLICE_GetCountingDir ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

XMC_CCU8_SLICE_TIMER_COUNT_DIR_t returns the direction in which the timer is counting.
Description:
Returns the timer counting direction, by reading CC8yTCST.CDIR bit.

This API will return the direction in which the timer is currently incrementing(XMC_CCU8_SLICE_TIMER_COUNT_DIR_UP) or decrementing (XMC_CCU8_SLICE_TIMER_COUNT_DIR_DOWN).
Related APIs:
None.
bool XMC_CCU8_SLICE_GetEvent ( const XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_IRQ_ID_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventEvent to be evaluated for assertion
Returns

bool Returns true if event is set else false is returned.
Description:
Evaluates if a given event is asserted or not, by reading CC8yINTS register.

Return true if the event is asserted. For a event to be asserted it has to be first enabled. Only if that event is enabled the call to this API is valid. If the Event is enabled and has not yet occurred then a false is returned.
Related APIs:
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_SetEvent().
XMC_CCU8_STATUS_t XMC_CCU8_SLICE_GetLastCapturedTimerValue ( const XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_CAP_REG_SET_t  set,
uint32_t *  val_ptr 
)
Parameters
sliceConstant pointer to CC8 Slice
setThe capture register set, which must be evaluated
val_ptrOut Parameter of the API.Stores the captured timer value into this out parameter.
Returns

XMC_CCU8_STATUS_t Returns XMC_CCU8_STATUS_OK if there was new value present in the capture registers. returns XMC_CCU8_STATUS_ERROR if there was no new value present in the capture registers.
Description:
Retrieves the latest captured timer value, by reading CC8yCV registers.

Retrieve the timer value last stored by the slice. When separate capture events are used, users must specify the capture set to evaluate. If single capture event mode is used, all 8 capture registers are evaluated.
The lowest register is evaluated first followed by the next higher ordered register and this continues until all capture registers have been evaluated.
Related APIs:
XMC_CCU8_SLICE_GetCaptureregisterValue().
XMC_CCU8_SLICE_MODE_t XMC_CCU8_SLICE_GetSliceMode ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

XMC_CCU8_SLICE_MODE_t returns XMC_CCU8_SLICE_MODE_COMPARE if the slice is operating in compare mode returns XMC_CCU8_SLICE_MODE_CAPTURE if the slice is operating in capture mode
Description:
Retrieves the current mode of operation in the slice (either Capture mode or Compare mode), by reading CC8yTC.CMOD bit.

Ensure that before invoking this API the CCU8 slice should be configured otherwise the output of this API is invalid.
Related APIs:
None.
uint16_t XMC_CCU8_SLICE_GetTimerCompareMatch ( const XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_COMPARE_CHANNEL_t  channel 
)
Parameters
sliceConstant pointer to CC8 Slice
channelSelect the compare channel to retrieve from.
Returns

uint16_t returns the current timer compare value Range: [0x0 to 0xFFFF]
Description:
Retrieves the timer compare value currently effective, by reading CC8yCR1S and CC8yCR2S registers.

If the timer is active then the value being returned is currently being for the PWM duty cycle( timer compare value).
Note:
The XMC_CCU8_SLICE_SetTimerCompareMatch() would set the new compare value to a shadow register. This would only transfer the new values into the actual compare register if the shadow transfer request is enabled and if a period match occurs. Hence a consecutive call to XMC_CCU8_SLICE_GetTimerCompareMatch() would not reflect the new values until the shadow transfer completes.
Related APIs:
XMC_CCU8_SLICE_SetTimerCompareMatch().
XMC_CCU8_SLICE_TIMER_COUNT_MODE_t XMC_CCU8_SLICE_GetTimerCountingMode ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

XMC_CCU8_SLICE_TIMER_COUNT_MODE_t returns XMC_CCU8_SLICE_TIMER_COUNT_MODE_EA if edge aligned mode is selected returns XMC_CCU8_SLICE_TIMER_COUNT_MODE_CA if center aligned mode is selected
Description:
Retrieves timer counting mode either Edge aligned or Center Aligned, by reading CC8yTC.TCM bit.

Related APIs:
XMC_CCU8_SLICE_SetTimerCountingMode().
uint16_t XMC_CCU8_SLICE_GetTimerPeriodMatch ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

uint16_t returns the current timer period value Range: [0x0 to 0xFFFF]
Description:
Retrieves the timer period value currently effective, by reading CC8yPR register.

If the timer is active then the value being returned is currently being used for the PWM period.
Note:
The XMC_CCU8_SLICE_SetTimerPeriodMatch() would set the new period value to a shadow register. This would only transfer the new values into the actual period register if the shadow transfer request is enabled and if a period match occurs. Hence a consecutive call to XMC_CCU8_SLICE_GetTimerPeriodMatch() would not reflect the new values until the shadow transfer completes.
Related APIs:
XMC_CCU8_SLICE_SetTimerPeriodMatch().
XMC_CCU8_SLICE_TIMER_REPEAT_MODE_t XMC_CCU8_SLICE_GetTimerRepeatMode ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

XMC_CCU8_SLICE_TIMER_REPEAT_MODE_t returns XMC_CCU8_SLICE_TIMER_REPEAT_MODE_REPEAT if continuous mode is selected returns XMC_CCU8_SLICE_TIMER_REPEAT_MODE_SINGLE if single shot mode is selected
Description:
Retrieves the Timer repeat mode, either Single shot mode or continuous mode, by reading CC8yTC.TSSM bit.

The timer will count upto the terminal count as specified in the period register and stops immediately if the repeat mode has been set to single shot mode. In the continuous mode of operation, the timer starts counting all over again after reaching the terminal count.
Related APIs:
XMC_CCU8_SLICE_SetTimerRepeatMode().
uint16_t XMC_CCU8_SLICE_GetTimerValue ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

uint16_t returns the current timer value Range: [0x0 to 0xFFFF]
Description:
Retrieves the latest timer value, from CC8yTIMER register.

Related APIs:
XMC_CCU8_SLICE_SetTimerValue().
bool XMC_CCU8_SLICE_IsDeadTimeCntr1Running ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
slicePointer to an instance of CC8 slice
Returns

bool returns true if the dead time counter of Compare channel-1 is running else it returns false.
Description:
Returns the state of the Dead time counter 1 (Either Running or stopped(idle)), by reading CC8yTCST.DTR1 bit. This returns the state of the dead time counter which is linked to Compare channel-1.
Related APIs:
XMC_CCU8_SLICE_IsDeadTimeCntr2Running().
bool XMC_CCU8_SLICE_IsDeadTimeCntr2Running ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
slicePointer to an instance of CC8 slice
Returns

bool returns true if the dead time counter of Compare channel-2 is running else it returns false.
Description:
Returns the state of the Dead time counter 2 (Either Running or stopped(idle)), by reading CC8yTCST.DTR2 bit. This returns the state of the dead time counter which is linked to Compare channel-2.
Related APIs:
XMC_CCU8_SLICE_IsDeadTimeCntr1Running().
bool XMC_CCU8_SLICE_IsExtendedCapReadEnabled ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

bool would return true if the extended capture read back mode is enabled
Description:
Checks if Extended capture mode read is enabled for particular slice or not, by reading CC8yTC.ECM bit.

In this mode the there is only one associated read address for all the capture registers. Individual capture registers can still be accessed in this mode.
Related APIs:
XMC_CCU8_GetCapturedValueFromFifo().
bool XMC_CCU8_SLICE_IsTimerRunning ( const XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

bool returns true if the Timer is running else it returns false.
Description:
Returns the state of the timer (Either Running or stopped(idle)), by reading CC8yTCST.TRB bit.
Related APIs:
XMC_CCU8_SLICE_StartTimer()
XMC_CCU8_SLICE_StopTimer().
void XMC_CCU8_SLICE_LoadConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the External load Function
Returns

None
Description:
Configures the Load Function for the slice, by configuring CC8yCMC.LDS bit.

Load function is mapped with one of the 3 events. Up on occurrence of the event,
if CC8yTCST.CDIR set to 0,CC8yTIMER register is reloaded with the value from compare channel 1 or compare channel 2
if CC8yTCST.CDIR set to 1,CC8yTIMER register is reloaded with the value from period register
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_LoadSelector ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_COMPARE_CHANNEL_t  ch_num 
)
Parameters
sliceConstant pointer to CC8 Slice
ch_numSelect which compare channel value has to be loaded to the Timer register during external load event.
Returns

None
Description:
Up on occurrence of the external load event, if CC8yTCST.CDIR set to 0, CC8yTIMER register can be reloaded
with the value from compare channel 1 or compare channel 2
If CC8yTC.TLS is 0, compare channel 1 value is loaded to the CC8yTIMER register
If CC8yTC.TLS is 1, compare channel 2 value is loaded to the CC8yTIMER register
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_ModulationConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event,
const XMC_CCU8_SLICE_MODULATION_MODE_t  mod_mode,
const XMC_CCU8_SLICE_MODULATION_CHANNEL_t  channel,
const bool  synch_with_pwm 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the External Modulation Function
mod_modeDesired Modulation mode
channelSpecify the channel(s) on which the modulation should be applied.
synch_with_pwmOption to synchronize modulation with PWM start Pass true if the modulation needs to be synchronized with PWM signal.
Returns

None
Description:
Configures the Output Modulation Function of the slice, by configuring CC8yCMC.MOS, CC8yTC.EMT and CC8yTC.EMS bits.

Modulation function is mapped with one of the 3 events. The output signal of the CCU can be modulated according to a external input. Additionally, the behaviour of the slice upon activation of the modulation function is configured as well.
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_SetDeadTimePrescaler ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_DTC_DIV_t  div_val 
)
Parameters
slicePointer to an instance of CC8 slice
div_valPrescaler divider value
Returns

None
Description:
Configures clock division factor for dead time generator, by configuring CC8yDTC.DTCC bit. The Clock divider works on the timer clock. It is possible to scale the timer clock for the dead time generator by a factor of 1/2/4/8. This selection is passed as an argument to the API.
Related APIs:
XMC_CCU8_SLICE_DeadTimeInit()
XMC_CCU8_SLICE_SetDeadTimeValue()
XMC_CCU8_SLICE_ConfigureDeadTime()
XMC_CCU8_SLICE_IsDeadTimeCntr1Running()
XMC_CCU8_SLICE_IsDeadTimeCntr2Running().
void XMC_CCU8_SLICE_SetDeadTimeValue ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_COMPARE_CHANNEL_t  channel,
const uint8_t  rise_value,
const uint8_t  fall_value 
)
Parameters
sliceConstant pointer to CC8 Slice
channelCompare channel number
rise_valuePrograms rising edge delay Range: [0x0 to 0xFF]
fall_valuePrograms falling edge delay Range: [0x0 to 0xFF]
Returns

None
Description:
Configures the dead time for rising and falling edges, by updating CC8y.DC1R, CC8y.DC1R registers.

This API will Configure the delay that is need either when the value changes from 0 to 1 (rising edge) or value changes from 1 to 0(falling edge). Directly accessed registers are CC8yDC1R, CC8yDC2R.
Related APIs:
XMC_CCU8_SLICE_DeadTimeInit()
XMC_CCU8_SLICE_SetDeadTimeValue()
XMC_CCU8_SLICE_ConfigureDeadTime()
XMC_CCU8_SLICE_IsDeadTimeCntr1Running()
XMC_CCU8_SLICE_IsDeadTimeCntr2Running().
void XMC_CCU8_SLICE_SetDitherCompareValue ( XMC_CCU8_SLICE_t *const  slice,
const uint8_t  comp_val 
)
Parameters
sliceConstant pointer to CC8 Slice
comp_valDither compare value Range: [0x0 to 0xF]
Returns

None
Description:
Sets the dither spread/compare value, by setting CC8yDITS.DCVS bits.

This value is the cornerstone of PWM dithering feature. Dithering is applied/done when the value in the dithering counter is less than this compare/spread value. For all dithering counter values greater than the spread value, there is no dithering. After setting the value XMC_CCU8_EnableShadowTransfer() has to be called with appropriate mask.
Related APIs:
XMC_CCU8_SLICE_EnableDithering().
void XMC_CCU8_SLICE_SetEvent ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_IRQ_ID_t  event 
)
Parameters
sliceConstant pointer to CC8 Slice
eventEvent whose assertion can potentially lead to an interrupt
Returns

None
Description:
Manually asserts the requested event, by setting CC8ySWS register.

For an event to lead to an interrupt, it must first be enabled and bound to a service request line. The corresponding NVIC node must be enabled as well. This API manually asserts the requested event.
Related APIs:
XMC_CCU8_SLICE_SetInterruptNode()
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_EnableMultipleEvents().
void XMC_CCU8_SLICE_SetFloatingPrescalerCompareValue ( XMC_CCU8_SLICE_t *const  slice,
const uint8_t  cmp_val 
)
Parameters
sliceConstant pointer to CC8 Slice
cmp_valPrescaler divider compare value Range: [0x0 to 0xF]
Returns

None
Description:
Programs the slice specific prescaler divider compare value, by configuring CC8yFPCS register.

The compare value is applicable only in floating mode of operation. The prescaler divider starts with an initial value and increments to the compare value steadily upon every period match. Once prescaler divider equals the prescaler divider compare value, the value in the former resets back to the PVAL (from FPC). After setting the value, XMC_CCU8_EnableShadowTransfer() has to be called with appropriate mask.
Related APIs:
XMC_CCU8_SLICE_SetPrescaler().
void XMC_CCU8_SLICE_SetInput ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event,
const XMC_CCU8_SLICE_INPUT_t  input 
)
Parameters
sliceConstant pointer to CC8 Slice
eventThe External Event which needs to be configured.
inputOne of the 16 inputs meant to be mapped to the desired event
Returns

None
Description:
Selects an input for an external event, by configuring CC8yINS register.

It is possible to select one of the possible 16 input signals for a given Event. This configures the CC8yINS.EVxIS for the selected event.
Related APIs:
XMC_CCU8_SLICE_StartConfig()
XMC_CCU8_SLICE_StopConfig()
XMC_CCU8_SLICE_LoadConfig()
XMC_CCU8_SLICE_ModulationConfig()
XMC_CCU8_SLICE_CountConfig()
XMC_CCU8_SLICE_GateConfig()
XMC_CCU8_SLICE_Capture0Config()
XMC_CCU8_SLICE_Capture1Config()
XMC_CCU8_SLICE_DirectionConfig()
XMC_CCU8_SLICE_StatusBitOverrideConfig()
XMC_CCU8_SLICE_TrapConfig().
void XMC_CCU8_SLICE_SetInterruptNode ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_IRQ_ID_t  event,
const XMC_CCU8_SLICE_SR_ID_t  sr 
)
Parameters
sliceConstant pointer to CC8 Slice
eventEvent which must be bound to a service request line
srThe Service request line which is bound to the event
Returns

None
Description:
Binds requested event to a service request line, by configuring CC8ySRS register with respective event.

For an event to lead to an interrupt, it must first be enabled and bound to a service request line. The corresponding NVIC node must be enabled as well. This API binds the requested event with the requested service request line(sr).
Related APIs:
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_SetEvent().
void XMC_CCU8_SLICE_SetOutPath ( XMC_CCU8_SLICE_t *const  slice,
const uint32_t  out_path_msk 
)
Parameters
sliceConstant pointer to CC8 Slice
out_path_mskconfiguration for output path selection. combination of XMC_CCU8_OUT_PATH_t enum items can be used to create a mask.
Returns

None
Description:
Configure the out the path of the two compare channels with specified ST signal, by configuring the ^ CC8yCHC register.

For the two compare channels it is possible to select either direct ST signal or inverted ST signal. out_path_msk is used to set the required out put path.
Related APIs:
None
void XMC_CCU8_SLICE_SetPassiveLevel ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_OUTPUT_t  out,
const XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_t  level 
)
Parameters
sliceConstant pointer to CC8 Slice
outOutput signal for which the passive level needs to be set.
levelOutput passive level for the out signal
Returns

None
Description:
Configures the passive level for the slice output, by setting CC8yPSL register.

Defines the passive level for the timer slice output pin. Selects either level high is passive or level low is passive. This is the level of the output before the compare match is value changes it.
Related APIs:
XMC_CCU8_SLICE_EnableEvent()
XMC_CCU8_SLICE_SetEvent().
void XMC_CCU8_SLICE_SetPrescaler ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_PRESCALER_t  div_val 
)
Parameters
sliceConstant pointer to CC8 Slice
div_valPrescaler divider value. Accepts enum :: XMC_CCU8_SLICE_PRESCALER_t Range: [0x0 to 0xF]
Returns

None
Description:
Programs the slice specific prescaler divider, by configuring the CC8yPSC and CC8yFPC registers.

The prescaler divider may only be programmed after the prescaler run bit has been cleared by calling XMC_CCU8_StopPrescaler().
Related APIs:
XMC_CCU8_SLICE_SetFloatingPrescalerCompareValue().
void XMC_CCU8_SLICE_SetShadowTransferMode ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_SHADOW_TRANSFER_MODE_t  shadow_transfer_mode 
)
Parameters
sliceConstant pointer to CC8 Slice
shadow_transfer_modemode to be configured Use :: XMC_CCU8_SLICE_SHADOW_TRANSFER_MODE_t enum items for mode
Returns

None
Description:
Configures when the shadow transfer has to occur, by setting STM bit in STC register.

After requesting for shadow transfer mode using XMC_CCU8_EnableShadowTransfer(), actual transfer occurs based on the selection done using this API (i.e. on period and One match, on Period match only, on One match only).
Note:
This is effective when the timer is configured in centre aligned mode.
Related APIs:
XMC_CCU8_EnableShadowTransfer()
Note
Not available for XMC4500 series
void XMC_CCU8_SLICE_SetTimerCompareMatch ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_COMPARE_CHANNEL_t  channel,
const uint16_t  compare_val 
)
Parameters
sliceConstant pointer to CC8 Slice
channelSelect the compare channel to which the compare_val has to programmed.
compare_valTimer compare value
Returns

None
Description:
Programs the timer compare value, by writing CC8yCR1S and CC8yCR2S registers.

The PWM duty cycle is determined by this value.

The compare value is written to a shadow register. Explicitly enable the shadow transfer for the the period/compare value by calling XMC_CCU8_EnableShadowTransfer() with appropriate mask.If shadow transfer is enabled and the timer is running, a period match transfers the value from the shadow register to the actual compare register.
Related APIs:
XMC_CCU8_EnableShadowTransfer().
void XMC_CCU8_SLICE_SetTimerCompareMatchChannel1 ( XMC_CCU8_SLICE_t *const  slice,
const uint16_t  compare_val 
)
Parameters
sliceConstant pointer to CC8 Slice
compare_valTimer compare value
Returns

None
Description:
Programs the timer compare1 value, by writing CC8yCR1S register.

The PWM duty cycle is determined by this value.

The compare value is written to a shadow register. Explicitly enable the shadow transfer for the the period/compare value by calling XMC_CCU8_EnableShadowTransfer() with appropriate mask. If shadow transfer is enabled and the timer is running, a period match transfers the value from the shadow register to the actual compare register.
Related APIs:
XMC_CCU8_EnableShadowTransfer().
void XMC_CCU8_SLICE_SetTimerCompareMatchChannel2 ( XMC_CCU8_SLICE_t *const  slice,
const uint16_t  compare_val 
)
Parameters
sliceConstant pointer to CC8 Slice
compare_valTimer compare value
Returns

None
Description:
Programs the timer compare2 value, by writing CC8yCR2S register.

The PWM duty cycle is determined by this value.

The compare value is written to a shadow register. Explicitly enable the shadow transfer for the the period/compare value by calling XMC_CCU8_EnableShadowTransfer() with appropriate mask. If shadow transfer is enabled and the timer is running, a period match transfers the value from the shadow register to the actual compare register.
Related APIs:
XMC_CCU8_EnableShadowTransfer().
void XMC_CCU8_SLICE_SetTimerCountingMode ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_TIMER_COUNT_MODE_t  mode 
)
Parameters
sliceConstant pointer to CC8 Slice
modeDesired counting mode (Either Edge Aligned or Center Aligned)
Returns

None
Description:
Configures the timer counting mode either Edge Aligned or Center Aligned, by configuring CC8yTC.TCM bit.

In the edge aligned mode, the timer counts from 0 to the terminal count. Once the timer count has reached a preset compare value, the timer status output asserts itself. It will now deassert only after the timer count reaches the terminal count.
In the center aligned mode, the timer first counts from 0 to the terminal count and then back to 0. During this upward and downward counting, the timer status output stays asserted as long as the timer value is greater than the compare value.
Related APIs:
XMC_CCU8_SLICE_GetTimerCountingMode().
void XMC_CCU8_SLICE_SetTimerPeriodMatch ( XMC_CCU8_SLICE_t *const  slice,
const uint16_t  period_val 
)
Parameters
sliceConstant pointer to CC8 Slice
period_valTimer period value Range: [0x0 to 0xFFFF]
Returns

None
Description:
Programs the timer period, by writing CC8yPRS register.

The frequency of counting/ PWM frequency is determined by this value. The period value is written to a shadow register. Explicitly enable the shadow transfer for the the period value by calling XMC_CCU8_EnableShadowTransfer() with appropriate mask. If shadow transfer is enabled and the timer is running, a period match transfers the value from the shadow register to the actual period register.
Related APIs:
XMC_CCU8_SLICE_GetTimerPeriodMatch().
void XMC_CCU8_SLICE_SetTimerRepeatMode ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_TIMER_REPEAT_MODE_t  mode 
)
Parameters
sliceConstant pointer to CC8 Slice
modeDesired repetition mode (Either single shot or Continuous)
Returns

None
Description:
Configures the Timer to either Single shot mode or continuous mode, by configuring CC8yTC.TSSM bit.

The timer will count up to the terminal count as specified in the period register and stops immediately if the repeat mode has been set to single shot. In the continuous mode of operation, the timer starts counting all over again after reaching the terminal count.
Related APIs:
XMC_CCU8_SLICE_GetTimerRepeatMode().
void XMC_CCU8_SLICE_SetTimerValue ( XMC_CCU8_SLICE_t *const  slice,
const uint16_t  timer_val 
)
Parameters
sliceConstant pointer to CC8 Slice
timer_valThe new timer value that has to be loaded into the TIMER register. Range: [0x0 to 0xFFFF]
Returns

None
Description:
Loads a new timer value, by setting CC8yTIMER register.

Note:
Request to load is ignored if the timer is running.
Related APIs:
XMC_CCU8_SLICE_GetTimerValue().
void XMC_CCU8_SLICE_StartConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event,
const XMC_CCU8_SLICE_START_MODE_t  start_mode 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the External Start Function
start_modeBehaviour of slice when the start function is activated
Returns

None
Description:
Configures the Start Function of the slice, by configuring CC8yCMC.ENDS and CC8yTC.ENDM bits.

Start function is mapped with one of the 3 events. An external signal can control when a CC8 timer should start. Additionally, the behaviour of the slice upon activation of the start function is configured as well.
Related APIs:
XMC_CCU8_SLICE_StopConfig()
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_StartTimer ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Starts the timer counting operation, by setting CC8yTCSET.TRBS bit.

It is necessary to have configured the CC8 slice before starting its timer. Before the Timer is started ensure that the clock is provided to the slice.
Related APIs:
XMC_CCU8_SLICE_StopTimer().
void XMC_CCU8_SLICE_StatusBitOverrideConfig ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Configures the status bit override Function of the slice, by configuring CC8yCMC.OFS bit.

Status bit override function is mapped with one of the 3 events. A slice can be configured to change the output of the timer's CC8yST1 signal depending on an external signal.
Related APIs:
XMC_CCU8_SLICE_ConfigureStatusBitOverrideEvent().
void XMC_CCU8_SLICE_StopClearTimer ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Stops and resets the timer count to zero, by setting CC8yTCCLR.TCC and CC8yTCCLR.TRBC bit.

Related APIs:
XMC_CCU8_SLICE_StartTimer().
void XMC_CCU8_SLICE_StopConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_EVENT_t  event,
const XMC_CCU8_SLICE_END_MODE_t  end_mode 
)
Parameters
sliceConstant pointer to CC8 Slice
eventMap an External event to the External Stop Function
end_modeBehaviour of slice when the stop function is activated
Returns

None
Description:
Configures the Stop function for the slice, by configuring CC8yCMC.STRTS and CC8yTC.STRM bits.

Stop function is mapped with one of the 3 events. An external signal can control when a CCU8 timer should stop. Additionally, the behaviour of the slice upon activation of the stop function is configured as well.
Related APIs:
XMC_CCU8_SLICE_StartConfig()
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_StopTimer ( XMC_CCU8_SLICE_t *const  slice)
Parameters
sliceConstant pointer to CC8 Slice
Returns

None
Description:
Stops the Timer.

Timer counting operation can be stopped by invoking this API, by setting CC8yTCCLR.TRBC bit.
Related APIs:
XMC_CCU8_SLICE_StartTimer().
void XMC_CCU8_SLICE_TrapConfig ( XMC_CCU8_SLICE_t *const  slice,
const XMC_CCU8_SLICE_TRAP_EXIT_MODE_t  exit_mode,
bool  synch_with_pwm 
)
Parameters
sliceConstant pointer to CC8 Slice
exit_modeHow should a previously logged trap state be exited?
synch_with_pwmShould exit of trap state be synchronized with PWM cycle start?
Returns

None
Description:
Configures the Trap Function of the slice, by configuring CC8yCMC.TS, CC8yTC.TRPSE, and CC8yTC.TRPSW bits.

Trap function is mapped with Event-2. Criteria for exiting the trap state is configured. This trap function allows PWM outputs to react on the state of an input pin. Thus PWM output can be forced to inactive state upon detection of a trap. It is also possible to synchronize the trap function with the PWM signal using the synch_with_pwm.
Related APIs:
XMC_CCU8_SLICE_ConfigureEvent()
XMC_CCU8_SLICE_SetInput().
void XMC_CCU8_SLICE_WriteCoherentlyWithPWMCycle ( XMC_CCU8_SLICE_t *const  slice,
const uint32_t  coherent_write 
)
Parameters
sliceConstant pointer to CC8 Slice
coherent_writespecifies for what fields this mode has to be applied Use :: XMC_CCU8_SLICE_WRITE_INTO_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Configures the specified fields shadow value to be updated in synchronous with PWM after shadow transfer request, by clearing IRPC, IRCC1, IRCC2, IRLC, IRDC, IRFC bits in STC register.

When coherent shadow is enabled, after calling XMC_CCU8_EnableShadowTransfer(), the value which are written in the respective shadow registers get updated according the configuration done using XMC_CCU8_SLICE_SetShadowTransferMode() API.
Note:
Related APIs:
XMC_CCU8_EnableShadowTransfer(), XMC_CCU8_SLICE_SetShadowTransferMode()
Note
Only available for XMC1400 series
void XMC_CCU8_SLICE_WriteImmediateAfterShadowTransfer ( XMC_CCU8_SLICE_t *const  slice,
const uint32_t  immediate_write 
)
Parameters
sliceConstant pointer to CC8 Slice
immediate_writespecifies for what fields this mode has to be applied Use :: XMC_CCU8_SLICE_WRITE_INTO_t enum items to create a mask of choice, using a bit wise OR operation.
Returns

None
Description:
Configures the specified fields shadow value to be updated immediately after shadow transfer request, by setting IRPC, IRCC1, IRCC2, IRLC, IRDC, IRFC bits in STC register.

When immediate shadow is enabled, by calling XMC_CCU8_EnableShadowTransfer() the value which are written in the shadow registers get updated to the actual registers immediately.
Note:
Related APIs:
XMC_CCU8_EnableShadowTransfer()
Note
Only available for XMC1400 series
void XMC_CCU8_StartPrescaler ( XMC_CCU8_MODULE_t *const  module)
Parameters
moduleConstant pointer to CCU8 module
Returns

None
Description:
Starts the prescaler and restores clocks to the timer slices, by setting GIDLC.SPRB bit.

Once the input to the prescaler has been chosen and the prescaler divider of all slices programmed, the prescaler itself may be started. Invoke this API after XMC_CCU8_Init() (Mandatory to fully initialize the module).
Related APIs:
XMC_CCU8_Init()
XMC_CCU8_EnableClock()
XMC_CCU8_DisableClock()
XMC_CCU8_StartPrescaler()
XMC_CCU8_StopPrescaler().
void XMC_CCU8_StopPrescaler ( XMC_CCU8_MODULE_t *const  module)
Parameters
moduleConstant pointer to CCU8 module
Returns

None
Description:
Stops the prescaler and blocks clocks to the timer slices, by setting GIDLS.CPRB bit.

Clears the run bit of the prescaler. Ensures that the module clock is not supplied to the slices of the module.
Related APIs:
XMC_CCU8_EnableClock()
XMC_CCU8_DisableClock()
XMC_CCU8_StartPrescaler()
XMC_CCU8_StopPrescaler().
Generated on Mon Aug 7 2017 11:33:57 for XMC Peripheral Library for XMC4000 Family by   doxygen 1.8.11