Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
Typedefs | Enumerations | Functions | Variables
CSACSC_api

Detailed Description

Typedefs

typedef enum CSA_gain tCSA_gain
 
typedef enum CSA_offset tCSA_offset
 

Enumerations

enum  CSA_gain { CSA_gain_10 = 0 , CSA_gain_20 = 1 , CSA_gain_40 = 2 , CSA_gain_60 = 3 }
 This enum lists the CSA gain settings. More...
 
enum  CSA_offset { CSA_offset_10 = 0 , CSA_offset_20 = 1 , CSA_offset_40 = 2 , CSA_offset_60 = 3 }
 This enum lists the CSA offset settings. More...
 

Functions

sint8 CSACSC_init (void)
 Initialize all CW registers of the CSA/CSC module. More...
 
sint8 CSACSC_startCalibration (uint16 *pu16_Val_mV)
 Perform the calibration of the CSA. More...
 
INLINE void CSACSC_enPower (void)
 Enable Current sense amplifier and comparator enable. More...
 
INLINE void CSACSC_disPower (void)
 Disable Current sense amplifier and comparator enable. More...
 
INLINE void CSACSC_setMinGain (tCSA_gain e_gain)
 Set Current sense amplifier minimum gain setting. More...
 
INLINE tCSA_gain CSACSC_getMinGain (void)
 Get Current sense amplifier minimum gain setting. More...
 
INLINE void CSACSC_setMinOffset (tCSA_offset e_offset)
 Set Current sense amplifier minimum output offset setting. More...
 
INLINE tCSA_offset CSACSC_getMinOffset (void)
 Get Current sense amplifier minimum output offset setting. More...
 
INLINE void CSACSC_setMaxThreshold (uint16 u16_value)
 Set Current sense comparator maximum threshold setting. More...
 
INLINE uint16 CSACSC_getMaxThreshold (void)
 Get Current sense comparator maximum threshold setting. More...
 
INLINE void CSACSC_setAddInputOffset (uint8 u8_value)
 Set Additional input offset setting. More...
 
INLINE uint8 CSACSC_getAddInputOffset (void)
 Get Additional input offset setting. More...
 
INLINE void CSACSC_setGain (tCSA_gain e_gain)
 Set Current sense amplifier gain setting. More...
 
INLINE tCSA_gain CSACSC_getGain (void)
 Get Current sense amplifier gain setting. More...
 
INLINE void CSACSC_setOffset (tCSA_offset e_offset)
 Set Current sense amplifier output offset setting. More...
 
INLINE tCSA_offset CSACSC_getOffset (void)
 Get Current sense amplifier output offset setting. More...
 
INLINE void CSACSC_setVout (uint8 u8_value)
 Set Current sense output selection. More...
 
INLINE uint8 CSACSC_getVout (void)
 Get Current sense output selection. More...
 
INLINE void CSACSC_setThreshold (uint8 u8_value)
 Set Current sense comparator threshold setting. More...
 
INLINE uint8 CSACSC_getThreshold (void)
 Get Current sense comparator threshold setting. More...
 
INLINE void CSACSC_setFilterTime (uint8 u8_value)
 Set Filter time for current sense comparator. More...
 
INLINE uint8 CSACSC_getFilterTime (void)
 Get Filter time for current sense comparator. More...
 
INLINE void CSACSC_clrOverCurrIntSts (void)
 Clear Overcurrent event interrupt status clear. More...
 
INLINE void CSACSC_clrParamErrorIntSts (void)
 Clear CSA minimum gain or offset selection error interrupt status clear. More...
 
INLINE void CSACSC_clrOverCurrSts (void)
 Clear Overcurrent event status clear. More...
 
INLINE void CSACSC_enOverCurrInt (void)
 Enable Overcurrent event interrupt enable. More...
 
INLINE void CSACSC_disOverCurrInt (void)
 Disable Overcurrent event interrupt enable. More...
 
INLINE void CSACSC_enParamErrorInt (void)
 Enable CSA minimum gain or offset selection error interrupt enable. More...
 
INLINE void CSACSC_disParamErrorInt (void)
 Disable CSA minimum gain or offset selection error interrupt enable. More...
 
INLINE uint8 CSACSC_getOverCurrIntSts (void)
 Get Overcurrent event interrupt status. More...
 
INLINE uint8 CSACSC_getParamErrorIntSts (void)
 Get CSA minimum gain or offset selection error interrupt status. More...
 
INLINE uint8 CSACSC_getOverCurrSts (void)
 Get Overcurrent event status. More...
 
INLINE uint8 CSACSC_getOverCurrCmpOut (void)
 Get Overcurrent comparator output. More...
 
INLINE uint8 CSACSC_getBistSts (void)
 Get CSC built-in self test status. More...
 
void CSACSC_setOverCurrIntNodePtr (void) __attribute__((deprecated("Do not change this at runtime
 Set Overcurrent Interrupt Node Pointer. More...
 
void CSACSC_setParamErrorIntNodePtr (void) __attribute__((deprecated("Do not change this at runtime
 Set Parameter Error Interrupt Node Pointer. More...
 

Variables

void use the ConfigWizard to configure this feature
 

Typedef Documentation

◆ tCSA_gain

typedef enum CSA_gain tCSA_gain

◆ tCSA_offset

typedef enum CSA_offset tCSA_offset

Enumeration Type Documentation

◆ CSA_gain

enum CSA_gain

This enum lists the CSA gain settings.

Note
You can use this type via 'tCSA_gain' or 'enum CSA_gain'
Enumerator
CSA_gain_10 

Operational amplifier gain factor 10

CSA_gain_20 

Operational amplifier gain factor 20

CSA_gain_40 

Operational amplifier gain factor 40

CSA_gain_60 

Operational amplifier gain factor 60

◆ CSA_offset

enum CSA_offset

This enum lists the CSA offset settings.

Note
You can use this type via 'tCSA_offset' or 'enum CSA_offset'
Enumerator
CSA_offset_10 

Operational amplifier offset factor 0.5V

CSA_offset_20 

Operational amplifier offset factor 1.0V

CSA_offset_40 

Operational amplifier offset factor 1.5V

CSA_offset_60 

Operational amplifier offset factor 2.0V

Function Documentation

◆ CSACSC_clrOverCurrIntSts()

INLINE void CSACSC_clrOverCurrIntSts ( void  )

Clear Overcurrent event interrupt status clear.

◆ CSACSC_clrOverCurrSts()

INLINE void CSACSC_clrOverCurrSts ( void  )

Clear Overcurrent event status clear.

◆ CSACSC_clrParamErrorIntSts()

INLINE void CSACSC_clrParamErrorIntSts ( void  )

Clear CSA minimum gain or offset selection error interrupt status clear.

◆ CSACSC_disOverCurrInt()

INLINE void CSACSC_disOverCurrInt ( void  )

Disable Overcurrent event interrupt enable.

◆ CSACSC_disParamErrorInt()

INLINE void CSACSC_disParamErrorInt ( void  )

Disable CSA minimum gain or offset selection error interrupt enable.

◆ CSACSC_disPower()

INLINE void CSACSC_disPower ( void  )

Disable Current sense amplifier and comparator enable.

◆ CSACSC_enOverCurrInt()

INLINE void CSACSC_enOverCurrInt ( void  )

Enable Overcurrent event interrupt enable.

◆ CSACSC_enParamErrorInt()

INLINE void CSACSC_enParamErrorInt ( void  )

Enable CSA minimum gain or offset selection error interrupt enable.

◆ CSACSC_enPower()

INLINE void CSACSC_enPower ( void  )

Enable Current sense amplifier and comparator enable.

◆ CSACSC_getAddInputOffset()

INLINE uint8 CSACSC_getAddInputOffset ( void  )

Get Additional input offset setting.

Returns
uint8 Additional input offset setting

◆ CSACSC_getBistSts()

INLINE uint8 CSACSC_getBistSts ( void  )

Get CSC built-in self test status.

Returns
uint8 CSC built-in self test status

◆ CSACSC_getFilterTime()

INLINE uint8 CSACSC_getFilterTime ( void  )

Get Filter time for current sense comparator.

Returns
uint8 Filter time for current sense comparator

◆ CSACSC_getGain()

INLINE tCSA_gain CSACSC_getGain ( void  )

Get Current sense amplifier gain setting.

Returns
tCSA_gain Current sense amplifier gain setting

◆ CSACSC_getMaxThreshold()

INLINE uint16 CSACSC_getMaxThreshold ( void  )

Get Current sense comparator maximum threshold setting.

Returns
uint16 Current sense comparator maximum threshold setting

◆ CSACSC_getMinGain()

INLINE tCSA_gain CSACSC_getMinGain ( void  )

Get Current sense amplifier minimum gain setting.

Returns
tCSA_gain Current sense amplifier minimum gain setting

◆ CSACSC_getMinOffset()

INLINE tCSA_offset CSACSC_getMinOffset ( void  )

Get Current sense amplifier minimum output offset setting.

Returns
tCSA_offset Current sense amplifier minimum output offset setting

◆ CSACSC_getOffset()

INLINE tCSA_offset CSACSC_getOffset ( void  )

Get Current sense amplifier output offset setting.

Returns
tCSA_offset Current sense amplifier output offset setting

◆ CSACSC_getOverCurrCmpOut()

INLINE uint8 CSACSC_getOverCurrCmpOut ( void  )

Get Overcurrent comparator output.

Returns
uint8 Overcurrent comparator output

◆ CSACSC_getOverCurrIntSts()

INLINE uint8 CSACSC_getOverCurrIntSts ( void  )

Get Overcurrent event interrupt status.

Returns
uint8 Overcurrent event interrupt status

◆ CSACSC_getOverCurrSts()

INLINE uint8 CSACSC_getOverCurrSts ( void  )

Get Overcurrent event status.

Returns
uint8 Overcurrent event status

◆ CSACSC_getParamErrorIntSts()

INLINE uint8 CSACSC_getParamErrorIntSts ( void  )

Get CSA minimum gain or offset selection error interrupt status.

Returns
uint8 CSA minimum gain or offset selection error interrupt status

◆ CSACSC_getThreshold()

INLINE uint8 CSACSC_getThreshold ( void  )

Get Current sense comparator threshold setting.

Returns
uint8 Current sense comparator threshold setting

◆ CSACSC_getVout()

INLINE uint8 CSACSC_getVout ( void  )

Get Current sense output selection.

Returns
uint8 Current sense output selection

◆ CSACSC_init()

sint8 CSACSC_init ( void  )

Initialize all CW registers of the CSA/CSC module.

Returns
sint8 0: success, <0: error codes

◆ CSACSC_setAddInputOffset()

INLINE void CSACSC_setAddInputOffset ( uint8  u8_value)

Set Additional input offset setting.

Parameters
u8_valueAdditional input offset setting

◆ CSACSC_setFilterTime()

INLINE void CSACSC_setFilterTime ( uint8  u8_value)

Set Filter time for current sense comparator.

Parameters
u8_valueFilter time for current sense comparator

◆ CSACSC_setGain()

INLINE void CSACSC_setGain ( tCSA_gain  e_gain)

Set Current sense amplifier gain setting.

Parameters
e_gainCurrent sense amplifier gain setting

◆ CSACSC_setMaxThreshold()

INLINE void CSACSC_setMaxThreshold ( uint16  u16_value)

Set Current sense comparator maximum threshold setting.

Parameters
u16_valueCurrent sense comparator maximum threshold setting

◆ CSACSC_setMinGain()

INLINE void CSACSC_setMinGain ( tCSA_gain  e_gain)

Set Current sense amplifier minimum gain setting.

Parameters
e_gainCurrent sense amplifier minimum gain setting

◆ CSACSC_setMinOffset()

INLINE void CSACSC_setMinOffset ( tCSA_offset  e_offset)

Set Current sense amplifier minimum output offset setting.

Parameters
e_offsetCurrent sense amplifier minimum output offset setting

◆ CSACSC_setOffset()

INLINE void CSACSC_setOffset ( tCSA_offset  e_offset)

Set Current sense amplifier output offset setting.

Parameters
e_offsetCurrent sense amplifier output offset setting

◆ CSACSC_setOverCurrIntNodePtr()

void CSACSC_setOverCurrIntNodePtr ( void  )

Set Overcurrent Interrupt Node Pointer.

Warning
Do not change this at runtime, use the ConfigWizard to configure this feature!

◆ CSACSC_setParamErrorIntNodePtr()

void CSACSC_setParamErrorIntNodePtr ( void  )

Set Parameter Error Interrupt Node Pointer.

Warning
Do not change this at runtime, use the ConfigWizard to configure this feature!

◆ CSACSC_setThreshold()

INLINE void CSACSC_setThreshold ( uint8  u8_value)

Set Current sense comparator threshold setting.

Parameters
u8_valueCurrent sense comparator threshold setting

◆ CSACSC_setVout()

INLINE void CSACSC_setVout ( uint8  u8_value)

Set Current sense output selection.

Parameters
u8_valueCurrent sense output selection

◆ CSACSC_startCalibration()

sint8 CSACSC_startCalibration ( uint16 u16p_Val_mV)

Perform the calibration of the CSA.

For this purpose the channel 19 / sequence 3 are reconfigured to perform a CSA measurement.

The ADC1 configuration will be restored after the measurement is done.

Note
Ensure that no current (0A) is flowing through the shunt for the calibration step.
Parameters
u16p_Val_mVpointer to the ADC1 result value
Returns
sint8 0: success, <0: error codes

Variable Documentation

◆ feature

void use the ConfigWizard to configure this feature