Infineon MOTIX™ MCU TLE987x Device Family SDK
Typedefs | Enumerations | Functions
csa.h File Reference

Go to the source code of this file.

Detailed Description

Current Sense Amplifier low level access library.

Version
V0.2.0
Date
02. Jan 2025

Include Graph

Include dependency graph for csa.h:

Typedefs

typedef enum CSA_Gain TCSA_Gain
 

Enumerations

enum  CSA_Gain { CSA_GAIN_10 = 0 , CSA_GAIN_20 = 1 , CSA_GAIN_40 = 2 , CSA_GAIN_60 = 3 }
 

Functions

INLINE void CSA_Power_On (void)
 switches on CSA module. More...
 
INLINE void CSA_Power_Off (void)
 switches off CSA module. More...
 
INLINE void CSA_Gain_Set (uint32 gain)
 Set CSA Gain value. More...
 
INLINE uint32 CSA_Gain_Get ()
 Get CSA Gain value. More...
 
void CSA_Init (void)
 Initializes the CSA module based on the Config Wizard for MOTIX MCU configuration. More...
 
INLINE void CSA_Set_Gain (uint8 gain)
 Set CSA Gain value. More...
 
uint16 CSA_Offset_Get (void)
 measures the CSA offset using ADC1. More...
 

Typedef Documentation

◆ TCSA_Gain

typedef enum CSA_Gain TCSA_Gain

Enumeration Type Documentation

◆ CSA_Gain

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

Function Documentation

◆ CSA_Gain_Get()

INLINE uint32 CSA_Gain_Get ( )

Get CSA Gain value.

Returns
CSA Gain setting

Example

This example reads the CSA Gain value.

void Example_Function(void)
{
uint32 u32_gain;
u32_gain = CSA_Gain_Get();
}
INLINE uint32 CSA_Gain_Get()
Get CSA Gain value.
Definition: csa.h:154
uint32_t uint32
32 bit unsigned value
Definition: types.h:139

◆ CSA_Gain_Set()

INLINE void CSA_Gain_Set ( uint32  gain)

Set CSA Gain value.

Parameters
gainGain setting

Example

This example configures CSA Gain value to 40.

void Example_Function(void)
{
}
INLINE void CSA_Gain_Set(uint32 gain)
Set CSA Gain value.
Definition: csa.h:134

◆ CSA_Init()

void CSA_Init ( void  )

Initializes the CSA module based on the Config Wizard for MOTIX MCU configuration.

◆ CSA_Offset_Get()

uint16 CSA_Offset_Get ( void  )

measures the CSA offset using ADC1.

this measurement must be done with 0A through the shunt

Returns
CSA offset

◆ CSA_Power_Off()

INLINE void CSA_Power_Off ( void  )

switches off CSA module.

Example

This example switches off CSA module.

void Example_Function(void)
{
}
INLINE void CSA_Power_Off(void)
switches off CSA module.
Definition: csa.h:115

◆ CSA_Power_On()

INLINE void CSA_Power_On ( void  )

switches on CSA module.

Example

This example switches on CSA module.

void Example_Function(void)
{
}
INLINE void CSA_Power_On(void)
switches on CSA module.
Definition: csa.h:98

◆ CSA_Set_Gain()

INLINE void CSA_Set_Gain ( uint8  gain)

Set CSA Gain value.

Parameters
gainGain setting

Example

This example configures CSA Gain value to 40.

void Example_Function(void)
{
}
INLINE void CSA_Set_Gain(uint8 gain)
Set CSA Gain value.
Definition: csa.h:193