XMC Peripheral Library for XMC4000 Family: ERU

XMC Peripheral Library for XMC4000 Family

XMC Peripheral Library for XMC4000 Family  2.1.16

Data Structures

struct  XMC_ERU_ETL_CONFIG_t
 
union  XMC_ERU_OGU_CONFIG_t
 
struct  XMC_ERU_t
 

Enumerations

Functions

void XMC_ERU_Disable (XMC_ERU_t *const eru)
 
void XMC_ERU_Enable (XMC_ERU_t *const eru)
 
void XMC_ERU_ETL_ClearStatusFlag (XMC_ERU_t *const eru, const uint8_t channel)
 
void XMC_ERU_ETL_DisableOutputTrigger (XMC_ERU_t *const eru, const uint8_t channel)
 
void XMC_ERU_ETL_EnableOutputTrigger (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL_t trigger)
 
XMC_ERU_ETL_EDGE_DETECTION_t XMC_ERU_ETL_GetEdgeDetection (XMC_ERU_t *const eru, const uint8_t channel)
 
uint32_t XMC_ERU_ETL_GetStatusFlag (XMC_ERU_t *const eru, const uint8_t channel)
 
void XMC_ERU_ETL_Init (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_ETL_CONFIG_t *const config)
 
void XMC_ERU_ETL_SetEdgeDetection (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_ETL_EDGE_DETECTION_t edge_detection)
 
void XMC_ERU_ETL_SetInput (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_ETL_INPUT_A_t input_a, const XMC_ERU_ETL_INPUT_B_t input_b)
 
void XMC_ERU_ETL_SetSource (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_ETL_SOURCE_t source)
 
void XMC_ERU_ETL_SetStatusFlag (XMC_ERU_t *const eru, const uint8_t channel)
 
void XMC_ERU_ETL_SetStatusFlagMode (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_ETL_STATUS_FLAG_MODE_t mode)
 
void XMC_ERU_OGU_DisablePatternDetection (XMC_ERU_t *const eru, const uint8_t channel)
 
void XMC_ERU_OGU_DisablePeripheralTrigger (XMC_ERU_t *const eru, const uint8_t channel)
 
void XMC_ERU_OGU_EnablePatternDetection (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_OGU_PATTERN_DETECTION_INPUT_t input)
 
void XMC_ERU_OGU_EnablePeripheralTrigger (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_OGU_PERIPHERAL_TRIGGER_t peripheral_trigger)
 
uint32_t XMC_ERU_OGU_GetPatternDetectionStatus (XMC_ERU_t *const eru, const uint8_t channel)
 
void XMC_ERU_OGU_Init (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_OGU_CONFIG_t *const config)
 
void XMC_ERU_OGU_SetServiceRequestMode (XMC_ERU_t *const eru, const uint8_t channel, const XMC_ERU_OGU_SERVICE_REQUEST_t mode)
 

Detailed Description

The Event Request Unit (ERU) is a versatile multiple input event detection and processing unit. The ERU module can be used to expand the P-to-P connections of the device: ports-to-peripherals, peripherals-to-peripherals and ports-to-ports. It also offers configurable logic, that allows the generation of triggers, pattern detection and real-time signal monitoring.

eru_overview.png

The driver is divided into two sections:

Event trigger logic (ERU_ETL):
This section of the LLD provides the configuration structure XMC_ERU_ETL_CONFIG_t and the initialization function XMC_ERU_ETL_Init().
It can be used to:
  1. Select one out of two inputs (A and B). For each of these two inputs, a vector of 4 possible signals is available. (XMC_ERU_ETL_SetSource())
  2. Logically combine the two input signals to a common trigger. (XMC_ERU_ETL_SetSource())
  3. Define the transition (edge selection, or by software) that leads to a trigger event and can also store this status. (XMC_ERU_ETL_SetEdgeDetection() and XMC_ERU_ETL_SetStatusFlag())
  4. Distribute the events and status flags to the output channels. (XMC_ERU_ETL_EnableOutputTrigger())
Output gating unit (ERU_OGU):
This section of the LLD provides the provides the configuration structure XMC_ERU_OGU_CONFIG_t and the initialization function XMC_ERU_ETL_OGU_Init(). It can be used to:
  1. Combine the trigger events and status information and gates the output depending on a gating signal. (XMC_ERU_OGU_EnablePatternDetection(), XMC_ERU_OGU_DisablePeripheralTrigger(), XMC_ERU_OGU_SetServiceRequestMode())

Enumeration Type Documentation

Defines trigger edge for the event generation by ETLx (Event Trigger Logic, x = [0 to 3]) unit, by getting the signal from ERSx(Event request source, x = [0 to 3]) unit.

Enumerator
XMC_ERU_ETL_EDGE_DETECTION_DISABLED 

no event enabled

XMC_ERU_ETL_EDGE_DETECTION_RISING 

detection of rising edge generates the event

XMC_ERU_ETL_EDGE_DETECTION_FALLING 

detection of falling edge generates the event

XMC_ERU_ETL_EDGE_DETECTION_BOTH 

detection of either edges generates the event

Defines input signal for path A of ERSx(Event request source, x = [0 to 3]) unit.

eru_input_a.png
ETLx Input A selection
Enumerator
XMC_ERU_ETL_INPUT_A0 

input A0 is selected

XMC_ERU_ETL_INPUT_A1 

input A1 is selected

XMC_ERU_ETL_INPUT_A2 

input A2 is selected

XMC_ERU_ETL_INPUT_A3 

input A3 is selected

Defines input signal for path B of ERSx(Event request source, x = [0 to 3]) unit.

eru_input_b.png
ETLx Input B selection
Enumerator
XMC_ERU_ETL_INPUT_B0 

input B0 is selected

XMC_ERU_ETL_INPUT_B1 

input B1 is selected

XMC_ERU_ETL_INPUT_B2 

input B2 is selected

XMC_ERU_ETL_INPUT_B3 

input B3 is selected

Defines Output Channel of OGUy(Output gating unit y = [0 to 3]) to be mapped by the trigger pulse generated by ETLx(Event Trigger Logic, x = [0 to 3]) unit.

Note
Generation of output trigger pulse need to be enabled XMC_ERU_OGU_PERIPHERAL_TRIGGER_t
eru_connection_matrix.png
ERU_ETL ERU_OGU Connection matrix
Enumerator
XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL0 

Event from input ETLx triggers output OGU0

XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL1 

Event from input ETLx triggers output OGU1

XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL2 

Event from input ETLx triggers output OGU2

XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL3 

Event from input ETLx triggers output OGU3

Defines generation of the trigger pulse by ETLx(Event Trigger Logic, x = [0 to 3]) unit. Use type XMC_ERU_ETL_OUTPUT_TRIGGER_t for this enum.

Enumerator
XMC_ERU_ETL_OUTPUT_TRIGGER_DISABLED 

trigger pulse generation disabled

XMC_ERU_ETL_OUTPUT_TRIGGER_ENABLED 

trigger pulse generation enabled

Defines input path combination along with polarity for event generation by ERSx(Event request source) unit to ETLx(Event trigger logic),x = [0 to 3] unit.

eru_input_trigger.png
ETLx input trigger signal generation
Enumerator
XMC_ERU_ETL_SOURCE_A 

select (A) path as a event source

XMC_ERU_ETL_SOURCE_B 

select (B) path as a event source

XMC_ERU_ETL_SOURCE_A_OR_B 

select (A OR B) path as a event source

XMC_ERU_ETL_SOURCE_A_AND_B 

select (A AND B) path as a event source

XMC_ERU_ETL_SOURCE_NOT_A 

select (inverted A) path as a event source

XMC_ERU_ETL_SOURCE_NOT_A_OR_B 

select (inverted A OR B) path as a event source

XMC_ERU_ETL_SOURCE_NOT_A_AND_B 

select (inverted A AND B) path as a event source

XMC_ERU_ETL_SOURCE_NOT_B 

select (inverted B) path as a event source

XMC_ERU_ETL_SOURCE_A_OR_NOT_B 

select (A OR inverted B) path as a event source

XMC_ERU_ETL_SOURCE_A_AND_NOT_B 

select (A AND inverted B) path as a event source

XMC_ERU_ETL_SOURCE_NOT_A_OR_NOT_B 

select (inverted A OR inverted B) path as a event source

XMC_ERU_ETL_SOURCE_NOT_A_AND_NOT_B 

select (inverted A AND inverted B) path as a event source

Defines status flag reset mode generated by ETLx(Event Trigger Logic, x = [0 to 3]) unit. Use type XMC_ERU_ETL_STATUS_FLAG_MODE_t for this enum.

Enumerator
XMC_ERU_ETL_STATUS_FLAG_MODE_SWCTRL 

Status flag is in sticky mode. Retain the same state until cleared by software. In case of pattern match this mode is used.

XMC_ERU_ETL_STATUS_FLAG_MODE_HWCTRL 

Status flag is in non-sticky mode. Automatically cleared by the opposite edge detection.
eg. if positive edge is selected as trigger event, for the negative edge event the status flag is cleared.

Defines the inputs for Pattern detection. The configured status flag signal from the ETLx(Event Trigger Logic, x = [0 to 3]) unit indicates the pattern to be detected.

Enumerator
XMC_ERU_OGU_PATTERN_DETECTION_INPUT0 

Status flag ETL0, participating in pattern match

XMC_ERU_OGU_PATTERN_DETECTION_INPUT1 

Status flag ETL1, participating in pattern match

XMC_ERU_OGU_PATTERN_DETECTION_INPUT2 

Status flag ETL0, participating in pattern match

XMC_ERU_OGU_PATTERN_DETECTION_INPUT3 

Status flag ETL0, participating in pattern match

Defines pattern detection feature to be enabled or not in OGUy(Output gating unit, y = [0 to 3]).

Enumerator
XMC_ERU_OGU_PATTERN_DETECTION_DISABLED 

Pattern match is disabled

XMC_ERU_OGU_PATTERN_DETECTION_ENABLED 

Pattern match is enabled, the selected status flags of ETLx(Event Trigger Logic, x = [0 to 3]) unit, are used in pattern detection.

Defines peripheral trigger signal for event generation. Based on the selected peripheral for event generation, the trigger signal is mapped.

Enumerator
XMC_ERU_OGU_PERIPHERAL_TRIGGER1 

OGUy1 signal is mapped for event generation

XMC_ERU_OGU_PERIPHERAL_TRIGGER2 

OGUy2 signal is mapped for event generation

XMC_ERU_OGU_PERIPHERAL_TRIGGER3 

OGUy3 signal is mapped for event generation

Defines the gating scheme for service request generation. In later stage of the OGUy(Output gating unit, y = [0 to 3]) based on the gating scheme selected ERU_GOUTy(gated output signal) output is defined.

interrupt_gating_signal.png
Interrupt gating signal
Enumerator
XMC_ERU_OGU_SERVICE_REQUEST_DISABLED 

Service request blocked, ERUx_GOUTy = 0

XMC_ERU_OGU_SERVICE_REQUEST_ON_TRIGGER 

Service request generated enabled, ERUx_GOUTy = 1

XMC_ERU_OGU_SERVICE_REQUEST_ON_TRIGGER_AND_PATTERN_MATCH 

Service request generated on trigger event and input pattern match, ERUx_GOUTy = ~pattern matching result

XMC_ERU_OGU_SERVICE_REQUEST_ON_TRIGGER_AND_PATTERN_MISMATCH 

Service request generated on trigger event and input pattern mismatch, ERUx_GOUTy = pattern matching result

Function Documentation

void XMC_ERU_Disable ( XMC_ERU_t *const  eru)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
Returns
None
Description:
Disables clock and releases reset for ERU1 module.
Note:
  1. Required to configure ERU1 module again after calling XMC_ERU_ETL_Init() or XMC_ERU_OGU_Init(). Since the all the registers are reset with default values.
Related APIs:
XMC_ERU_Enable()
void XMC_ERU_Enable ( XMC_ERU_t *const  eru)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
Returns
None
Description:
If ERU1 module is selected, it enables clock and releases reset.
This API is called by XMC_ERU_ETL_Init() or XMC_ERU_OGU_Init() and therefore no need to call it explicitly during initialization sequence. Call this API to enable ERU1 module once again if the module is disabled by calling XMC_ERU_Disable(). For ERU0 module clock gating and reset features are not available.
Note:
  1. Required to configure ERU1 module again after calling XMC_ERU_Disable(). Since the all the registers are reset with default values.
Related APIs:
XMC_ERU_ETL_Init(), XMC_ERU_OGU_Init(), XMC_ERU_Disable().
void XMC_ERU_ETL_ClearStatusFlag ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3]
Returns
None
Description:
Set the status flag bit(FL) in EXICONx(x = [0 to 3]).
If auto clear of the status flag is not enabled by detection of the opposite edge of the event edge, this API clears the Flag. SO that next event is considered as new event.
Related APIs:
XMC_ERU_ETL_SetStatusFlag(), XMC_ERU_ETL_GetStatusFlag()
void XMC_ERU_ETL_DisableOutputTrigger ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3].
Returns
None
Description:
Disables the trigger pulse generation by clearing the (PE) of the EXICONx(x = channel).
Typically this can used when only pattern match is being used for event generation.
Related APIs:
XMC_ERU_ETL_EnableOutputTrigger()
void XMC_ERU_ETL_EnableOutputTrigger ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL_t  trigger 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3].
triggerOutput Channel of OGUy(Output gating unit y = [0 to 3]) to be mapped by the trigger pulse Refer XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL_t for valid value.
Returns
None
Description:
Configure which Channel of OGUy(Output gating unit y = [0 to 3]) to be mapped by the trigger pulse generated by ETLx(Event Trigger Logic, x = channel) by setting (OCS and PE) bit fields.
The trigger pulse is generated for one clock pulse along with the flag status update. This is typically used to trigger the ISR for the external events. The configured OGUy(Output gating unit y = [0 to 3]), generates the event based on the trigger pulse.If output trigger pulse generation is disabled by XMC_ERU_ETL_DisableOutputTrigger(), XMC_ERU_ETL_EnableOutputTrigger() can called to reconfigure. These values are set during initialization in XMC_ERU_ETL_Init(). Call this to change the trigger edge, as needed later in the program.
Related APIs:
XMC_ERU_ETL_DisableOutputTrigger()
XMC_ERU_ETL_EDGE_DETECTION_t XMC_ERU_ETL_GetEdgeDetection ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3]
Returns
XMC_ERU_ETL_EDGE_DETECTION_t indicate which egde/s is configured for event generation
Description:
Return event trigger edge/s by reading (RE, FE) bits of EXICONx(x = [0 to 3]) register.
Rising edge, falling edge or either edges can be selected to generate the event. Call this to get the configured trigger edge.
uint32_t XMC_ERU_ETL_GetStatusFlag ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3].
Returns
uint32_t Current state of the status flag bit(FL). Result is in 32-bit format.
Description:
Returns status flag state of channel.
The function can typically be used to clear the status flag using software, when auto clear is not enabled.
Related APIs:
XMC_ERU_ETL_SetStatusFlag(), XMC_ERU_ETL_ClearStatusFlag()
void XMC_ERU_ETL_Init ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_ETL_CONFIG_t *const  config 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_ETLx(Event trigger logic unit) channel Range : [0 to 3]
configpointer to a constant ERU_ETLx configuration data structure. Refer data structure XMC_ERU_ETL_CONFIG_t for detail.
Returns
None

Description:
Initializes the selected ERU_ETLx channel with the config structure.

Invokes XMC_ERU_Enable() to enable eru module clock. Then configures

  • Input signal for path A and Path B,
  • Trigger pulse generation,
  • status flag clear mode,
  • Event Trigger edge,
  • Output Channel of OGUy(Output gating unit y = [0 to 3]) to be mapped by the trigger pulse,
  • input path combination along with polarity for event generation

.

void XMC_ERU_ETL_SetEdgeDetection ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_ETL_EDGE_DETECTION_t  edge_detection 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3]
edge_detectionevent trigger edge. Refer XMC_ERU_ETL_EDGE_DETECTION_t enum for valid values.
Returns
None
Description:
Configure event trigger edge/s by setting (RE, FE) bits of EXICONx(x = [0 to 3]) register.
Rising edge, falling edge or either edges can be selected to generate the event.These values are set during initialization in XMC_ERU_ETL_Init(). Call this to change the trigger edge, as needed later in the program.
void XMC_ERU_ETL_SetInput ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_ETL_INPUT_A_t  input_a,
const XMC_ERU_ETL_INPUT_B_t  input_b 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3]
input_ainput signal for path A of ERSx(Event request source, x = [0 to 3]) unit.
Refer XMC_ERU_ETL_INPUT_A_t for valid value or xmc1_eru_map.h/xmc4_eru_map.h file where the mapping of the input is done based on selected signal.
e.g: ERU0_ETL3_INPUTA_P2_7.
input_binput signal for path B of ERSx(Event request source, x = [0 to 3]) unit.
Refer XMC_ERU_ETL_INPUT_B_t for valid value or xmc1_eru_map.h/xmc4_eru_map.h file where the mapping of the input is done based on selected signal.
e.g: ERU0_ETL0_INPUTB_P2_0.
Returns
None
Description:
Configures the event source for path A and path B in with selected input_a and input_b respectively.
These values are set during initialization in XMC_ERU_ETL_Init(). Call this to change the input, as needed later in the program. According to the ports/peripheral selected, the event source has to be changed.
void XMC_ERU_ETL_SetSource ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_ETL_SOURCE_t  source 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3]
sourceinput path combination along with polarity for event generation by ERSx(Event request source) unit. Refer XMC_ERU_ETL_SOURCE_t enum for valid input values.
Returns
None
Description:
Select input path combination along with polarity for event generation by setting (SS, NA, NB) bits in ERSx(Event request source) unit
The signal ERSxO is generated from the selection and this is connected to ETLx(Event trigger logic, x = [0 to 3]) for further action. These values are set during initialization in XMC_ERU_ETL_Init(). Call this to change the source, as needed later in the program.
void XMC_ERU_ETL_SetStatusFlag ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3]
Returns
None
Description:
Set the status flag bit(FL) in EXICONx(x = [0 to 3]).
The status flag indicates that the configured event has occurred. This status flag is used in Pattern match detection by OGUy(Output gating unit, y = [0 to 3]).
Related APIs:
XMC_ERU_ETL_ClearStatusFlag(), XMC_ERU_ETL_GetStatusFlag()
void XMC_ERU_ETL_SetStatusFlagMode ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_ETL_STATUS_FLAG_MODE_t  mode 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address.
channelERU_ETLx(Event trigger logic unit) channel. Range : [0 to 3].
modeSet whether status flag has to be cleared by software or hardware. Refer XMC_ERU_ETL_STATUS_FLAG_MODE_t for valid value.
Returns
None
Description:
Set the mode for status flag mode by setting (LD) bit in EXICONx(x = channel) register.
If SWCTRL is selected, status flag has to be cleared by software. This is typically used for pattern match detection. If HWCTRL is selected, status flag is cleared by hardware. If Positive edge is selected as event edge, for negative edge status flag is cleared and vice versa.This is typically used for continuous event detection.These values are set during initialization in XMC_ERU_ETL_Init(). Call this to change the trigger edge, as needed later in the program.
Related APIs:
XMC_ERU_ETL_ClearStatusFlag(), XMC_ERU_ETL_GetStatusFlag()
void XMC_ERU_OGU_DisablePatternDetection ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_OGUy(Output gating unit) channel Range : [0 to 3]
Returns
None
Description:
Disable the pattern detection by clearing (GEEN) bit.
Typically XMC_ERU_OGU_DisablePatternDetection is used when events has to be generated peripheral triggers.
Related APIs:
XMC_ERU_OGU_EnablePatternDetection(), XMC_ERU_OGU_GetPatternDetectionStatus()
void XMC_ERU_OGU_DisablePeripheralTrigger ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_OGUy(Output gating unit) channel Range : [0 to 3]
Returns
None
Description:
Disables event generation based on peripheral trigger by clearing (ISS) bit.
This is typically used when peripheral trigger is no longer need. After calling XMC_ERU_OGU_DisablePeripheralTrigger(), XMC_ERU_OGU_EnablePeripheralTrigger() has to be called to reconfigure the signals again.
Related APIs:
XMC_ERU_OGU_EnablePeripheralTrigger()
void XMC_ERU_OGU_EnablePatternDetection ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_OGU_PATTERN_DETECTION_INPUT_t  input 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_OGUy(Output gating unit) channel Range : [0 to 3]
inputERU_ETLx(x = [0 to 3]), for pattern match detection. Refer XMC_ERU_OGU_PATTERN_DETECTION_INPUT_t for valid values. Logical OR combination of the enum items can be passed as the input.
Returns
None
Description:
Configures ERU_ETLx(x = [0 to 3]) for pattern match detection by setting IPENx(x = [0 to 3]) and GEEN bits.
These bits are dedicated to each channel of the ERU_ETLx(x = [0 to 3]). These values are set during initialization in XMC_ERU_OGU_Init(). Call this to change the pattern, as needed later in the program.
Related APIs:
XMC_ERU_OGU_DisablePatternDetection(), XMC_ERU_OGU_GetPatternDetectionStatus()
void XMC_ERU_OGU_EnablePeripheralTrigger ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_OGU_PERIPHERAL_TRIGGER_t  peripheral_trigger 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_OGUy(Output gating unit) channel Range : [0 to 3]
peripheral_triggerwhich peripheral trigger signal is used for event generation. Refer XMC_ERU_OGU_PERIPHERAL_TRIGGER_t for the valid values, or xmc1_eru_map.h/xmc4_eru_map.h file where the mapping of the peripheral input is done based on input. e.g: ERU0_OGU0_PERIPHERAL_TRIGGER_CCU40_SR0.
Returns
None
Description:
Configures peripheral trigger input, by setting (ISS) bit.
Based on the peripheral the input signal has to be selected. These values are set during initialization in XMC_ERU_OGU_Init(). Call this to change the input, as needed later in the program.
Related APIs:
XMC_ERU_OGU_DisablePeripheralTrigger()
uint32_t XMC_ERU_OGU_GetPatternDetectionStatus ( XMC_ERU_t *const  eru,
const uint8_t  channel 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_OGUy(Output gating unit) channel Range : [0 to 3]
Returns
uint32_t returns the pattern match result. Result is in 32-bit format.
Description:
This API returns the pattern match result by reading (PDR) bit.
Related APIs:
XMC_ERU_OGU_EnablePatternDetection(), XMC_ERU_OGU_DisablePatternDetection()
void XMC_ERU_OGU_Init ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_OGU_CONFIG_t *const  config 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_OGUy(Output gating unit) channel Range : [0 to 3]
configpointer to constant ERU_OGUy configuration data structure. Refer data structure XMC_ERU_OGU_CONFIG_t for detail.
Returns
None

Description:
Initializes the selected ERU_OGUy channel with the config structure.

Invokes XMC_ERU_Enable() to enable eru module clock. Then configures

  • Pattern detection,
  • Peripheral trigger input,
  • Gating for service request generation

.

void XMC_ERU_OGU_SetServiceRequestMode ( XMC_ERU_t *const  eru,
const uint8_t  channel,
const XMC_ERU_OGU_SERVICE_REQUEST_t  mode 
)
Parameters
eruA constant pointer to XMC_ERU_t, pointing to the ERU base address
channelERU_OGUy(Output gating unit) channel Range : [0 to 3]
modegating scheme for service request generation. Refer XMC_ERU_OGU_SERVICE_REQUEST_t for valid values.
Returns
None
Description:
Configures the gating scheme for service request generation by setting (GP) bit.
Typically this function is used to change the service request generation scheme. These values are set during initialization in XMC_ERU_OGU_Init(). Call this to change the gating mode, as needed later in the program.
Generated on Mon Aug 7 2017 11:33:57 for XMC Peripheral Library for XMC4000 Family by   doxygen 1.8.11