MCUSW
Loading...
Searching...
No Matches
ICU Configuration

Introduction

This files defines ICU MCAL configuration structures

This files defines ICU MCAL configuration structures

Data Structures

struct  Icu_DutyCycleType
 This type defines Duty Cycle struct. More...
 
struct  Icu_ChannelConfigType_PC
 ICU Channel Config Structure of Pre-Compile only. More...
 
struct  Icu_ConfigType_PC
 ICU Config Structure of Pre-Compile only. More...
 
struct  Icu_ChannelConfigType
 ICU Channel Config Structure. More...
 
struct  Icu_ConfigType
 ICU Config Structure. More...
 
struct  Icu_RegisterReadbackType
 Icu register readback structure. More...
 

Variables

Icu_ValueType Icu_DutyCycleType::ActiveTime
 
Icu_ValueType Icu_DutyCycleType::PeriodTime
 
Icu_ChannelType Icu_ChannelConfigType_PC::channelId
 
Icu_ChannelConfigType_PC Icu_ConfigType_PC::chCfg [ICU_MAX_NUM_CHANNELS]
 
Icu_ActivationType Icu_ChannelConfigType::defaultStartEdge
 
Icu_MeasurementModeType Icu_ChannelConfigType::measurementMode
 
Icu_SignalMeasurementPropertyType Icu_ChannelConfigType::signalMeasurementProperty
 
Icu_NotifyFuncType Icu_ChannelConfigType::notificationHandler
 
Icu_TimestampBufferType Icu_ChannelConfigType::bufferType
 
uint32 Icu_ChannelConfigType::instanceClkMHz
 
uint32 Icu_ChannelConfigType::prescaler
 
Icu_ChannelType Icu_ConfigType::icuMaxChannel
 
Icu_ChannelConfigType Icu_ConfigType::chCfg [ICU_MAX_NUM_CHANNELS]
 
uint32 Icu_RegisterReadbackType::ECAP_CNTPHS
 
uint32 Icu_RegisterReadbackType::ECAP_ECCTL
 
uint32 Icu_RegisterReadbackType::ECAP_ECINT_EN_FLG
 

Macros

#define ICU_PRE_COMPILE_VARIANT   (STD_ON )
 ICU Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time)
 
#define ICU_VARIANT_POST_BUILD   (STD_OFF)
 
#define ICU_PRE_COMPILE_VARIANT   (STD_ON )
 ICU Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time)
 
#define ICU_VARIANT_POST_BUILD   (STD_OFF)
 

Macros to define Rising and Falling edge config for capture registers

enum  Icu_ModeType { ICU_MODE_NORMAL , ICU_MODE_SLEEP }
 This type defines a range of mode type. More...
 
enum  Icu_InputStateType { ICU_ACTIVE , ICU_IDLE }
 This type defines a input state of ICU driver. More...
 
enum  Icu_ActivationType { ICU_RISING_EDGE , ICU_FALLING_EDGE , ICU_BOTH_EDGES }
 This type defines Activation range. More...
 
enum  Icu_MeasurementModeType { ICU_MODE_SIGNAL_EDGE_DETECT , ICU_MODE_SIGNAL_MEASUREMENT , ICU_MODE_TIMESTAMP , ICU_MODE_EDGE_COUNTER }
 This type defines available measurement modes. More...
 
enum  Icu_SignalMeasurementPropertyType { ICU_LOW_TIME , ICU_HIGH_TIME , ICU_PERIOD_TIME , ICU_DUTY_CYCLE }
 This type defines Signal Measurement Property range. More...
 
enum  Icu_TimestampBufferType { ICU_LINEAR_BUFFER , ICU_CIRCULAR_BUFFER }
 This type defines TimeStamp Property range. More...
 
typedef uint32 Icu_ValueType
 This type defines Value type.
 
typedef uint32 Icu_IndexType
 This type defines return value Icu_GetTimeStampIndex.
 
typedef uint32 Icu_EdgeNumberType
 This type defines return value of Icu-Icu_GetEdgeNumbers.
 
typedef void(* Icu_NotifyFuncType) (void)
 Notification callback function pointer

 
typedef uint8 Icu_ChannelType
 This type defines Channel type.
 
typedef uint32 Icu_ChannelPrescalerType
 This type defines Prescaler type.
 
void Icu_Init (const Icu_ConfigType *ConfigPtr)
 Service for ICU initialization.
 
void Icu_DeInit (void)
 Service for ICU de-initialization.
 
void Icu_SetActivationCondition (Icu_ChannelType Channel, Icu_ActivationType Activation)
 Service for setting Activation Condition.
 
void Icu_DisableNotification (Icu_ChannelType Channel)
 Service for disabling notification.
 
void Icu_EnableNotification (Icu_ChannelType Channel)
 Service for enabling notification.
 
Icu_InputStateType Icu_GetInputState (Icu_ChannelType Channel)
 Service for getting the ICU input status.
 
void Icu_StartTimestamp (Icu_ChannelType Channel, Icu_ValueType *BufferPtr, uint16 BufferSize, uint16 NotifyInterval)
 Service for starts the captuing of timer values on the edges.
 
void Icu_StopTimestamp (Icu_ChannelType Channel)
 Service for stopping the timestamp measurement.
 
Icu_IndexType Icu_GetTimestampIndex (Icu_ChannelType Channel)
 Service for reading the timestamp index of a givem channel.
 
void Icu_ResetEdgeCount (Icu_ChannelType Channel)
 Service for resets the value of the counted edges to zero.
 
void Icu_EnableEdgeCount (Icu_ChannelType Channel)
 Service enabling the counting of edges of a given channel.
 
void Icu_DisableEdgeCount (Icu_ChannelType Channel)
 Service for disabling the couting of edges of the given channel.
 
Icu_EdgeNumberType Icu_GetEdgeNumbers (Icu_ChannelType Channel)
 Service for reading the number of counted edges.
 
void Icu_EnableEdgeDetection (Icu_ChannelType Channel)
 Service for enabling/re-enabling the detection of edges of the given channel.
 
void Icu_DisableEdgeDetection (Icu_ChannelType Channel)
 Service for disabling the detection of edges of the given channel.
 
void Icu_StartSignalMeasurement (Icu_ChannelType Channel)
 Service for starting the measurement of signals.
 
void Icu_StopSignalMeasurement (Icu_ChannelType Channel)
 Service for stopping the measurement of signals.
 
Icu_ValueType Icu_GetTimeElapsed (Icu_ChannelType Channel)
 Service for reading the elasped time for the given channel.
 
void Icu_GetDutyCycleValues (Icu_ChannelType Channel, Icu_DutyCycleType *DutyCycleValues)
 Service for reading the coherent active time and period time of given channel.
 
void Icu_CheckWakeup (EcuM_WakeupSourceType WakeupSource)
 This function checks if a wakeup capable ICU channel is the source for a wakeup event and calls the ECU state manager service EcuM_SetWakeupEvent in case of a valid ICU channel wakeup event.
 
void Icu_DisableWakeup (Icu_ChannelType Channel)
 This function disables the wakeup capability of a single ICU channel.
 
void Icu_EnableWakeup (Icu_ChannelType Channel)
 This function (re-)enables the wakeup capability of the given ICU channel.
 
void Icu_SetMode (Icu_ModeType Mode)
 This function sets the ICU mode.
 
Std_ReturnType Icu_RegisterReadback (Icu_ChannelType IcuChannel, Icu_RegisterReadbackType *RegRbPtr)
 
Icu_IndexType Icu_GetTimeStampIndex (Icu_ChannelType Channel)
 

ICU Driver ISR category level

Definitions for ICU Driver ISR ISR category level.

const uint32 Icu_HwUnitBaseAddr [ICU_MAX_NUM_CHANNELS]
 
const struct Icu_ConfigType_PC_s IcuConfigSet_PC
 ICU Configuration structure declaration.
 
const struct Icu_ConfigType_s IcuConfigSet
 
void Icu_ch1Notify (void)
 ICU ISR.
 
#define IcuConf_IcuChannel_IcuChannel_0   (1U)
 Channel ID Symbolic Names Configured channel ID(s)
 
#define ICU_CHANNEL1   (1U)
 ECAP Channel 1, in MAIN DOMAIN.
 

ICU Driver ISR category level

Definitions for ICU Driver ISR ISR category level.

const uint32 Icu_HwUnitBaseAddr [ICU_MAX_NUM_CHANNELS]
 
const struct Icu_ConfigType_PC_s IcuConfigSet_PC
 ICU Configuration structure declaration.
 
const struct Icu_ConfigType_s IcuConfigSet
 
void Icu_ch2Notify (void)
 ICU ISR.
 
#define ICU_ISR_VOID   (0x00U)
 void ISR type
 
#define ICU_ISR_CAT1   (0x01U)
 Category 1 ISR type.
 
#define ICU_ISR_CAT2   (0x02U)
 Category 2 ISR type.
 
#define ICU_SAFETY_DIAGNOSTIC_API   (STD_ON)
 Enable/Disable Icu Safety Diagnostic.
 
#define ICU_DE_INIT_API   (STD_ON)
 Enable/Disable Icu DeInit API.
 
#define ICU_EDGE_COUNT_API   (STD_ON)
 Enable/Disable Edge Count API.
 
#define ICU_EDGE_DETECT_API   (STD_ON)
 Enable/Disable Edge Detect API.
 
#define ICU_GET_DUTY_CYCLE_VALUES_API   (STD_ON)
 Enable/Disable Get Duty Cycle Values API.
 
#define ICU_GET_INPUT_STATE_API   (STD_ON)
 Enable/Disable Get Input State API.
 
#define ICU_GET_TIME_ELAPSED_API   (STD_ON)
 Enable/Disable Get Time Elapsed API.
 
#define ICU_GET_VERSION_INFO_API   (STD_ON)
 Enable/Disable Get Version Info API.
 
#define ICU_SIGNAL_MEASUREMENT_API   (STD_ON)
 Enable/Disable Signal Measurement API.
 
#define ICU_TIMESTAMP_API   (STD_ON)
 Enable/Disable Timestamp API.
 
#define ICU_DEV_ERROR_DETECT   (STD_ON)
 Enable/Disable Development error detet.
 
#define ICU_WAKEUP_FUNCTIONALITY_API   (STD_OFF)
 Enable/disable ICU wakeup functionality API.
 
#define ICU_ENABLEWAKEUP_API   (STD_OFF)
 Enable/disable ICU wakeup functionality API.
 
#define ICU_DISABLEWAKEUP_API   (STD_OFF)
 Enable/disable ICU wakeup functionality API.
 
#define ICU_SETMODE_API   (STD_OFF)
 Enable/Disable Icu set mode API.
 
#define ICU_INIT_CONFIG_PC   IcuConfigSet
 Pre Compile config macro name.
 
#define ICU_ISR_TYPE   (ICU_ISR_CAT1)
 ISR type.
 
#define ICU_MAX_NUM_CHANNELS   (3U)
 
#define ICU_ISR_VOID   (0x00U)
 void ISR type
 
#define ICU_ISR_CAT1   (0x01U)
 Category 1 ISR type.
 
#define ICU_ISR_CAT2   (0x02U)
 Category 2 ISR type.
 
#define ICU_SAFETY_DIAGNOSTIC_API   (STD_OFF)
 Enable/Disable Icu Safety Diagnostic.
 
#define ICU_DE_INIT_API   (STD_ON)
 Enable/Disable Icu DeInit API.
 
#define ICU_EDGE_COUNT_API   (STD_ON)
 Enable/Disable Edge Count API.
 
#define ICU_EDGE_DETECT_API   (STD_ON)
 Enable/Disable Edge Detect API.
 
#define ICU_GET_DUTY_CYCLE_VALUES_API   (STD_ON)
 Enable/Disable Get Duty Cycle Values API.
 
#define ICU_GET_INPUT_STATE_API   (STD_ON)
 Enable/Disable Get Input State API.
 
#define ICU_GET_TIME_ELAPSED_API   (STD_ON)
 Enable/Disable Get Time Elapsed API.
 
#define ICU_GET_VERSION_INFO_API   (STD_ON)
 Enable/Disable Get Version Info API.
 
#define ICU_SIGNAL_MEASUREMENT_API   (STD_ON)
 Enable/Disable Signal Measurement API.
 
#define ICU_TIMESTAMP_API   (STD_ON)
 Enable/Disable Timestamp API.
 
#define ICU_DEV_ERROR_DETECT   (STD_ON)
 Enable/Disable Development error detet.
 
#define ICU_WAKEUP_FUNCTIONALITY_API   (STD_OFF)
 Enable/disable ICU wakeup functionality API.
 
#define ICU_ENABLEWAKEUP_API   (STD_OFF)
 Enable/disable ICU wakeup functionality API.
 
#define ICU_DISABLEWAKEUP_API   (STD_OFF)
 Enable/disable ICU wakeup functionality API.
 
#define ICU_SETMODE_API   (STD_OFF)
 Enable/Disable Icu set mode API.
 
#define IcuConf_IcuChannel_IcuChannel_2   (2U)
 Channel ID Symbolic Names Configured channel ID(s)
 
#define ICU_INIT_CONFIG_PC   IcuConfigSet
 Pre Compile config macro name.
 
#define ICU_ISR_TYPE   (ICU_ISR_CAT1)
 ISR type.
 
#define ICU_MAX_NUM_CHANNELS   (3U)
 
#define ICU_CHANNEL2   (2U)
 ECAP Channel 2, in MAIN R5 DOMAIN.
 

Macro Definition Documentation

◆ ICU_PRE_COMPILE_VARIANT [1/2]

#define ICU_PRE_COMPILE_VARIANT   (STD_ON )

ICU Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time)

◆ ICU_VARIANT_POST_BUILD [1/2]

#define ICU_VARIANT_POST_BUILD   (STD_OFF)

◆ ICU_ISR_VOID [1/2]

#define ICU_ISR_VOID   (0x00U)

void ISR type

◆ ICU_ISR_CAT1 [1/2]

#define ICU_ISR_CAT1   (0x01U)

Category 1 ISR type.

◆ ICU_ISR_CAT2 [1/2]

#define ICU_ISR_CAT2   (0x02U)

Category 2 ISR type.

◆ ICU_SAFETY_DIAGNOSTIC_API [1/2]

#define ICU_SAFETY_DIAGNOSTIC_API   (STD_ON)

Enable/Disable Icu Safety Diagnostic.

◆ ICU_DE_INIT_API [1/2]

#define ICU_DE_INIT_API   (STD_ON)

Enable/Disable Icu DeInit API.

◆ ICU_EDGE_COUNT_API [1/2]

#define ICU_EDGE_COUNT_API   (STD_ON)

Enable/Disable Edge Count API.

◆ ICU_EDGE_DETECT_API [1/2]

#define ICU_EDGE_DETECT_API   (STD_ON)

Enable/Disable Edge Detect API.

◆ ICU_GET_DUTY_CYCLE_VALUES_API [1/2]

#define ICU_GET_DUTY_CYCLE_VALUES_API   (STD_ON)

Enable/Disable Get Duty Cycle Values API.

◆ ICU_GET_INPUT_STATE_API [1/2]

#define ICU_GET_INPUT_STATE_API   (STD_ON)

Enable/Disable Get Input State API.

◆ ICU_GET_TIME_ELAPSED_API [1/2]

#define ICU_GET_TIME_ELAPSED_API   (STD_ON)

Enable/Disable Get Time Elapsed API.

◆ ICU_GET_VERSION_INFO_API [1/2]

#define ICU_GET_VERSION_INFO_API   (STD_ON)

Enable/Disable Get Version Info API.

◆ ICU_SIGNAL_MEASUREMENT_API [1/2]

#define ICU_SIGNAL_MEASUREMENT_API   (STD_ON)

Enable/Disable Signal Measurement API.

◆ ICU_TIMESTAMP_API [1/2]

#define ICU_TIMESTAMP_API   (STD_ON)

Enable/Disable Timestamp API.

◆ ICU_DEV_ERROR_DETECT [1/2]

#define ICU_DEV_ERROR_DETECT   (STD_ON)

Enable/Disable Development error detet.

◆ ICU_WAKEUP_FUNCTIONALITY_API [1/2]

#define ICU_WAKEUP_FUNCTIONALITY_API   (STD_OFF)

Enable/disable ICU wakeup functionality API.

◆ ICU_ENABLEWAKEUP_API [1/2]

#define ICU_ENABLEWAKEUP_API   (STD_OFF)

Enable/disable ICU wakeup functionality API.

◆ ICU_DISABLEWAKEUP_API [1/2]

#define ICU_DISABLEWAKEUP_API   (STD_OFF)

Enable/disable ICU wakeup functionality API.

◆ ICU_SETMODE_API [1/2]

#define ICU_SETMODE_API   (STD_OFF)

Enable/Disable Icu set mode API.

◆ IcuConf_IcuChannel_IcuChannel_0

#define IcuConf_IcuChannel_IcuChannel_0   (1U)

Channel ID Symbolic Names Configured channel ID(s)

Channel identifiers

◆ ICU_INIT_CONFIG_PC [1/2]

#define ICU_INIT_CONFIG_PC   IcuConfigSet

Pre Compile config macro name.

◆ ICU_ISR_TYPE [1/2]

#define ICU_ISR_TYPE   (ICU_ISR_CAT1)

ISR type.

◆ ICU_MAX_NUM_CHANNELS [1/2]

#define ICU_MAX_NUM_CHANNELS   (3U)

◆ ICU_CHANNEL1

#define ICU_CHANNEL1   (1U)

ECAP Channel 1, in MAIN DOMAIN.

◆ ICU_PRE_COMPILE_VARIANT [2/2]

#define ICU_PRE_COMPILE_VARIANT   (STD_ON )

ICU Build Variant. Build variants.(i.e Pre-compile,Post-build or Link time)

◆ ICU_VARIANT_POST_BUILD [2/2]

#define ICU_VARIANT_POST_BUILD   (STD_OFF)

◆ ICU_ISR_VOID [2/2]

#define ICU_ISR_VOID   (0x00U)

void ISR type

◆ ICU_ISR_CAT1 [2/2]

#define ICU_ISR_CAT1   (0x01U)

Category 1 ISR type.

◆ ICU_ISR_CAT2 [2/2]

#define ICU_ISR_CAT2   (0x02U)

Category 2 ISR type.

◆ ICU_SAFETY_DIAGNOSTIC_API [2/2]

#define ICU_SAFETY_DIAGNOSTIC_API   (STD_OFF)

Enable/Disable Icu Safety Diagnostic.

◆ ICU_DE_INIT_API [2/2]

#define ICU_DE_INIT_API   (STD_ON)

Enable/Disable Icu DeInit API.

◆ ICU_EDGE_COUNT_API [2/2]

#define ICU_EDGE_COUNT_API   (STD_ON)

Enable/Disable Edge Count API.

◆ ICU_EDGE_DETECT_API [2/2]

#define ICU_EDGE_DETECT_API   (STD_ON)

Enable/Disable Edge Detect API.

◆ ICU_GET_DUTY_CYCLE_VALUES_API [2/2]

#define ICU_GET_DUTY_CYCLE_VALUES_API   (STD_ON)

Enable/Disable Get Duty Cycle Values API.

◆ ICU_GET_INPUT_STATE_API [2/2]

#define ICU_GET_INPUT_STATE_API   (STD_ON)

Enable/Disable Get Input State API.

◆ ICU_GET_TIME_ELAPSED_API [2/2]

#define ICU_GET_TIME_ELAPSED_API   (STD_ON)

Enable/Disable Get Time Elapsed API.

◆ ICU_GET_VERSION_INFO_API [2/2]

#define ICU_GET_VERSION_INFO_API   (STD_ON)

Enable/Disable Get Version Info API.

◆ ICU_SIGNAL_MEASUREMENT_API [2/2]

#define ICU_SIGNAL_MEASUREMENT_API   (STD_ON)

Enable/Disable Signal Measurement API.

◆ ICU_TIMESTAMP_API [2/2]

#define ICU_TIMESTAMP_API   (STD_ON)

Enable/Disable Timestamp API.

◆ ICU_DEV_ERROR_DETECT [2/2]

#define ICU_DEV_ERROR_DETECT   (STD_ON)

Enable/Disable Development error detet.

◆ ICU_WAKEUP_FUNCTIONALITY_API [2/2]

#define ICU_WAKEUP_FUNCTIONALITY_API   (STD_OFF)

Enable/disable ICU wakeup functionality API.

◆ ICU_ENABLEWAKEUP_API [2/2]

#define ICU_ENABLEWAKEUP_API   (STD_OFF)

Enable/disable ICU wakeup functionality API.

◆ ICU_DISABLEWAKEUP_API [2/2]

#define ICU_DISABLEWAKEUP_API   (STD_OFF)

Enable/disable ICU wakeup functionality API.

◆ ICU_SETMODE_API [2/2]

#define ICU_SETMODE_API   (STD_OFF)

Enable/Disable Icu set mode API.

◆ IcuConf_IcuChannel_IcuChannel_2

#define IcuConf_IcuChannel_IcuChannel_2   (2U)

Channel ID Symbolic Names Configured channel ID(s)

Channel identifiers

◆ ICU_INIT_CONFIG_PC [2/2]

#define ICU_INIT_CONFIG_PC   IcuConfigSet

Pre Compile config macro name.

◆ ICU_ISR_TYPE [2/2]

#define ICU_ISR_TYPE   (ICU_ISR_CAT1)

ISR type.

◆ ICU_MAX_NUM_CHANNELS [2/2]

#define ICU_MAX_NUM_CHANNELS   (3U)

◆ ICU_CHANNEL2

#define ICU_CHANNEL2   (2U)

ECAP Channel 2, in MAIN R5 DOMAIN.

Typedef Documentation

◆ Icu_ValueType

typedef uint32 Icu_ValueType

This type defines Value type.

◆ Icu_IndexType

typedef uint32 Icu_IndexType

This type defines return value Icu_GetTimeStampIndex.

◆ Icu_EdgeNumberType

typedef uint32 Icu_EdgeNumberType

This type defines return value of Icu-Icu_GetEdgeNumbers.

◆ Icu_NotifyFuncType

typedef void(* Icu_NotifyFuncType) (void)

Notification callback function pointer

◆ Icu_ChannelType

typedef uint8 Icu_ChannelType

This type defines Channel type.

◆ Icu_ChannelPrescalerType

typedef uint32 Icu_ChannelPrescalerType

This type defines Prescaler type.

Enumeration Type Documentation

◆ Icu_ModeType

This type defines a range of mode type.

Enumerator
ICU_MODE_NORMAL 

Normal Mode

ICU_MODE_SLEEP 

Sleep Mode

◆ Icu_InputStateType

This type defines a input state of ICU driver.

Enumerator
ICU_ACTIVE 

Module is in active state

ICU_IDLE 

Module is in idle state

◆ Icu_ActivationType

This type defines Activation range.

Enumerator
ICU_RISING_EDGE 

Rising Edge Activation type

ICU_FALLING_EDGE 

Falling Edge Activation type

ICU_BOTH_EDGES 

Both Edge Activation type

◆ Icu_MeasurementModeType

This type defines available measurement modes.

Enumerator
ICU_MODE_SIGNAL_EDGE_DETECT 

Signal Edge Detect Mode

ICU_MODE_SIGNAL_MEASUREMENT 

Signal measurement Mode

ICU_MODE_TIMESTAMP 

Signal Timestamp Mode

ICU_MODE_EDGE_COUNTER 

Signal Edge counter Mode

◆ Icu_SignalMeasurementPropertyType

This type defines Signal Measurement Property range.

Enumerator
ICU_LOW_TIME 

Signal Low time

ICU_HIGH_TIME 

Signal High time

ICU_PERIOD_TIME 

Signal Period time

ICU_DUTY_CYCLE 

Signal Duty Cycle time

◆ Icu_TimestampBufferType

This type defines TimeStamp Property range.

Enumerator
ICU_LINEAR_BUFFER 

Linear Buffer to be used in Timestamp

ICU_CIRCULAR_BUFFER 

Circular Buffer to be used in Timestamp

Function Documentation

◆ Icu_Init()

void Icu_Init ( const Icu_ConfigType * ConfigPtr)

Service for ICU initialization.

*  Service name        : Icu_Init
*  Syntax              : Icu_Init(const Icu_ConfigType* ConfigPtr)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x00
*  Sync/Async          : Synchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : Pointer to the configuration
*  Parameters (out)    : None
*  Return value        : void
*  Description         : Initializes internal variables
*                        and the ECAP unit of the micro controller.
*                        The function can be called on task level.
*  

◆ Icu_DeInit()

void Icu_DeInit ( void )

Service for ICU de-initialization.

*  Service name        : Icu_DeInit
*  Syntax              : Icu_DeInit(void)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x01
*  Sync/Async          : Synchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : None
*  Parameters (out)    : None
*  Return value        : void
*  Description         :  DeInit ECAP module
*  

◆ Icu_SetActivationCondition()

void Icu_SetActivationCondition ( Icu_ChannelType Channel,
Icu_ActivationType Activation )

Service for setting Activation Condition.

*  Service name        : Icu_SetActivationCondition
*  Syntax              : Icu_SetActivationCondition(Icu_ChannelType Channel,
*                                              Icu_ActivationType Activation)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x05
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (in)     : Icu_ActivationType Activation
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service sets the Activation edge for channel
*                          Type of activation (if supported by hardware)
*                          ICU_RISING_EDGE, ICU_FALLING_EDGE, ICU_BOTH_EDGES
*  

◆ Icu_DisableNotification()

void Icu_DisableNotification ( Icu_ChannelType Channel)

Service for disabling notification.

*  Service name        : Icu_DisableNotification
*  Syntax              : Icu_DisableNotification(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x06
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service disables the notificaiton of a channel
*  

◆ Icu_EnableNotification()

void Icu_EnableNotification ( Icu_ChannelType Channel)

Service for enabling notification.

*  Service name        : Icu_EnableNotification
*  Syntax              : Icu_EnableNotification(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x07
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service enables the notificaiton of a channel
*  

◆ Icu_GetInputState()

Icu_InputStateType Icu_GetInputState ( Icu_ChannelType Channel)

Service for getting the ICU input status.

*  Service name        : Icu_GetInputState
*  Syntax              : Icu_GetInputState(Icu_ChannelType Channel)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x08
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service returns the status of the ICU input
*  

◆ Icu_StartTimestamp()

void Icu_StartTimestamp ( Icu_ChannelType Channel,
Icu_ValueType * BufferPtr,
uint16 BufferSize,
uint16 NotifyInterval )

Service for starts the captuing of timer values on the edges.

*  Service name        : Icu_StartTimestamp
*  Syntax              : Icu_StartTimestamp(Icu_ChannelType Channel,
*                                          Icu_ValueType* BufferPtr,
*                                          uint16 BufferSize,
*                                          uint16 NotifyInterval)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x09
*  Sync/Async          : Asynchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (in)     : uint16 BufferSize
*  Parameters (in)     : uint16 NotifyInterval
*  Parameters (out)    : Icu_ValueType* BufferPtr
*  Return value        : void
*  Description         : This service starts the capturing of timer values on the edges
*  

◆ Icu_StopTimestamp()

void Icu_StopTimestamp ( Icu_ChannelType Channel)

Service for stopping the timestamp measurement.

*  Service name        : Icu_StopTimestamp
*  Syntax              : Icu_StopTimestamp(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x0A
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service stops timestamp measurement of the given channel.
*  

◆ Icu_GetTimestampIndex()

Icu_IndexType Icu_GetTimestampIndex ( Icu_ChannelType Channel)

Service for reading the timestamp index of a givem channel.

*  Service name        : Icu_GetTimestampIndex
*  Syntax              : Icu_GetTimestampIndex(Icu_ChannelType Channel)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x0B
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service reads the timestamp index of a given channel.
*  

◆ Icu_ResetEdgeCount()

void Icu_ResetEdgeCount ( Icu_ChannelType Channel)

Service for resets the value of the counted edges to zero.

*  Service name        : Icu_ResetEdgeCount
*  Syntax              : Icu_ResetEdgeCount(Icu_ChannelType Channel)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x0C
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service resets the value of the counted edges to zero.
*  

◆ Icu_EnableEdgeCount()

void Icu_EnableEdgeCount ( Icu_ChannelType Channel)

Service enabling the counting of edges of a given channel.

*  Service name        : Icu_EnableEdgeCount
*  Syntax              : Icu_EnableEdgeCount(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x0D
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service enables the couting of edges of the given channel.
*  

◆ Icu_DisableEdgeCount()

void Icu_DisableEdgeCount ( Icu_ChannelType Channel)

Service for disabling the couting of edges of the given channel.

*  Service name        : Icu_DisableEdgeCount
*  Syntax              : Icu_DisableEdgeCount(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x0E
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service disables the couting of edges of a given channel.
*  

◆ Icu_GetEdgeNumbers()

Icu_EdgeNumberType Icu_GetEdgeNumbers ( Icu_ChannelType Channel)

Service for reading the number of counted edges.

*  Service name        : Icu_GetEdgeNumbers
*  Syntax              : Icu_GetEdgeNumbers(Icu_ChannelType Channel)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x0F
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service reads the number of counted edges.
*  

◆ Icu_EnableEdgeDetection()

void Icu_EnableEdgeDetection ( Icu_ChannelType Channel)

Service for enabling/re-enabling the detection of edges of the given channel.

*  Service name        : Icu_EnableEdgeDetection
*  Syntax              : Icu_EnableEdgeDetection(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x16
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service enables/re-enables the detection of edges of a channel.
*  

◆ Icu_DisableEdgeDetection()

void Icu_DisableEdgeDetection ( Icu_ChannelType Channel)

Service for disabling the detection of edges of the given channel.

*  Service name        : Icu_EnableEdgeDetection
*  Syntax              : Icu_EnableEdgeDetection(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x17
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service disables the detection of edges of a channel.
*  

◆ Icu_StartSignalMeasurement()

void Icu_StartSignalMeasurement ( Icu_ChannelType Channel)

Service for starting the measurement of signals.

*  Service name        : Icu_StartSignalMeasurement
*  Syntax              : Icu_StartSignalMeasurement(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x13
*  Sync/Async          : Asynchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service starts the measurement of signals of a given channel.
*  

◆ Icu_StopSignalMeasurement()

void Icu_StopSignalMeasurement ( Icu_ChannelType Channel)

Service for stopping the measurement of signals.

*  Service name        : Icu_StopSignalMeasurement
*  Syntax              : Icu_StopSignalMeasurement(Icu_ChannelType Channel)
*  Mode                : Supervisor Mode (Privileged Mode)
*  Service ID[hex]     : 0x14
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service stops the measurement of signals of a given channel.
*  

◆ Icu_GetTimeElapsed()

Icu_ValueType Icu_GetTimeElapsed ( Icu_ChannelType Channel)

Service for reading the elasped time for the given channel.

*  Service name        : Icu_GetTimeElapsed
*  Syntax              : Icu_GetTimeElapsed(Icu_ChannelType Channel)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x10
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : None
*  Return value        : void
*  Description         : This service reads elasped time for a given channel.
*  

◆ Icu_GetDutyCycleValues()

void Icu_GetDutyCycleValues ( Icu_ChannelType Channel,
Icu_DutyCycleType * DutyCycleValues )

Service for reading the coherent active time and period time of given channel.

*  Service name        : Icu_GetTimeElapsed
*  Syntax              : Icu_GetTimeElapsed(Icu_ChannelType Channel,
*                                           Icu_DutyCycleType* DutyCycleValues)
*  Mode                : User Mode (Non-Privileged Mode)
*  Service ID[hex]     : 0x11
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant
*  Parameters (in)     : Icu_ChannelType Channel
*  Parameters (out)    : Icu_DutyCycleType* DutyCycleValues
*  Return value        : void
*  Description         : This service reads active time and period of given channel.
*  

◆ Icu_CheckWakeup()

void Icu_CheckWakeup ( EcuM_WakeupSourceType WakeupSource)

This function checks if a wakeup capable ICU channel is the source for a wakeup event and calls the ECU state manager service EcuM_SetWakeupEvent in case of a valid ICU channel wakeup event.

*  Service name        : Icu_CheckWakeup
*  Syntax              : void Icu_CheckWakeup(EcuM_WakeupSourceType WakeupSource)
*  Service ID[hex]     : 0x19
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant(limited according to ICU050)
*  Parameters (in)     : WakeupSource
*                        Informatin on wakeup source to be checked.
                         The associated ICU channel can be determined from configuration data
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : None
*  Description         : Checks if a wakeup capable ICU channel is the source for a wakeup event and 
*                        calls the ECU state manager service EcuM_SetWakeupEvent in case of a valid ICU 
*                        channel wakeup event.
*  

◆ Icu_DisableWakeup()

void Icu_DisableWakeup ( Icu_ChannelType Channel)

This function disables the wakeup capability of a single ICU channel.

*  Service name        : Icu_DisableWakeup
*  Syntax              : void Icu_DisableWakeup(Icu_ChannelType Channel)
*  Service ID[hex]     : 0x20
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant(limited according to ICU050)
*  Parameters (in)     : Channel
*                        Numeric identifier of the ICU channel
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : None
*  Description         : This function disables the wakeup capability of a single ICU channel.
*  

◆ Icu_EnableWakeup()

void Icu_EnableWakeup ( Icu_ChannelType Channel)

This function (re-)enables the wakeup capability of the given ICU channel.

*  Service name        : Icu_EnableWakeup
*  Syntax              : void Icu_EnableWakeup(Icu_ChannelType Channel)
*  Service ID[hex]     : 0x21
*  Sync/Async          : Synchronous
*  Reentrancy          : Reentrant(limited according to ICU050)
*  Parameters (in)     : Channel
*                        Numeric identifier of the ICU channel
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : None
*  Description         : This function (re-)enables the wakeup capability of the given ICU channel.
*  

◆ Icu_SetMode()

void Icu_SetMode ( Icu_ModeType Mode)

This function sets the ICU mode.

*  Service name        : Icu_SetMode
*  Syntax              : void  Icu_SetMode(Icu_ModeType Mode)
*  Service ID[hex]     : 0x22
*  Sync/Async          : Synchronous
*  Reentrancy          : Non Reentrant
*  Parameters (in)     : Mode
*                        ICU_MODE_NORMAL: Normal operation, all used interrupts are enabled 
*                        according to the notification requests.
*                        ICU_MODE_SLEEP: Reduced power mode. In sleep mode only those 
*                        notifications are available which are configured as wakeup capable.
*  Parameters (inout)  : None
*  Parameters (out)    : None
*  Return value        : None
*  Description         : This function sets the ICU mode.
*  

◆ Icu_RegisterReadback()

Std_ReturnType Icu_RegisterReadback ( Icu_ChannelType IcuChannel,
Icu_RegisterReadbackType * RegRbPtr )

◆ Icu_GetTimeStampIndex()

Icu_IndexType Icu_GetTimeStampIndex ( Icu_ChannelType Channel)

◆ Icu_ch1Notify()

void Icu_ch1Notify ( void )

ICU ISR.

ICU Channel 1 ISR

◆ Icu_ch2Notify()

void Icu_ch2Notify ( void )

ICU ISR.

ICU Channel 2 ISR

Variable Documentation

◆ ActiveTime

Icu_ValueType Icu_DutyCycleType::ActiveTime

Active time of Signal

◆ PeriodTime

Icu_ValueType Icu_DutyCycleType::PeriodTime

Period time of Signal

◆ channelId

Icu_ChannelType Icu_ChannelConfigType_PC::channelId

Channel ID of ICU Channel in use

◆ chCfg [1/2]

Channel configurations

◆ defaultStartEdge

Icu_ActivationType Icu_ChannelConfigType::defaultStartEdge

Default activation edge to be used by ICU module

◆ measurementMode

Icu_MeasurementModeType Icu_ChannelConfigType::measurementMode

Measurement Mode to be used

◆ signalMeasurementProperty

Icu_SignalMeasurementPropertyType Icu_ChannelConfigType::signalMeasurementProperty

Signal Measurmenet property to be used if mode choosen

◆ notificationHandler

Icu_NotifyFuncType Icu_ChannelConfigType::notificationHandler

Notification handler for notifications

◆ bufferType

Icu_TimestampBufferType Icu_ChannelConfigType::bufferType

Buffer Type for Timestamp API mode

◆ instanceClkMHz

uint32 Icu_ChannelConfigType::instanceClkMHz

Clk src for ICU module in MHz

◆ prescaler

uint32 Icu_ChannelConfigType::prescaler

Prescaler value to be used for ICU module

◆ icuMaxChannel

Icu_ChannelType Icu_ConfigType::icuMaxChannel

Number of ICU Channel being configured

◆ chCfg [2/2]

Channel configurations

◆ ECAP_CNTPHS

uint32 Icu_RegisterReadbackType::ECAP_CNTPHS

◆ ECAP_ECCTL

uint32 Icu_RegisterReadbackType::ECAP_ECCTL

◆ ECAP_ECINT_EN_FLG

uint32 Icu_RegisterReadbackType::ECAP_ECINT_EN_FLG

◆ Icu_HwUnitBaseAddr [1/2]

const uint32 Icu_HwUnitBaseAddr[ICU_MAX_NUM_CHANNELS]
extern

◆ IcuConfigSet_PC [1/2]

const struct Icu_ConfigType_PC_s IcuConfigSet_PC
extern

ICU Configuration structure declaration.

◆ IcuConfigSet [1/2]

const struct Icu_ConfigType_s IcuConfigSet
extern

◆ Icu_HwUnitBaseAddr [2/2]

const uint32 Icu_HwUnitBaseAddr[ICU_MAX_NUM_CHANNELS]
extern

◆ IcuConfigSet_PC [2/2]

const struct Icu_ConfigType_PC_s IcuConfigSet_PC
extern

ICU Configuration structure declaration.

◆ IcuConfigSet [2/2]

const struct Icu_ConfigType_s IcuConfigSet
extern