![]() |
TLE986x Device Family SDK
|
Go to the source code of this file.
ADC1 low level access library.
Data Structures | |
union | TADC1_ANON_U |
Macros | |
#define | ADC1_VDH_Attenuator_Range_0_30V (1u) |
ADC1 VDH Attenuator Selection, 0V..30V. More... | |
#define | ADC1_VDH_Attenuator_Range_0_20V (0u) |
ADC1 VDH Attenuator Selection, 0V..20V. More... | |
#define | SW_MODE 0u |
ADC1 Mode Selection, Software Mode. More... | |
#define | SEQ_MODE 1u |
Mode Selection, Sequencer Mode. More... | |
#define | SKIP 0u |
ADC1 Sequencer Configuration, skip channel measurement. More... | |
#define | MEAS 1u |
Sequencer Configuration, perform channel measurement. More... | |
#define | BIT10 0u |
ADC1 conversion data width selection, 10 bit conversion. More... | |
#define | BIT8 1u |
ADC1 conversion data width selection, 8 bit conversion. More... | |
#define | INTDIS 0u |
ADC1 Interrupt, Disable. More... | |
#define | INTEN 1u |
ADC1 Interrupt, Enable. More... | |
#define | OVERWRITE 0u |
ADC1 Result Register, Overwrite Mode. More... | |
#define | WFR 1u |
ADC1 Result Register, Wait For Read Mode. More... | |
#define | ADC1_CH0 (0) |
ADC1 channel selection macro, channel 0 - P2.0. More... | |
#define | ADC1_CH1 (1) |
ADC1 channel selection macro, channel 1 - Current Sense Amplifier. More... | |
#define | ADC1_CH2 (2) |
ADC1 channel selection macro, channel 2 - P2.2. More... | |
#define | ADC1_CH3 (3) |
ADC1 channel selection macro, channel 3 - P2.3. More... | |
#define | ADC1_CH4 (4) |
ADC1 channel selection macro, channel 4 - P2.4. More... | |
#define | ADC1_CH5 (5) |
ADC1 channel selection macro, channel 5 - P2.5. More... | |
#define | ADC1_CH6 (6) |
ADC1 channel selection macro, channel 6 - P2.6. More... | |
#define | ADC1_EIM (8) |
ADC1 channel selection macro, Exceptional Interrupt Measurement - EIM. More... | |
#define | ADC1_P20 ADC1_CH0 |
ADC1 channel selection macro, channel 0 - P2.0. More... | |
#define | ADC1_CSA ADC1_CH1 |
ADC1 channel selection macro, channel 1 - Current Sense Amplifier. More... | |
#define | ADC1_P22 ADC1_CH2 |
ADC1 channel selection macro, channel 2 - P2.2. More... | |
#define | ADC1_P23 ADC1_CH3 |
ADC1 channel selection macro, channel 3 - P2.3. More... | |
#define | ADC1_P24 ADC1_CH4 |
ADC1 channel selection macro, channel 4 - P2.4. More... | |
#define | ADC1_P25 ADC1_CH5 |
ADC1 channel selection macro, channel 5 - P2.5. More... | |
#define | ADC1_VDH ADC1_CH6 |
ADC1 channel selection macro, channel 6 - P2.6. More... | |
#define | ADC1_MASK_CH0 ((uint32)1u << ADC1_CH0) |
ADC1 Sequencer/ESM channel selection macro, channel 0 - P2.0. More... | |
#define | ADC1_MASK_CH1 ((uint32)1u << ADC1_CH1) |
ADC1 Sequencer/ESM channel selection macro, channel 1 - CSA. More... | |
#define | ADC1_MASK_CH2 ((uint32)1u << ADC1_CH2) |
ADC1 Sequencer/ESM channel selection macro, channel 2 - P2.2. More... | |
#define | ADC1_MASK_CH3 ((uint32)1u << ADC1_CH3) |
ADC1 Sequencer/ESM channel selection macro, channel 3 - P2.3. More... | |
#define | ADC1_MASK_CH4 ((uint32)1u << ADC1_CH4) |
ADC1 Sequencer/ESM channel selection macro, channel 4 - P2.4. More... | |
#define | ADC1_MASK_CH5 ((uint32)1u << ADC1_CH5) |
ADC1 Sequencer/ESM channel selection macro, channel 5 - P2.5. More... | |
#define | ADC1_MASK_CH6 ((uint32)1u << ADC1_CH6) |
ADC1 Sequencer/ESM channel selection macro, channel 6 - P2.6. More... | |
#define | ADC1_MASK_P20 (ADC1_MASK_CH0) |
ADC1 Sequencer/ESM channel selection macro, channel 0 - P2.0. More... | |
#define | ADC1_MASK_CSA (ADC1_MASK_CH1) |
ADC1 Sequencer/ESM channel selection macro, channel 1 - CSA. More... | |
#define | ADC1_MASK_P22 (ADC1_MASK_CH2) |
ADC1 Sequencer/ESM channel selection macro, channel 2 - P2.2. More... | |
#define | ADC1_MASK_P23 (ADC1_MASK_CH3) |
ADC1 Sequencer/ESM channel selection macro, channel 3 - P2.3. More... | |
#define | ADC1_MASK_P24 (ADC1_MASK_CH4) |
ADC1 Sequencer/ESM channel selection macro, channel 4 - P2.4. More... | |
#define | ADC1_MASK_P25 (ADC1_MASK_CH5) |
ADC1 Sequencer/ESM channel selection macro, channel 5 - P2.5. More... | |
#define | ADC1_MASK_VDH (ADC1_MASK_CH6) |
ADC1 Sequencer/ESM channel selection macro, channel 6 - P2.6. More... | |
#define | ADC1_VREF_5000mV 5000u |
ADC1 reference voltage 5.0V. More... | |
#define | ADC1_VREF_22000mV 22000u |
ADC1 virtual reference voltage 22.0V for VDH Attenuator Range 0-22V. More... | |
#define | ADC1_VREF_30000mV 30000u |
ADC1 virtual reference voltage 30.0V for VDH Attenuator Range 0-30V. More... | |
Enumerations | |
enum | TADC1_ANON { ADC1_ANON_OFF = 0, ADC1_ANON_S_STANDBY = 1, ADC1_ANON_F_STANDBY = 2, ADC1_ANON_NORMAL = 3 } |
This enum lists the options for the Analog Module. More... | |
enum | TADC1_TRIGG_SEL { ADC1_Trigg_None = 0, ADC1_Trigg_CCU6_Ch3 = 1, ADC1_Trigg_GPT12E_T6 = 2, ADC1_Trigg_GPT12E_T3 = 3, ADC1_Trigg_Timer2 = 4, ADC1_Trigg_Timer21 = 5, ADC1_Trigg_Timer3 = 6 } |
This enum lists the options for the trigger select for EIM and ESM. More... | |
enum | TADC1_EIM_REP_CNT { ADC1_1_Meas = 0, ADC1_2_Meas = 1, ADC1_4_Meas = 2, ADC1_8_Meas = 3, ADC1_16_Meas = 4, ADC1_32_Meas = 5, ADC1_64_Meas = 6, ADC1_128_Meas = 7 } |
This enum lists the options for the EIM repeat count setting. More... | |
Functions | |
void | ADC1_Init (void) |
Initializes the ADC1 based on the IFXConfigWizard configuration. More... | |
bool | VAREF_Enable (void) |
Re-enables the internal VAREF LDO in case it was shutdown due to a previous failure. More... | |
bool | ADC1_GetChResult (uint16 *pVar, uint8 channel) |
Get the 10-bit/8-bit value of the ADC1 Result Register of the selected ADC1 channel and returns the validity info. More... | |
bool | ADC1_GetChResult_mV (uint16 *pVar_mV, uint8 channel) |
Get the value of the ADC1 Result Register of the selected ADC1 channel in Millivolt (mV) and returns the validity info. More... | |
bool | ADC1_GetEIMResult (uint16 *pVar) |
Get the 10-bit/8-bit value of the ADC1 EIM Result Register and returns the validity info. More... | |
bool | ADC1_GetEIMResult_mV (uint16 *pVar_mV) |
Get the value of the ADC1 EIM Result Register in Millivolt (mV) and returns the validity info. More... | |
INLINE void | ADC1_SetEIMChannel (uint8 channel) |
Set(Change) ADC1 EIM channel. More... | |
INLINE void | ADC1_SetSwMode_Channel (uint8 channel) |
Selects a channel for the software conversion. More... | |
INLINE void | ADC1_SetMode (uint8 mode) |
Start ADC1 conversion mode selection. More... | |
INLINE void | ADC1_SetSocSwMode (uint8 Ch) |
Starts ADC1 software mode conversion. More... | |
INLINE bool | ADC1_GetEocSwMode (void) |
Get ADC1 end of conversion status. More... | |
INLINE bool | ADC1_GetSwModeResult (uint16 *pVar) |
Get ADC1 latest software mode result. More... | |
INLINE bool | ADC1_GetSwModeResult_mV (uint16 *pVar_mV) |
Get ADC1 software mode result in Millivolt. More... | |
INLINE bool | ADC1_Busy (void) |
Reads the overall status of the ADC1. More... | |
INLINE void | ADC1_EIM_Trigger_Select (TADC1_TRIGG_SEL trigsel) |
Get ADC1 EIM Trigger Selection. More... | |
INLINE void | ADC1_EIM_Repeat_Counter_Set (TADC1_EIM_REP_CNT repcnt) |
Set ADC1 EIM Repeat Counter. More... | |
INLINE void | ADC1_ESM_Trigger_Select (TADC1_TRIGG_SEL trigsel) |
Set ADC1 ESM Trigger Selection. More... | |
INLINE bool | ADC1_isEndOfConversion (void) |
checks EndOfConversion ready (Software Mode) More... | |
INLINE bool | ADC1_isEIMactive (void) |
checks Exceptional Interrupt Mode active More... | |
INLINE bool | ADC1_isESMactive (void) |
checks Exceptional Sequencer Mode active More... | |
INLINE TADC1_ANON | ADC1_ANON_Sts (void) |
Reads the Analog Part Switched On Mode status. More... | |
INLINE void | ADC1_Power_On (void) |
Enables the ADC1 module. More... | |
INLINE void | ADC1_Power_Off (void) |
Disables the ADC1 module. More... | |
INLINE void | ADC1_SOC_Set (void) |
ADC1 Start of Conversion, for Software mode only. More... | |
INLINE void | ADC1_SW_Ch_Sel (uint32 a) |
Selects a channel for the software conversion. More... | |
INLINE void | ADC1_DIVA_Set (uint32 a) |
ADC1 analog clock divider. \(f_{ADC1} = \frac{f_{SYS}}{DIVA}\). More... | |
INLINE void | ADC1_ANON_Set (uint32 a) |
ADC1 set the Analog Module Mode. More... | |
INLINE void | ADC1_Sequencer_Mode_Sel (void) |
ADC1 selects the Sequencer Mode. More... | |
INLINE void | ADC1_Software_Mode_Sel (void) |
ADC1 selects the Software Mode, measurements are performed on user request. More... | |
INLINE uint8 | ADC1_EOC_Sts (void) |
Reads the End-of-Conversion status. More... | |
INLINE uint8 | ADC1_Current_Ch_Sts (void) |
Reads the channel for currently ongoing conversion, if no conversion is ongoing, then it returns the channel of the last conversion. More... | |
INLINE uint8 | ADC1_Sample_Sts (void) |
Reads the sample status of a ongoing measurement. More... | |
INLINE uint8 | ADC1_Busy_Sts (void) |
Reads the overall status of the ADC1. More... | |
INLINE uint8 | ADC1_EIM_Active_Sts (void) |
Reads the active status of the Exceptional Interrupt Measurement (EIM). More... | |
INLINE uint8 | ADC1_ESM_Active_Sts (void) |
Reads the active status of the Exceptional Sequencer Measurement (ESM). More... | |
INLINE uint8 | ADC1_Current_Active_Sequence_Sts (void) |
Reads the currently active channel in Sequencer Mode. More... | |
INLINE uint8 | ADC1_Current_Active_Channel_Sts (void) |
Reads the currently active channel. More... | |
INLINE void | ADC1_Sequence0_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 0, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE void | ADC1_Sequence1_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 1, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE void | ADC1_Sequence2_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 2, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE void | ADC1_Sequence3_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 3, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE void | ADC1_Sequence4_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 4, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE void | ADC1_Sequence5_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 5, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE void | ADC1_Sequence6_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 6, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE void | ADC1_Sequence7_Set (uint32 mask_ch) |
Defines the channels to be measured in Sequence 7, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel. More... | |
INLINE uint16 | ADC1_Ch0_Result_Get (void) |
Reads the converted value from the channel 0 result register. More... | |
INLINE uint16 | ADC1_Ch1_Result_Get (void) |
Reads the converted value from the channel 1 result register. More... | |
INLINE uint16 | ADC1_Ch2_Result_Get (void) |
Reads the converted value from the channel 2 result register. More... | |
INLINE uint16 | ADC1_Ch3_Result_Get (void) |
Reads the converted value from the channel 3 result register. More... | |
INLINE uint16 | ADC1_Ch4_Result_Get (void) |
Reads the converted value from the channel 4 result register. More... | |
INLINE uint16 | ADC1_Ch5_Result_Get (void) |
Reads the converted value from the channel 5 result register. More... | |
INLINE uint16 | ADC1_Ch6_Result_Get (void) |
Reads the converted value from the channel 6 (VDH) result register. More... | |
INLINE uint16 | ADC1_EIM_Result_Get (void) |
Reads the converted value from the EIM result register. More... | |
INLINE uint16 | ADC1_P20_Result_Get (void) |
Reads the converted value from the channel 0 result register. More... | |
INLINE uint16 | ADC1_CSA_Result_Get (void) |
Reads the converted value from the channel 1 result register. More... | |
INLINE uint16 | ADC1_P22_Result_Get (void) |
Reads the converted value from the channel 2 result register. More... | |
INLINE uint16 | ADC1_P23_Result_Get (void) |
Reads the converted value from the channel 3 result register. More... | |
INLINE uint16 | ADC1_P24_Result_Get (void) |
Reads the converted value from the channel 4 result register. More... | |
INLINE uint16 | ADC1_P25_Result_Get (void) |
Reads the converted value from the channel 5 result register. More... | |
INLINE uint16 | ADC1_VDH_Result_Get (void) |
Reads the converted value from the channel 6 (VDH) result register. More... | |
INLINE uint8 | ADC1_Ch0_ResultValid_Get (void) |
Reads the valid flag for the channel 0 (P2.0) result. More... | |
INLINE uint8 | ADC1_Ch1_ResultValid_Get (void) |
Reads the valid flag for the channel 1 (CSA) result. More... | |
INLINE uint8 | ADC1_Ch2_ResultValid_Get (void) |
Reads the valid flag for the channel 2 (P2.2) result. More... | |
INLINE uint8 | ADC1_Ch3_ResultValid_Get (void) |
Reads the valid flag for the channel 3 (P2.3) result. More... | |
INLINE uint8 | ADC1_Ch4_ResultValid_Get (void) |
Reads the valid flag for the channel 4 (P2.4) result. More... | |
INLINE uint8 | ADC1_Ch5_ResultValid_Get (void) |
Reads the valid flag for the channel 5 (P2.5) result. More... | |
INLINE uint8 | ADC1_Ch6_ResultValid_Get (void) |
Reads the valid flag for the channel 6 (VDH) result. More... | |
INLINE uint8 | ADC1_EIM_ResultValid_Get (void) |
Reads the valid flag for the channel 6 (VDH) result. More... | |
INLINE void | ADC1_Ch0_DataWidth_8bit_Set (void) |
Sets the ADC1 channel 0 conversion data width to 8-bit. More... | |
INLINE void | ADC1_Ch0_DataWidth_10bit_Set (void) |
Sets the ADC1 channel 0 conversion data width to 10-bit. More... | |
INLINE void | ADC1_Ch1_DataWidth_8bit_Set (void) |
Sets the ADC1 channel 1 conversion data width to 8-bit. More... | |
INLINE void | ADC1_Ch1_DataWidth_10bit_Set (void) |
Sets the ADC1 channel 1 conversion data width to 10-bit. More... | |
INLINE void | ADC1_Ch2_DataWidth_8bit_Set (void) |
Sets the ADC1 channel 2 conversion data width to 8-bit. More... | |
INLINE void | ADC1_Ch2_DataWidth_10bit_Set (void) |
Sets the ADC1 channel 2 conversion data width to 10-bit. More... | |
INLINE void | ADC1_Ch3_DataWidth_8bit_Set (void) |
Sets the ADC1 channel 3 conversion data width to 8-bit. More... | |
INLINE void | ADC1_Ch3_DataWidth_10bit_Set (void) |
Sets the ADC1 channel 3 conversion data width to 10-bit. More... | |
INLINE void | ADC1_Ch4_DataWidth_8bit_Set (void) |
Sets the ADC1 channel 4 conversion data width to 8-bit. More... | |
INLINE void | ADC1_Ch4_DataWidth_10bit_Set (void) |
Sets the ADC1 channel 4 conversion data width to 10-bit. More... | |
INLINE void | ADC1_Ch5_DataWidth_8bit_Set (void) |
Sets the ADC1 channel 5 conversion data width to 8-bit. More... | |
INLINE void | ADC1_Ch5_DataWidth_10bit_Set (void) |
Sets the ADC1 channel 5 conversion data width to 10-bit. More... | |
INLINE void | ADC1_Ch6_DataWidth_8bit_Set (void) |
Sets the ADC1 channel 6 conversion data width to 8-bit. More... | |
INLINE void | ADC1_Ch6_DataWidth_10bit_Set (void) |
Sets the ADC1 channel 6 conversion data width to 10-bit. More... | |
INLINE void | ADC1_Ch0_Sample_Time_Set (uint32 stc) |
Sets the ADC1 channel 0 number of sampling ticks. More... | |
INLINE void | ADC1_Ch1_Sample_Time_Set (uint32 stc) |
Sets the ADC1 channel 1 number of sampling ticks. More... | |
INLINE void | ADC1_Ch2_Sample_Time_Set (uint32 stc) |
Sets the ADC1 channel 2 number of sampling ticks. More... | |
INLINE void | ADC1_Ch3_Sample_Time_Set (uint32 stc) |
Sets the ADC1 channel 3 number of sampling ticks. More... | |
INLINE void | ADC1_Ch4_Sample_Time_Set (uint32 stc) |
Sets the ADC1 channel 4 number of sampling ticks. More... | |
INLINE void | ADC1_Ch5_Sample_Time_Set (uint32 stc) |
Sets the ADC1 channel 5 number of sampling ticks. More... | |
INLINE void | ADC1_Ch6_Sample_Time_Set (uint32 stc) |
Sets the ADC1 channel 6 number of sampling ticks. More... | |
INLINE void | ADC1_Ch0_WaitForRead_Set (void) |
Sets the ADC1 channel 0 result register to "wait for read". More... | |
INLINE void | ADC1_Ch0_Overwrite_Set (void) |
Sets the ADC1 channel 0 result register to "overwrite". More... | |
INLINE void | ADC1_Ch1_WaitForRead_Set (void) |
Sets ADC1 channel 1 the result register to "wait for read". More... | |
INLINE void | ADC1_Ch1_Overwrite_Set (void) |
Sets the ADC1 channel 1 result register to "overwrite". More... | |
INLINE void | ADC1_Ch2_WaitForRead_Set (void) |
Sets the ADC1 channel 2 result register to "wait for read". More... | |
INLINE void | ADC1_Ch2_Overwrite_Set (void) |
Sets the ADC1 channel 2 result register to "overwrite". More... | |
INLINE void | ADC1_Ch3_WaitForRead_Set (void) |
Sets the ADC1 channel 3 result register to "wait for read". More... | |
INLINE void | ADC1_Ch3_Overwrite_Set (void) |
Sets the ADC1 channel 3 result register to "overwrite". More... | |
INLINE void | ADC1_Ch4_WaitForRead_Set (void) |
Sets the ADC1 channel 4 result register to "wait for read". More... | |
INLINE void | ADC1_Ch4_Overwrite_Set (void) |
Sets the ADC1 channel 4 result register to "overwrite". More... | |
INLINE void | ADC1_Ch5_WaitForRead_Set (void) |
Sets the ADC1 channel 5 result register to "wait for read". More... | |
INLINE void | ADC1_Ch5_Overwrite_Set (void) |
Sets the ADC1 channel 5 result register to "overwrite". More... | |
INLINE void | ADC1_Ch6_WaitForRead_Set (void) |
Sets the ADC1 channel 6 result register to "wait for read". More... | |
INLINE void | ADC1_Ch6_Overwrite_Set (void) |
Sets the ADC1 channel 6 result register to "overwrite". More... | |
INLINE void | ADC1_EIM_Channel_Set (uint32 ch) |
Set EIM channel for measurement. More... | |
INLINE void | ADC1_ESM_Channel_Set (uint32 mask_ch) |
Set channels in ESM sequence. More... | |
INLINE void | ADC1_VDH_Attenuator_On (void) |
Enables the input attenuator for VDH. More... | |
INLINE void | ADC1_VDH_Attenuator_Off (void) |
Disables the input attenuator for VDH. More... | |
INLINE void | ADC1_VDH_Attenuator_Zhigh_Set (void) |
Enables the output attenuator for VDH. More... | |
INLINE void | ADC1_VDH_Attenuator_Zlow_Set (void) |
Disables the output attenuator for VDH. More... | |
INLINE void | ADC1_Ch0_Int_Clr (void) |
clears ADC1 Channel 0 Interrupt flag. More... | |
INLINE void | ADC1_Ch1_Int_Clr (void) |
clears ADC1 Channel 1 Interrupt flag. More... | |
INLINE void | ADC1_Ch2_Int_Clr (void) |
clears ADC1 Channel 2 Interrupt flag. More... | |
INLINE void | ADC1_Ch3_Int_Clr (void) |
clears ADC1 Channel 3 Interrupt flag. More... | |
INLINE void | ADC1_Ch4_Int_Clr (void) |
clears ADC1 Channel 4 Interrupt flag. More... | |
INLINE void | ADC1_Ch5_Int_Clr (void) |
clears ADC1 Channel 5 Interrupt flag. More... | |
INLINE void | ADC1_Ch6_Int_Clr (void) |
clears ADC1 Channel 6 Interrupt flag. More... | |
INLINE void | ADC1_EIM_Int_Clr (void) |
clears Exceptional Interrupt Measurement (EIM) flag. More... | |
INLINE void | ADC1_ESM_Int_Clr (void) |
clears Exceptional Sequence Measurement (ESM) flag. More... | |
INLINE void | ADC1_Ch0_Int_En (void) |
enables ADC1 Channel 0 Interrupt. More... | |
INLINE void | ADC1_Ch0_Int_Dis (void) |
disables ADC1 Channel 0 Interrupt. More... | |
INLINE void | ADC1_Ch1_Int_En (void) |
enables ADC1 Channel 1 Interrupt. More... | |
INLINE void | ADC1_Ch1_Int_Dis (void) |
disables ADC1 Channel 1 Interrupt. More... | |
INLINE void | ADC1_Ch2_Int_En (void) |
enables ADC1 Channel 2 Interrupt. More... | |
INLINE void | ADC1_Ch2_Int_Dis (void) |
disables ADC1 Channel 2 Interrupt. More... | |
INLINE void | ADC1_Ch3_Int_En (void) |
enables ADC1 Channel 3 Interrupt. More... | |
INLINE void | ADC1_Ch3_Int_Dis (void) |
disables ADC1 Channel 3 Interrupt. More... | |
INLINE void | ADC1_Ch4_Int_En (void) |
enables ADC1 Channel 4 Interrupt. More... | |
INLINE void | ADC1_Ch4_Int_Dis (void) |
disables ADC1 Channel 4 Interrupt. More... | |
INLINE void | ADC1_Ch5_Int_En (void) |
enables ADC1 Channel 5 Interrupt. More... | |
INLINE void | ADC1_Ch5_Int_Dis (void) |
disables ADC1 Channel 5 Interrupt. More... | |
INLINE void | ADC1_Ch6_Int_En (void) |
enables ADC1 Channel 6 Interrupt. More... | |
INLINE void | ADC1_Ch6_Int_Dis (void) |
disables ADC1 Channel 6 Interrupt. More... | |
INLINE void | ADC1_EIM_Int_En (void) |
enables Exceptional Interrupt Measurement (EIM). More... | |
INLINE void | ADC1_EIM_Int_Dis (void) |
disables Exceptional Interrupt Measurement (EIM). More... | |
INLINE void | ADC1_ESM_Int_En (void) |
enables Exceptional Sequence Measurement (ESM). More... | |
INLINE void | ADC1_ESM_Int_Dis (void) |
disables Exceptional Sequence Measurement (ESM). More... | |
INLINE void | ADC1_VDH_Attenuator_Range_0_30V_Set (void) |
sets the VDH Monitoring Input Attenuator Input Range to 0 - 30V. More... | |
INLINE void | ADC1_VDH_Attenuator_Range_0_20V_Set (void) |
sets the VDH Monitoring Input Attenuator Input Range to 0 - 22V. More... | |
INLINE uint8 | ADC1_VDH_Attenuator_Range_Get (void) |
Reads the VDH Monitoring Input Attenuator Input Range Configuration. More... | |
#define ADC1_CH0 (0) |
ADC1 channel selection macro, channel 0 - P2.0.
#define ADC1_CH1 (1) |
ADC1 channel selection macro, channel 1 - Current Sense Amplifier.
#define ADC1_CH2 (2) |
ADC1 channel selection macro, channel 2 - P2.2.
#define ADC1_CH3 (3) |
ADC1 channel selection macro, channel 3 - P2.3.
#define ADC1_CH4 (4) |
ADC1 channel selection macro, channel 4 - P2.4.
#define ADC1_CH5 (5) |
ADC1 channel selection macro, channel 5 - P2.5.
#define ADC1_CH6 (6) |
ADC1 channel selection macro, channel 6 - P2.6.
#define ADC1_CSA ADC1_CH1 |
ADC1 channel selection macro, channel 1 - Current Sense Amplifier.
#define ADC1_EIM (8) |
ADC1 channel selection macro, Exceptional Interrupt Measurement - EIM.
ADC1 Sequencer/ESM channel selection macro, channel 0 - P2.0.
ADC1 Sequencer/ESM channel selection macro, channel 1 - CSA.
ADC1 Sequencer/ESM channel selection macro, channel 2 - P2.2.
ADC1 Sequencer/ESM channel selection macro, channel 3 - P2.3.
ADC1 Sequencer/ESM channel selection macro, channel 4 - P2.4.
ADC1 Sequencer/ESM channel selection macro, channel 5 - P2.5.
ADC1 Sequencer/ESM channel selection macro, channel 6 - P2.6.
#define ADC1_MASK_CSA (ADC1_MASK_CH1) |
ADC1 Sequencer/ESM channel selection macro, channel 1 - CSA.
#define ADC1_MASK_P20 (ADC1_MASK_CH0) |
ADC1 Sequencer/ESM channel selection macro, channel 0 - P2.0.
#define ADC1_MASK_P22 (ADC1_MASK_CH2) |
ADC1 Sequencer/ESM channel selection macro, channel 2 - P2.2.
#define ADC1_MASK_P23 (ADC1_MASK_CH3) |
ADC1 Sequencer/ESM channel selection macro, channel 3 - P2.3.
#define ADC1_MASK_P24 (ADC1_MASK_CH4) |
ADC1 Sequencer/ESM channel selection macro, channel 4 - P2.4.
#define ADC1_MASK_P25 (ADC1_MASK_CH5) |
ADC1 Sequencer/ESM channel selection macro, channel 5 - P2.5.
#define ADC1_MASK_VDH (ADC1_MASK_CH6) |
ADC1 Sequencer/ESM channel selection macro, channel 6 - P2.6.
#define ADC1_P20 ADC1_CH0 |
ADC1 channel selection macro, channel 0 - P2.0.
#define ADC1_P22 ADC1_CH2 |
ADC1 channel selection macro, channel 2 - P2.2.
#define ADC1_P23 ADC1_CH3 |
ADC1 channel selection macro, channel 3 - P2.3.
#define ADC1_P24 ADC1_CH4 |
ADC1 channel selection macro, channel 4 - P2.4.
#define ADC1_P25 ADC1_CH5 |
ADC1 channel selection macro, channel 5 - P2.5.
#define ADC1_VDH ADC1_CH6 |
ADC1 channel selection macro, channel 6 - P2.6.
#define ADC1_VDH_Attenuator_Range_0_20V (0u) |
ADC1 VDH Attenuator Selection, 0V..20V.
#define ADC1_VDH_Attenuator_Range_0_30V (1u) |
ADC1 VDH Attenuator Selection, 0V..30V.
#define ADC1_VREF_22000mV 22000u |
ADC1 virtual reference voltage 22.0V for VDH Attenuator Range 0-22V.
#define ADC1_VREF_30000mV 30000u |
ADC1 virtual reference voltage 30.0V for VDH Attenuator Range 0-30V.
#define ADC1_VREF_5000mV 5000u |
ADC1 reference voltage 5.0V.
#define BIT10 0u |
ADC1 conversion data width selection, 10 bit conversion.
#define BIT8 1u |
ADC1 conversion data width selection, 8 bit conversion.
#define INTDIS 0u |
ADC1 Interrupt, Disable.
#define INTEN 1u |
ADC1 Interrupt, Enable.
#define MEAS 1u |
Sequencer Configuration, perform channel measurement.
#define OVERWRITE 0u |
ADC1 Result Register, Overwrite Mode.
#define SEQ_MODE 1u |
Mode Selection, Sequencer Mode.
#define SKIP 0u |
ADC1 Sequencer Configuration, skip channel measurement.
#define SW_MODE 0u |
ADC1 Mode Selection, Software Mode.
#define WFR 1u |
ADC1 Result Register, Wait For Read Mode.
enum TADC1_ANON |
This enum lists the options for the Analog Module.
enum TADC1_EIM_REP_CNT |
This enum lists the options for the EIM repeat count setting.
The number of measurements to be done until EIM interrupt is requested.
enum TADC1_TRIGG_SEL |
This enum lists the options for the trigger select for EIM and ESM.
ADC1 set the Analog Module Mode.
a | analog module mode, see TADC1_ANON |
Example
This example sets the ADC1 to normal mode.
INLINE TADC1_ANON ADC1_ANON_Sts | ( | void | ) |
Reads the Analog Part Switched On Mode status.
Example
This example enables ADC1 and waits until ADC1 has reached normal mode.
Reads the overall status of the ADC1.
true | ADC1 busy |
false | ADC1 ready |
Example
This example reads the busy status of the ADC1.
Reads the overall status of the ADC1.
1 | if ADC1 busy |
0 | if ADC1 ready |
Example
This example reads the busy status of the ADC1.
INLINE void ADC1_Ch0_DataWidth_10bit_Set | ( | void | ) |
Sets the ADC1 channel 0 conversion data width to 10-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch0_DataWidth_8bit_Set | ( | void | ) |
Sets the ADC1 channel 0 conversion data width to 8-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch0_Int_Clr | ( | void | ) |
clears ADC1 Channel 0 Interrupt flag.
Example
This example treats the ADC1 Channel 0 Interrupt.
INLINE void ADC1_Ch0_Int_Dis | ( | void | ) |
disables ADC1 Channel 0 Interrupt.
Example
This example treats the ADC1 Channel 0 Interrupt.
INLINE void ADC1_Ch0_Int_En | ( | void | ) |
enables ADC1 Channel 0 Interrupt.
Example
This example treats the ADC1 Channel 0 Interrupt.
INLINE void ADC1_Ch0_Overwrite_Set | ( | void | ) |
Sets the ADC1 channel 0 result register to "overwrite".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.
Reads the converted value from the channel 0 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.
Reads the valid flag for the channel 0 (P2.0) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.
Sets the ADC1 channel 0 number of sampling ticks.
stc | sampling tick count |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch0_WaitForRead_Set | ( | void | ) |
Sets the ADC1 channel 0 result register to "wait for read".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.
INLINE void ADC1_Ch1_DataWidth_10bit_Set | ( | void | ) |
Sets the ADC1 channel 1 conversion data width to 10-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch1_DataWidth_8bit_Set | ( | void | ) |
Sets the ADC1 channel 1 conversion data width to 8-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch1_Int_Clr | ( | void | ) |
clears ADC1 Channel 1 Interrupt flag.
Example
This example treats the ADC1 Channel 1 Interrupt.
INLINE void ADC1_Ch1_Int_Dis | ( | void | ) |
disables ADC1 Channel 1 Interrupt.
Example
This example treats the ADC1 Channel 1 Interrupt.
INLINE void ADC1_Ch1_Int_En | ( | void | ) |
enables ADC1 Channel 1 Interrupt.
Example
This example treats the ADC1 Channel 1 Interrupt.
INLINE void ADC1_Ch1_Overwrite_Set | ( | void | ) |
Sets the ADC1 channel 1 result register to "overwrite".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.
Reads the converted value from the channel 1 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.
Reads the valid flag for the channel 1 (CSA) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.
Sets the ADC1 channel 1 number of sampling ticks.
stc | sampling tick count |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch1_WaitForRead_Set | ( | void | ) |
Sets ADC1 channel 1 the result register to "wait for read".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.
INLINE void ADC1_Ch2_DataWidth_10bit_Set | ( | void | ) |
Sets the ADC1 channel 2 conversion data width to 10-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch2_DataWidth_8bit_Set | ( | void | ) |
Sets the ADC1 channel 2 conversion data width to 8-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch2_Int_Clr | ( | void | ) |
clears ADC1 Channel 2 Interrupt flag.
Example
This example treats the ADC1 Channel 2 Interrupt.
INLINE void ADC1_Ch2_Int_Dis | ( | void | ) |
disables ADC1 Channel 2 Interrupt.
Example
This example treats the ADC1 Channel 2 Interrupt.
INLINE void ADC1_Ch2_Int_En | ( | void | ) |
enables ADC1 Channel 2 Interrupt.
Example
This example treats the ADC1 Channel 2 Interrupt.
INLINE void ADC1_Ch2_Overwrite_Set | ( | void | ) |
Sets the ADC1 channel 2 result register to "overwrite".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
Reads the converted value from the channel 2 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
Reads the valid flag for the channel 2 (P2.2) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
Sets the ADC1 channel 2 number of sampling ticks.
stc | sampling tick count |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch2_WaitForRead_Set | ( | void | ) |
Sets the ADC1 channel 2 result register to "wait for read".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
INLINE void ADC1_Ch3_DataWidth_10bit_Set | ( | void | ) |
Sets the ADC1 channel 3 conversion data width to 10-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch3_DataWidth_8bit_Set | ( | void | ) |
Sets the ADC1 channel 3 conversion data width to 8-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch3_Int_Clr | ( | void | ) |
clears ADC1 Channel 3 Interrupt flag.
Example
This example treats the ADC1 Channel 3 Interrupt.
INLINE void ADC1_Ch3_Int_Dis | ( | void | ) |
disables ADC1 Channel 3 Interrupt.
Example
This example treats the ADC1 Channel 3 Interrupt.
INLINE void ADC1_Ch3_Int_En | ( | void | ) |
enables ADC1 Channel 3 Interrupt.
Example
This example treats the ADC1 Channel 3 Interrupt.
INLINE void ADC1_Ch3_Overwrite_Set | ( | void | ) |
Sets the ADC1 channel 3 result register to "overwrite".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.
Reads the converted value from the channel 3 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.
Reads the valid flag for the channel 3 (P2.3) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.
Sets the ADC1 channel 3 number of sampling ticks.
stc | sampling tick count |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch3_WaitForRead_Set | ( | void | ) |
Sets the ADC1 channel 3 result register to "wait for read".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.
INLINE void ADC1_Ch4_DataWidth_10bit_Set | ( | void | ) |
Sets the ADC1 channel 4 conversion data width to 10-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch4_DataWidth_8bit_Set | ( | void | ) |
Sets the ADC1 channel 4 conversion data width to 8-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch4_Int_Clr | ( | void | ) |
clears ADC1 Channel 4 Interrupt flag.
Example
This example treats the ADC1 Channel 4 Interrupt.
INLINE void ADC1_Ch4_Int_Dis | ( | void | ) |
disables ADC1 Channel 4 Interrupt.
Example
This example treats the ADC1 Channel 4 Interrupt.
INLINE void ADC1_Ch4_Int_En | ( | void | ) |
enables ADC1 Channel 4 Interrupt.
Example
This example treats the ADC1 Channel 4 Interrupt.
INLINE void ADC1_Ch4_Overwrite_Set | ( | void | ) |
Sets the ADC1 channel 4 result register to "overwrite".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.
Reads the converted value from the channel 4 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.
Reads the valid flag for the channel 4 (P2.4) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.
Sets the ADC1 channel 4 number of sampling ticks.
stc | sampling tick count |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch4_WaitForRead_Set | ( | void | ) |
Sets the ADC1 channel 4 result register to "wait for read".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.
INLINE void ADC1_Ch5_DataWidth_10bit_Set | ( | void | ) |
Sets the ADC1 channel 5 conversion data width to 10-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch5_DataWidth_8bit_Set | ( | void | ) |
Sets the ADC1 channel 5 conversion data width to 8-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch5_Int_Clr | ( | void | ) |
clears ADC1 Channel 5 Interrupt flag.
Example
This example treats the ADC1 Channel 5 Interrupt.
INLINE void ADC1_Ch5_Int_Dis | ( | void | ) |
disables ADC1 Channel 5 Interrupt.
Example
This example treats the ADC1 Channel 5 Interrupt.
INLINE void ADC1_Ch5_Int_En | ( | void | ) |
enables ADC1 Channel 5 Interrupt.
Example
This example treats the ADC1 Channel 5 Interrupt.
INLINE void ADC1_Ch5_Overwrite_Set | ( | void | ) |
Sets the ADC1 channel 5 result register to "overwrite".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.
Reads the converted value from the channel 5 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.
Reads the valid flag for the channel 5 (P2.5) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.
Sets the ADC1 channel 5 number of sampling ticks.
stc | sampling tick count |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch5_WaitForRead_Set | ( | void | ) |
Sets the ADC1 channel 5 result register to "wait for read".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.
INLINE void ADC1_Ch6_DataWidth_10bit_Set | ( | void | ) |
Sets the ADC1 channel 6 conversion data width to 10-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch6_DataWidth_8bit_Set | ( | void | ) |
Sets the ADC1 channel 6 conversion data width to 8-bit.
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch6_Int_Clr | ( | void | ) |
clears ADC1 Channel 6 Interrupt flag.
Example
This example treats the ADC1 Channel 6 Interrupt.
INLINE void ADC1_Ch6_Int_Dis | ( | void | ) |
disables ADC1 Channel 6 Interrupt.
Example
This example treats the ADC1 Channel 6 Interrupt.
INLINE void ADC1_Ch6_Int_En | ( | void | ) |
enables ADC1 Channel 6 Interrupt.
Example
This example treats the ADC1 Channel 6 Interrupt.
INLINE void ADC1_Ch6_Overwrite_Set | ( | void | ) |
Sets the ADC1 channel 6 result register to "overwrite".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.
Reads the converted value from the channel 6 (VDH) result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.
Reads the valid flag for the channel 6 (VDH) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.
Sets the ADC1 channel 6 number of sampling ticks.
stc | sampling tick count |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
INLINE void ADC1_Ch6_WaitForRead_Set | ( | void | ) |
Sets the ADC1 channel 6 result register to "wait for read".
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.
Reads the converted value from the channel 1 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.
Reads the currently active channel.
Example
This example enables ADC1 and switches to Software Mode and reads the currently active channel 6.
Reads the currently active channel in Sequencer Mode.
Example
This example enables ADC1 and switches to Sequencer Mode and reads the currently active channel in Sequencer Mode.
Reads the channel for currently ongoing conversion, if no conversion is ongoing, then it returns the channel of the last conversion.
Example
This example reads the current channel number into 'ch_no'.
ADC1 analog clock divider. \(f_{ADC1} = \frac{f_{SYS}}{DIVA}\).
a | division factor, values between 0..63 are allowed, resulting in a divider of DIVA = 1..64 |
Example
This example sets the fADC1 to half of fSYS.
Reads the active status of the Exceptional Interrupt Measurement (EIM).
1 | EIM ongoing |
0 | no EIM active |
Example
This example enables ADC1 and switches to Sequencer Mode and reads the active status of the Exceptional Interrupt Measurement (EIM).
Set EIM channel for measurement.
ch | channel to be measured |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
INLINE void ADC1_EIM_Int_Clr | ( | void | ) |
clears Exceptional Interrupt Measurement (EIM) flag.
Example
This example treats the Exceptional Interrupt Measurement (EIM).
INLINE void ADC1_EIM_Int_Dis | ( | void | ) |
disables Exceptional Interrupt Measurement (EIM).
Example
This example treats the Exceptional Interrupt Measurement (EIM).
INLINE void ADC1_EIM_Int_En | ( | void | ) |
enables Exceptional Interrupt Measurement (EIM).
Example
This example treats the Exceptional Interrupt Measurement (EIM).
INLINE void ADC1_EIM_Repeat_Counter_Set | ( | TADC1_EIM_REP_CNT | repcnt | ) |
Set ADC1 EIM Repeat Counter.
repcnt | repeat counter for EIM measurement, TADC1_EIM_REP_CNT |
Example
This example enables ADC1 and configures EIM Repeat Counter as 4 Measures.
Reads the converted value from the EIM result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
Reads the valid flag for the channel 6 (VDH) result.
1 | if result is valid |
0 | if result is not valid, or already read |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
INLINE void ADC1_EIM_Trigger_Select | ( | TADC1_TRIGG_SEL | trigsel | ) |
Get ADC1 EIM Trigger Selection.
trigsel | Trigger select, TADC1_TRIGG_SEL |
Example
This example enables ADC1 and configures EIM Trigger Selection as Timer2.
Reads the End-of-Conversion status.
1 | if conversion has ended |
0 | if conversion still ongoing |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
Reads the active status of the Exceptional Sequencer Measurement (ESM).
1 | ESM ongoing |
0 | no ESM active |
Example
This example enables ADC1 and switches to Sequencer Mode and reads the active status of the Exceptional Sequencer Measurement (ESM).
Set channels in ESM sequence.
mask_ch | bit mask of channels to be measured |
Example
This example enables ADC1, switches to Sequencer Mode, programs channel 1 (CSA) and channel 6 (VDH), and reads the result of VDH.
INLINE void ADC1_ESM_Int_Clr | ( | void | ) |
clears Exceptional Sequence Measurement (ESM) flag.
Example
This example treats the Exceptional Sequence Measurement (ESM).
INLINE void ADC1_ESM_Int_Dis | ( | void | ) |
disables Exceptional Sequence Measurement (ESM).
Example
This example treats the Exceptional Sequence Measurement (ESM).
INLINE void ADC1_ESM_Int_En | ( | void | ) |
enables Exceptional Sequence Measurement (ESM).
Example
This example treats the Exceptional Sequence Measurement (ESM).
INLINE void ADC1_ESM_Trigger_Select | ( | TADC1_TRIGG_SEL | trigsel | ) |
Set ADC1 ESM Trigger Selection.
trigsel | Trigger select, TADC1_TRIGG_SEL |
Example
This example enables ADC1 and configures ESM Trigger Selection as Timer2.
Get the 10-bit/8-bit value of the ADC1 Result Register of the selected ADC1 channel and returns the validity info.
channel | channel number (defined in adc1.h) | |
[out] | *pVar | 10-bit ADC1 Result Value of the selected "channel number" (in case the Data Width is set to 8-bit, then the 8-bit value is left aligned in 10-bit *pVar) |
true | : the value of *pVar is valid (ValidFlag bit is set) |
false | : the value of *pVar is invalid (ValidFlag bit is reset) |
Example
This example returns the ADC1 Channel 5 result in Millivolt (mV).
Get the value of the ADC1 Result Register of the selected ADC1 channel in Millivolt (mV) and returns the validity info.
channel | channel number(defined in adc1.h) | |
[out] | *pVar_mV | ADC1 Result Register value of the selected channel number converted to Millivolt (mV) |
true | : the value of *pVar_mV is valid |
false | : the value of *pVar_mV is invalid |
Example
This example returns the ADC1 Channel 5 result in Millivolt (mV).
Get the 10-bit/8-bit value of the ADC1 EIM Result Register and returns the validity info.
[out] | *pVar | : 10-bit ADC1 EIM Result Value (in case the Data Width is set to 8-bit, then the 8-bit value is left aligned in 10-bit *pVar) |
true | : the value of *pVar is valid (ValidFlag bit is set) |
false | : the value of *pVar is invalid (ValidFlag bit is reset) |
Example
This example enables ADC1 and switches to Sequencer Mode, programs channel 2 (P2.2) and reads the result value in mV.
Get the value of the ADC1 EIM Result Register in Millivolt (mV) and returns the validity info.
[out] | *pVar_mV | ADC1 EIM Result Register value converted to Millivolt (mV) |
true | : the value of *pVar_mV is valid |
false | : the value of *pVar_mV is invalid |
Example
This example enables ADC1 and switches to Sequencer Mode, programs channel 2 (P2.2) and reads the result value in mV.
Get ADC1 end of conversion status.
true | conversion done |
false | conversion ongoing |
Example
This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.
Get ADC1 latest software mode result.
[out] | *pVar | result for the recent software mode conversion |
true | *pVar valid |
false | *pVar invalid |
Example
This example returns the ADC1 latest software mode result in Millivolt (mV).
Get ADC1 software mode result in Millivolt.
[out] | *pVar_mV | ADC value in mV of the recent conversion |
true | pVar_mV valid |
false | pVar_mV invalid |
Example
This example returns the ADC1 latest software mode result in Millivolt (mV).
void ADC1_Init | ( | void | ) |
Initializes the ADC1 based on the IFXConfigWizard configuration.
checks Exceptional Interrupt Mode active
true | EIM mode is active |
false | EIM mode is not active |
Example
This example enables ADC1 and switches to Sequencer Mode and checks if the Exceptional Interrupt Measurement (EIM) is active.
checks EndOfConversion ready (Software Mode)
true | conversion done |
false | conversion ongoing |
Example
This example enables ADC1 and switches to Software Mode and checks if EndOfConversion is ready.
checks Exceptional Sequencer Mode active
true | ESM mode is active |
false | ESM mode is not active |
Example
This example enables ADC1 and switches to Sequencer Mode and checks if Exceptional Sequencer Measurement (ESM) is ready.
Reads the converted value from the channel 0 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.
Reads the converted value from the channel 2 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.
Reads the converted value from the channel 3 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.
Reads the converted value from the channel 4 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.
Reads the converted value from the channel 5 result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.
INLINE void ADC1_Power_Off | ( | void | ) |
Disables the ADC1 module.
Example
This example disables the ADC1 module.
INLINE void ADC1_Power_On | ( | void | ) |
Enables the ADC1 module.
Example
This example enables the ADC1 module.
Reads the sample status of a ongoing measurement.
During the sample phase of a measurement the signal should not change. The sampling time can be set by ADC1_ChX_Sample_Time_Set(), i.e. ADC1_Ch0_Sample_Time_Set
1 | sampling phase ongoing |
0 | sampling phase done, or no measurement ongoing |
Example
This example reads the sample status.
Defines the channels to be measured in Sequence 0, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
Defines the channels to be measured in Sequence 1, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
Defines the channels to be measured in Sequence 2, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
Defines the channels to be measured in Sequence 3, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
Defines the channels to be measured in Sequence 4, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
Defines the channels to be measured in Sequence 5, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
Defines the channels to be measured in Sequence 6, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
Defines the channels to be measured in Sequence 7, only valid in Sequencer Mode, see ADC1_Sequencer_Mode_Sel.
mask_ch | a bit mask of channels to be set for this sequence |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and channel 6 (VDH).
INLINE void ADC1_Sequencer_Mode_Sel | ( | void | ) |
ADC1 selects the Sequencer Mode.
Example
This example enables ADC1 and switches to Sequencer Mode.
Set(Change) ADC1 EIM channel.
channel | channel number to be converted |
Example
This example enables ADC1 and switches to Sequencer Mode, programs channel 2 (P2.2) and reads the result.
Start ADC1 conversion mode selection.
mode | Sequencer mode, Software mode |
Example
This example enables ADC1 and switches to Software Mode.
Starts ADC1 software mode conversion.
Ch | Channel to be converted |
Example
This example enables ADC and starts SW_MODE conversion for channel 0.
Selects a channel for the software conversion.
channel | channel which should be measured |
Example
This example starts an ADC1 conversion on channel 1 - CSA.
INLINE void ADC1_SOC_Set | ( | void | ) |
ADC1 Start of Conversion, for Software mode only.
Example
This example starts an ADC1 conversion.
INLINE void ADC1_Software_Mode_Sel | ( | void | ) |
ADC1 selects the Software Mode, measurements are performed on user request.
Example
This example enables ADC1 and switches to Software Mode.
Selects a channel for the software conversion.
a | channel which should be measured |
Example
This example starts an ADC1 conversion on channel 1 - CSA.
INLINE void ADC1_VDH_Attenuator_Off | ( | void | ) |
Disables the input attenuator for VDH.
Example
This example enables ADC1 and switches to Sequencer Mode, disables the input attenuator, programs channel 6 (VDH) and reads the result.
INLINE void ADC1_VDH_Attenuator_On | ( | void | ) |
Enables the input attenuator for VDH.
Example
This example enables ADC1 and switches to Sequencer Mode, enables the input attenuator, programs channel 6 (VDH) and reads the result.
INLINE void ADC1_VDH_Attenuator_Range_0_20V_Set | ( | void | ) |
sets the VDH Monitoring Input Attenuator Input Range to 0 - 22V.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and sets the Attenuator Input Range to 0 - 20V.
INLINE void ADC1_VDH_Attenuator_Range_0_30V_Set | ( | void | ) |
sets the VDH Monitoring Input Attenuator Input Range to 0 - 30V.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and sets the Attenuator Input Range to 0 - 28V.
Reads the VDH Monitoring Input Attenuator Input Range Configuration.
1 | 0 - 30V Range is selected. |
0 | 0 - 20V Range is selected. |
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the Attenuator Input Range.
INLINE void ADC1_VDH_Attenuator_Zhigh_Set | ( | void | ) |
Enables the output attenuator for VDH.
Example
This example enables ADC1 and switches to Sequencer Mode, enables the output attenuator, programs channel 6 (VDH) and reads the result.
INLINE void ADC1_VDH_Attenuator_Zlow_Set | ( | void | ) |
Disables the output attenuator for VDH.
Example
This example enables ADC1 and switches to Sequencer Mode, disables the output attenuator, programs channel 6 (VDH) and reads the result.
Reads the converted value from the channel 6 (VDH) result register.
Example
This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.
bool VAREF_Enable | ( | void | ) |
Re-enables the internal VAREF LDO in case it was shutdown due to a previous failure.
true | VAREF enabled |
false | VAREF enabling failed |
Example
This example checks if the internal VAREF LDO is re-enabling.