Infineon MOTIX™ MCU TLE987x Device Family SDK
Data Structures | Macros | Typedefs | Enumerations | Functions
adc1.h File Reference

Go to the source code of this file.

Detailed Description

ADC1 low level access library.

Version
V0.3.0
Date
18. Oct 2022
Note
This file violates [MISRA Rule 45]

Include Graph

Include dependency graph for adc1.h:

Data Structures

union  ADC1_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...
 

Typedefs

typedef enum ADC1_ANON TADC1_ANON
 
typedef union ADC1_ANON_U TADC1_ANON_U
 
typedef enum ADC1_TRIGG_SEL TADC1_TRIGG_SEL
 
typedef enum ADC1_EIM_REP_CNT TADC1_EIM_REP_CNT
 

Enumerations

enum  ADC1_ANON { ADC1_ANON_OFF = 0 , ADC1_ANON_S_STANDBY = 1 , ADC1_ANON_F_STANDBY = 2 , ADC1_ANON_NORMAL = 3 }
 
enum  ADC1_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
}
 
enum  ADC1_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
}
 

Functions

void ADC1_Init (void)
 Initializes the ADC1 module based on the Config Wizard for MOTIX MCU 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...
 

Macro Definition Documentation

◆ ADC1_CH0

#define ADC1_CH0   (0)

ADC1 channel selection macro, channel 0 - P2.0.

◆ ADC1_CH1

#define ADC1_CH1   (1)

ADC1 channel selection macro, channel 1 - Current Sense Amplifier.

◆ ADC1_CH2

#define ADC1_CH2   (2)

ADC1 channel selection macro, channel 2 - P2.2.

◆ ADC1_CH3

#define ADC1_CH3   (3)

ADC1 channel selection macro, channel 3 - P2.3.

◆ ADC1_CH4

#define ADC1_CH4   (4)

ADC1 channel selection macro, channel 4 - P2.4.

◆ ADC1_CH5

#define ADC1_CH5   (5)

ADC1 channel selection macro, channel 5 - P2.5.

◆ ADC1_CH6

#define ADC1_CH6   (6)

ADC1 channel selection macro, channel 6 - P2.6.

◆ ADC1_CSA

#define ADC1_CSA   ADC1_CH1

ADC1 channel selection macro, channel 1 - Current Sense Amplifier.

◆ ADC1_EIM

#define ADC1_EIM   (8)

ADC1 channel selection macro, Exceptional Interrupt Measurement - EIM.

◆ ADC1_MASK_CH0

#define ADC1_MASK_CH0   ((uint32)1u << ADC1_CH0)

ADC1 Sequencer/ESM channel selection macro, channel 0 - P2.0.

◆ ADC1_MASK_CH1

#define ADC1_MASK_CH1   ((uint32)1u << ADC1_CH1)

ADC1 Sequencer/ESM channel selection macro, channel 1 - CSA.

◆ ADC1_MASK_CH2

#define ADC1_MASK_CH2   ((uint32)1u << ADC1_CH2)

ADC1 Sequencer/ESM channel selection macro, channel 2 - P2.2.

◆ ADC1_MASK_CH3

#define ADC1_MASK_CH3   ((uint32)1u << ADC1_CH3)

ADC1 Sequencer/ESM channel selection macro, channel 3 - P2.3.

◆ ADC1_MASK_CH4

#define ADC1_MASK_CH4   ((uint32)1u << ADC1_CH4)

ADC1 Sequencer/ESM channel selection macro, channel 4 - P2.4.

◆ ADC1_MASK_CH5

#define ADC1_MASK_CH5   ((uint32)1u << ADC1_CH5)

ADC1 Sequencer/ESM channel selection macro, channel 5 - P2.5.

◆ ADC1_MASK_CH6

#define ADC1_MASK_CH6   ((uint32)1u << ADC1_CH6)

ADC1 Sequencer/ESM channel selection macro, channel 6 - P2.6.

◆ ADC1_MASK_CSA

#define ADC1_MASK_CSA   (ADC1_MASK_CH1)

ADC1 Sequencer/ESM channel selection macro, channel 1 - CSA.

◆ ADC1_MASK_P20

#define ADC1_MASK_P20   (ADC1_MASK_CH0)

ADC1 Sequencer/ESM channel selection macro, channel 0 - P2.0.

◆ ADC1_MASK_P22

#define ADC1_MASK_P22   (ADC1_MASK_CH2)

ADC1 Sequencer/ESM channel selection macro, channel 2 - P2.2.

◆ ADC1_MASK_P23

#define ADC1_MASK_P23   (ADC1_MASK_CH3)

ADC1 Sequencer/ESM channel selection macro, channel 3 - P2.3.

◆ ADC1_MASK_P24

#define ADC1_MASK_P24   (ADC1_MASK_CH4)

ADC1 Sequencer/ESM channel selection macro, channel 4 - P2.4.

◆ ADC1_MASK_P25

#define ADC1_MASK_P25   (ADC1_MASK_CH5)

ADC1 Sequencer/ESM channel selection macro, channel 5 - P2.5.

◆ ADC1_MASK_VDH

#define ADC1_MASK_VDH   (ADC1_MASK_CH6)

ADC1 Sequencer/ESM channel selection macro, channel 6 - P2.6.

◆ ADC1_P20

#define ADC1_P20   ADC1_CH0

ADC1 channel selection macro, channel 0 - P2.0.

◆ ADC1_P22

#define ADC1_P22   ADC1_CH2

ADC1 channel selection macro, channel 2 - P2.2.

◆ ADC1_P23

#define ADC1_P23   ADC1_CH3

ADC1 channel selection macro, channel 3 - P2.3.

◆ ADC1_P24

#define ADC1_P24   ADC1_CH4

ADC1 channel selection macro, channel 4 - P2.4.

◆ ADC1_P25

#define ADC1_P25   ADC1_CH5

ADC1 channel selection macro, channel 5 - P2.5.

◆ ADC1_VDH

#define ADC1_VDH   ADC1_CH6

ADC1 channel selection macro, channel 6 - P2.6.

◆ ADC1_VDH_Attenuator_Range_0_20V

#define ADC1_VDH_Attenuator_Range_0_20V   (0u)

ADC1 VDH Attenuator Selection, 0V..20V.

◆ ADC1_VDH_Attenuator_Range_0_30V

#define ADC1_VDH_Attenuator_Range_0_30V   (1u)

ADC1 VDH Attenuator Selection, 0V..30V.

◆ ADC1_VREF_22000mV

#define ADC1_VREF_22000mV   22000u

ADC1 virtual reference voltage 22.0V for VDH Attenuator Range 0-22V.

◆ ADC1_VREF_30000mV

#define ADC1_VREF_30000mV   30000u

ADC1 virtual reference voltage 30.0V for VDH Attenuator Range 0-30V.

◆ ADC1_VREF_5000mV

#define ADC1_VREF_5000mV   5000u

ADC1 reference voltage 5.0V.

◆ BIT10

#define BIT10   0u

ADC1 conversion data width selection, 10 bit conversion.

◆ BIT8

#define BIT8   1u

ADC1 conversion data width selection, 8 bit conversion.

◆ INTDIS

#define INTDIS   0u

ADC1 Interrupt, Disable.

◆ INTEN

#define INTEN   1u

ADC1 Interrupt, Enable.

◆ MEAS

#define MEAS   1u

Sequencer Configuration, perform channel measurement.

◆ OVERWRITE

#define OVERWRITE   0u

ADC1 Result Register, Overwrite Mode.

◆ SEQ_MODE

#define SEQ_MODE   1u

Mode Selection, Sequencer Mode.

◆ SKIP

#define SKIP   0u

ADC1 Sequencer Configuration, skip channel measurement.

◆ SW_MODE

#define SW_MODE   0u

ADC1 Mode Selection, Software Mode.

◆ WFR

#define WFR   1u

ADC1 Result Register, Wait For Read Mode.

Typedef Documentation

◆ TADC1_ANON

typedef enum ADC1_ANON TADC1_ANON

◆ TADC1_ANON_U

typedef union ADC1_ANON_U TADC1_ANON_U

◆ TADC1_EIM_REP_CNT

◆ TADC1_TRIGG_SEL

Enumeration Type Documentation

◆ ADC1_ANON

enum ADC1_ANON
Enumerator
ADC1_ANON_OFF 

ADC1 Analog Module Mode - Off Mode

ADC1_ANON_S_STANDBY 

ADC1 Analog Module Mode - Slow Standby Mode

ADC1_ANON_F_STANDBY 

ADC1 Analog Module Mode - Fast Standby Mode

ADC1_ANON_NORMAL 

ADC1 Analog Module Mode - Normal Mode (On-Mode)

◆ ADC1_EIM_REP_CNT

Enumerator
ADC1_1_Meas 

EIM irq every measurement

ADC1_2_Meas 

EIM irq every 2nd measurement

ADC1_4_Meas 

EIM irq every 4th measurement

ADC1_8_Meas 

EIM irq every 8th measurement

ADC1_16_Meas 

EIM irq every 16th measurement

ADC1_32_Meas 

EIM irq every 32nd measurement

ADC1_64_Meas 

EIM irq every 64th measurement

ADC1_128_Meas 

EIM irq every 128th measurement

◆ ADC1_TRIGG_SEL

Enumerator
ADC1_Trigg_None 

no trigger source connected

ADC1_Trigg_CCU6_Ch3 

CCU6 Channel 3 (COUT63), rising edge

ADC1_Trigg_GPT12E_T6 

GPT12E Timer6, T6OUT

ADC1_Trigg_GPT12E_T3 

GPT12E Timer6, T3OUT

ADC1_Trigg_Timer2 

Timer2 output

ADC1_Trigg_Timer21 

Timer21 output

ADC1_Trigg_Timer3 

Timer3 output

Function Documentation

◆ ADC1_ANON_Set()

INLINE void ADC1_ANON_Set ( uint32  a)

ADC1 set the Analog Module Mode.

Parameters
aanalog module mode, see TADC1_ANON

Example

This example sets the ADC1 to normal mode.

void Example_Function(void)
{
}
@ ADC1_ANON_NORMAL
Definition: adc1.h:237
INLINE void ADC1_ANON_Set(uint32 a)
ADC1 set the Analog Module Mode.
Definition: adc1.h:926

◆ ADC1_ANON_Sts()

INLINE TADC1_ANON ADC1_ANON_Sts ( void  )

Reads the Analog Part Switched On Mode status.

Returns
TADC1_ANON, see TADC1_ANON

Example

This example enables ADC1 and waits until ADC1 has reached normal mode.

void Example_Function(void)
{
while ( ADC1_ANON_Sts() != ADC1_ANON_NORMAL ) {}
}
INLINE void ADC1_Power_On(void)
Enables the ADC1 module.
Definition: adc1.h:833
INLINE TADC1_ANON ADC1_ANON_Sts(void)
Reads the Analog Part Switched On Mode status.
Definition: adc1.h:4080

◆ ADC1_Busy()

INLINE bool ADC1_Busy ( void  )

Reads the overall status of the ADC1.

Return values
trueADC1 busy
falseADC1 ready

Example

This example reads the busy status of the ADC1.

void Example_Function(void)
{
while ( ADC1_Busy() == true )
{
//ADC1 still busy
}
while ( ADC1_EOC_Sts() != 1u ) {}
}
#define ADC1_CSA
ADC1 channel selection macro, channel 1 - Current Sense Amplifier.
Definition: adc1.h:176
INLINE void ADC1_DIVA_Set(uint32 a)
ADC1 analog clock divider. .
Definition: adc1.h:907
INLINE bool ADC1_Busy(void)
Reads the overall status of the ADC1.
Definition: adc1.h:4014
INLINE void ADC1_SW_Ch_Sel(uint32 a)
Selects a channel for the software conversion.
Definition: adc1.h:887
INLINE void ADC1_Software_Mode_Sel(void)
ADC1 selects the Software Mode, measurements are performed on user request.
Definition: adc1.h:970
INLINE uint8 ADC1_EOC_Sts(void)
Reads the End-of-Conversion status.
Definition: adc1.h:997
INLINE void ADC1_SOC_Set(void)
ADC1 Start of Conversion, for Software mode only.
Definition: adc1.h:867

◆ ADC1_Busy_Sts()

INLINE uint8 ADC1_Busy_Sts ( void  )

Reads the overall status of the ADC1.

Return values
1if ADC1 busy
0if ADC1 ready

Example

This example reads the busy status of the ADC1.

void Example_Function(void)
{
while ( ADC1_Busy_Sts() == 1u )
{
//ADC1 still busy
}
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE uint8 ADC1_Busy_Sts(void)
Reads the overall status of the ADC1.
Definition: adc1.h:1092

◆ ADC1_Ch0_DataWidth_10bit_Set()

INLINE void ADC1_Ch0_DataWidth_10bit_Set ( void  )

Sets the ADC1 channel 0 conversion data width to 10-bit.

Note
The 10-bit word is left aligned in the 12-bit result value, ADC1_P20_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
#define ADC1_P20
ADC1 channel selection macro, channel 0 - P2.0.
Definition: adc1.h:174
INLINE void ADC1_Ch0_DataWidth_10bit_Set(void)
Sets the ADC1 channel 0 conversion data width to 10-bit.
Definition: adc1.h:2135

◆ ADC1_Ch0_DataWidth_8bit_Set()

INLINE void ADC1_Ch0_DataWidth_8bit_Set ( void  )

Sets the ADC1 channel 0 conversion data width to 8-bit.

Note
The 8-bit word is left aligned in the 12-bit result value, ADC1_P20_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch0_DataWidth_8bit_Set(void)
Sets the ADC1 channel 0 conversion data width to 8-bit.
Definition: adc1.h:2109

◆ ADC1_Ch0_Int_Clr()

INLINE void ADC1_Ch0_Int_Clr ( void  )

clears ADC1 Channel 0 Interrupt flag.

Example

This example treats the ADC1 Channel 0 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH0_STS == 1u)
{
ADC1_CH0_CALLBACK();
}
}
INLINE void ADC1_Ch0_Int_En(void)
enables ADC1 Channel 0 Interrupt.
Definition: adc1.h:3495
INLINE void ADC1_Ch0_Int_Clr(void)
clears ADC1 Channel 0 Interrupt flag.
Definition: adc1.h:3297
#define ADC1
Definition: tle987x.h:6083

◆ ADC1_Ch0_Int_Dis()

INLINE void ADC1_Ch0_Int_Dis ( void  )

disables ADC1 Channel 0 Interrupt.

Example

This example treats the ADC1 Channel 0 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH0_STS == 1u)
{
ADC1_CH0_CALLBACK();
}
}
INLINE void ADC1_Ch0_Int_Dis(void)
disables ADC1 Channel 0 Interrupt.
Definition: adc1.h:3518

◆ ADC1_Ch0_Int_En()

INLINE void ADC1_Ch0_Int_En ( void  )

enables ADC1 Channel 0 Interrupt.

Example

This example treats the ADC1 Channel 0 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH0_STS == 1u)
{
ADC1_CH0_CALLBACK();
}
}

◆ ADC1_Ch0_Overwrite_Set()

INLINE void ADC1_Ch0_Overwrite_Set ( void  )

Sets the ADC1 channel 0 result register to "overwrite".

Note
A valid result will be overwritten by a subsequent conversion, a previous unread conversion is lost.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch0_ResultValid_Get() == 1u )
{
adc_result = ADC1_P20_Result_Get();
}
}
INLINE uint8 ADC1_Ch0_ResultValid_Get(void)
Reads the valid flag for the channel 0 (P2.0) result.
Definition: adc1.h:1858
INLINE void ADC1_Sequencer_Mode_Sel(void)
ADC1 selects the Sequencer Mode.
Definition: adc1.h:947
INLINE uint16 ADC1_P20_Result_Get(void)
Reads the converted value from the channel 0 result register.
Definition: adc1.h:1646
INLINE void ADC1_Ch0_Overwrite_Set(void)
Sets the ADC1 channel 0 result register to "overwrite".
Definition: adc1.h:2710
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_M...
Definition: adc1.h:1214
#define ADC1_MASK_P20
ADC1 Sequencer/ESM channel selection macro, channel 0 - P2.0.
Definition: adc1.h:205
uint16_t uint16
16 bit unsigned value
Definition: types.h:154

◆ ADC1_Ch0_Result_Get()

INLINE uint16 ADC1_Ch0_Result_Get ( void  )

Reads the converted value from the channel 0 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch0_ResultValid_Get() == 1u )
{
adc_result = ADC1_Ch0_Result_Get();
}
}
INLINE uint16 ADC1_Ch0_Result_Get(void)
Reads the converted value from the channel 0 result register.
Definition: adc1.h:1405

◆ ADC1_Ch0_ResultValid_Get()

INLINE uint8 ADC1_Ch0_ResultValid_Get ( void  )

Reads the valid flag for the channel 0 (P2.0) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch0_ResultValid_Get() == 1u )
{
adc_result = ADC1_P20_Result_Get();
}
}

◆ ADC1_Ch0_Sample_Time_Set()

INLINE void ADC1_Ch0_Sample_Time_Set ( uint32  stc)

Sets the ADC1 channel 0 number of sampling ticks.

Note
The effective sampling time is calculated by: \(t_{sampling} = \frac{2+stc}{f_{ADC1}}\).
Parameters
stcsampling tick count

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch0_Sample_Time_Set(uint32 stc)
Sets the ADC1 channel 0 number of sampling ticks.
Definition: adc1.h:2476

◆ ADC1_Ch0_WaitForRead_Set()

INLINE void ADC1_Ch0_WaitForRead_Set ( void  )

Sets the ADC1 channel 0 result register to "wait for read".

Note
A valid result will not be overwritten by a subsequent conversion until the result is read.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch0_ResultValid_Get() == true )
{
adc_result = ADC1_P20_Result_Get();
}
}
INLINE void ADC1_Ch0_WaitForRead_Set(void)
Sets the ADC1 channel 0 result register to "wait for read".
Definition: adc1.h:2680

◆ ADC1_Ch1_DataWidth_10bit_Set()

INLINE void ADC1_Ch1_DataWidth_10bit_Set ( void  )

Sets the ADC1 channel 1 conversion data width to 10-bit.

Note
The 10-bit word is left aligned in the 12-bit result value, ADC1_CSA_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch1_DataWidth_10bit_Set(void)
Sets the ADC1 channel 1 conversion data width to 10-bit.
Definition: adc1.h:2187

◆ ADC1_Ch1_DataWidth_8bit_Set()

INLINE void ADC1_Ch1_DataWidth_8bit_Set ( void  )

Sets the ADC1 channel 1 conversion data width to 8-bit.

Note
The 8-bit word is left aligned in the 12-bit result value, ADC1_CSA_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch1_DataWidth_8bit_Set(void)
Sets the ADC1 channel 1 conversion data width to 8-bit.
Definition: adc1.h:2161

◆ ADC1_Ch1_Int_Clr()

INLINE void ADC1_Ch1_Int_Clr ( void  )

clears ADC1 Channel 1 Interrupt flag.

Example

This example treats the ADC1 Channel 1 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH1_STS == 1u)
{
ADC1_CH1_CALLBACK();
}
}
INLINE void ADC1_Ch1_Int_Clr(void)
clears ADC1 Channel 1 Interrupt flag.
Definition: adc1.h:3319
INLINE void ADC1_Ch1_Int_En(void)
enables ADC1 Channel 1 Interrupt.
Definition: adc1.h:3540

◆ ADC1_Ch1_Int_Dis()

INLINE void ADC1_Ch1_Int_Dis ( void  )

disables ADC1 Channel 1 Interrupt.

Example

This example treats the ADC1 Channel 1 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH1_STS == 1u)
{
ADC1_CH1_CALLBACK();
}
}
INLINE void ADC1_Ch1_Int_Dis(void)
disables ADC1 Channel 1 Interrupt.
Definition: adc1.h:3563

◆ ADC1_Ch1_Int_En()

INLINE void ADC1_Ch1_Int_En ( void  )

enables ADC1 Channel 1 Interrupt.

Example

This example treats the ADC1 Channel 1 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH1_STS == 1u)
{
ADC1_CH1_CALLBACK();
}
}

◆ ADC1_Ch1_Overwrite_Set()

INLINE void ADC1_Ch1_Overwrite_Set ( void  )

Sets the ADC1 channel 1 result register to "overwrite".

Note
A valid result will be overwritten by a subsequent conversion, a previous unread conversion is lost.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch1_ResultValid_Get() == 1u )
{
adc_result = ADC1_CSA_Result_Get();
}
}
INLINE void ADC1_Ch1_Overwrite_Set(void)
Sets the ADC1 channel 1 result register to "overwrite".
Definition: adc1.h:2770
#define ADC1_MASK_CSA
ADC1 Sequencer/ESM channel selection macro, channel 1 - CSA.
Definition: adc1.h:207
INLINE uint8 ADC1_Ch1_ResultValid_Get(void)
Reads the valid flag for the channel 1 (CSA) result.
Definition: adc1.h:1890
INLINE uint16 ADC1_CSA_Result_Get(void)
Reads the converted value from the channel 1 result register.
Definition: adc1.h:1676

◆ ADC1_Ch1_Result_Get()

INLINE uint16 ADC1_Ch1_Result_Get ( void  )

Reads the converted value from the channel 1 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch1_ResultValid_Get() == 1u )
{
adc_result = ADC1_Ch1_Result_Get();
}
}
INLINE uint16 ADC1_Ch1_Result_Get(void)
Reads the converted value from the channel 1 result register.
Definition: adc1.h:1435

◆ ADC1_Ch1_ResultValid_Get()

INLINE uint8 ADC1_Ch1_ResultValid_Get ( void  )

Reads the valid flag for the channel 1 (CSA) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch1_ResultValid_Get() == 1u )
{
adc_result = ADC1_CSA_Result_Get();
}
}

◆ ADC1_Ch1_Sample_Time_Set()

INLINE void ADC1_Ch1_Sample_Time_Set ( uint32  stc)

Sets the ADC1 channel 1 number of sampling ticks.

Note
The effective sampling time is calculated by: \(t_{sample} = \frac{2+stc}{f_{ADC1}}\).
Parameters
stcsampling tick count

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch1_Sample_Time_Set(uint32 stc)
Sets the ADC1 channel 1 number of sampling ticks.
Definition: adc1.h:2505

◆ ADC1_Ch1_WaitForRead_Set()

INLINE void ADC1_Ch1_WaitForRead_Set ( void  )

Sets ADC1 channel 1 the result register to "wait for read".

Note
A valid result will not be overwritten by a subsequent conversion until the result is read.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch1_ResultValid_Get() == 1u )
{
adc_result = ADC1_CSA_Result_Get();
}
}
INLINE void ADC1_Ch1_WaitForRead_Set(void)
Sets ADC1 channel 1 the result register to "wait for read".
Definition: adc1.h:2740

◆ ADC1_Ch2_DataWidth_10bit_Set()

INLINE void ADC1_Ch2_DataWidth_10bit_Set ( void  )

Sets the ADC1 channel 2 conversion data width to 10-bit.

Note
The 10-bit word is left aligned in the 12-bit result value, ADC1_P22_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
#define ADC1_P22
ADC1 channel selection macro, channel 2 - P2.2.
Definition: adc1.h:178
INLINE void ADC1_Ch2_DataWidth_10bit_Set(void)
Sets the ADC1 channel 2 conversion data width to 10-bit.
Definition: adc1.h:2239

◆ ADC1_Ch2_DataWidth_8bit_Set()

INLINE void ADC1_Ch2_DataWidth_8bit_Set ( void  )

Sets the ADC1 channel 2 conversion data width to 8-bit.

Note
The 8-bit word is left aligned in the 12-bit result value, ADC1_P22_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch2_DataWidth_8bit_Set(void)
Sets the ADC1 channel 2 conversion data width to 8-bit.
Definition: adc1.h:2213

◆ ADC1_Ch2_Int_Clr()

INLINE void ADC1_Ch2_Int_Clr ( void  )

clears ADC1 Channel 2 Interrupt flag.

Example

This example treats the ADC1 Channel 2 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH2_STS == 1u)
{
ADC1_CH2_CALLBACK();
}
}
INLINE void ADC1_Ch2_Int_En(void)
enables ADC1 Channel 2 Interrupt.
Definition: adc1.h:3585
INLINE void ADC1_Ch2_Int_Clr(void)
clears ADC1 Channel 2 Interrupt flag.
Definition: adc1.h:3341

◆ ADC1_Ch2_Int_Dis()

INLINE void ADC1_Ch2_Int_Dis ( void  )

disables ADC1 Channel 2 Interrupt.

Example

This example treats the ADC1 Channel 2 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH2_STS == 1u)
{
ADC1_CH2_CALLBACK();
}
}
INLINE void ADC1_Ch2_Int_Dis(void)
disables ADC1 Channel 2 Interrupt.
Definition: adc1.h:3608

◆ ADC1_Ch2_Int_En()

INLINE void ADC1_Ch2_Int_En ( void  )

enables ADC1 Channel 2 Interrupt.

Example

This example treats the ADC1 Channel 2 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH2_STS == 1u)
{
ADC1_CH2_CALLBACK();
}
}

◆ ADC1_Ch2_Overwrite_Set()

INLINE void ADC1_Ch2_Overwrite_Set ( void  )

Sets the ADC1 channel 2 result register to "overwrite".

Note
A valid result will be overwritten by a subsequent conversion, a previous unread conversion is lost.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch2_ResultValid_Get() == 1u )
{
adc_result = ADC1_P22_Result_Get();
}
}
INLINE uint16 ADC1_P22_Result_Get(void)
Reads the converted value from the channel 2 result register.
Definition: adc1.h:1706
INLINE uint8 ADC1_Ch2_ResultValid_Get(void)
Reads the valid flag for the channel 2 (P2.2) result.
Definition: adc1.h:1922
INLINE void ADC1_Ch2_Overwrite_Set(void)
Sets the ADC1 channel 2 result register to "overwrite".
Definition: adc1.h:2830
#define ADC1_MASK_P22
ADC1 Sequencer/ESM channel selection macro, channel 2 - P2.2.
Definition: adc1.h:209

◆ ADC1_Ch2_Result_Get()

INLINE uint16 ADC1_Ch2_Result_Get ( void  )

Reads the converted value from the channel 2 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch2_ResultValid_Get() == 1u )
{
adc_result = ADC1_Ch2_Result_Get();
}
}
INLINE uint16 ADC1_Ch2_Result_Get(void)
Reads the converted value from the channel 2 result register.
Definition: adc1.h:1465

◆ ADC1_Ch2_ResultValid_Get()

INLINE uint8 ADC1_Ch2_ResultValid_Get ( void  )

Reads the valid flag for the channel 2 (P2.2) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch2_ResultValid_Get() == 1u )
{
adc_result = ADC1_P22_Result_Get();
}
}

◆ ADC1_Ch2_Sample_Time_Set()

INLINE void ADC1_Ch2_Sample_Time_Set ( uint32  stc)

Sets the ADC1 channel 2 number of sampling ticks.

Note
The effective sampling time is calculated by: \(t_{sample} = \frac{2+stc}{f_{ADC1}}\).
Parameters
stcsampling tick count

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch2_Sample_Time_Set(uint32 stc)
Sets the ADC1 channel 2 number of sampling ticks.
Definition: adc1.h:2534

◆ ADC1_Ch2_WaitForRead_Set()

INLINE void ADC1_Ch2_WaitForRead_Set ( void  )

Sets the ADC1 channel 2 result register to "wait for read".

Note
A valid result will not be overwritten by a subsequent conversion until the result is read.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch2_ResultValid_Get() == 1u )
{
adc_result = ADC1_P22_Result_Get();
}
}
INLINE void ADC1_Ch2_WaitForRead_Set(void)
Sets the ADC1 channel 2 result register to "wait for read".
Definition: adc1.h:2800

◆ ADC1_Ch3_DataWidth_10bit_Set()

INLINE void ADC1_Ch3_DataWidth_10bit_Set ( void  )

Sets the ADC1 channel 3 conversion data width to 10-bit.

Note
The 10-bit word is left aligned in the 12-bit result value, ADC1_P23_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch3_DataWidth_10bit_Set(void)
Sets the ADC1 channel 3 conversion data width to 10-bit.
Definition: adc1.h:2291
#define ADC1_P23
ADC1 channel selection macro, channel 3 - P2.3.
Definition: adc1.h:180

◆ ADC1_Ch3_DataWidth_8bit_Set()

INLINE void ADC1_Ch3_DataWidth_8bit_Set ( void  )

Sets the ADC1 channel 3 conversion data width to 8-bit.

Note
The 8-bit word is left aligned in the 12-bit result value, ADC1_P23_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch3_DataWidth_8bit_Set(void)
Sets the ADC1 channel 3 conversion data width to 8-bit.
Definition: adc1.h:2265

◆ ADC1_Ch3_Int_Clr()

INLINE void ADC1_Ch3_Int_Clr ( void  )

clears ADC1 Channel 3 Interrupt flag.

Example

This example treats the ADC1 Channel 3 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH3_STS == 1u)
{
ADC1_CH3_CALLBACK();
}
}
INLINE void ADC1_Ch3_Int_En(void)
enables ADC1 Channel 3 Interrupt.
Definition: adc1.h:3630
INLINE void ADC1_Ch3_Int_Clr(void)
clears ADC1 Channel 3 Interrupt flag.
Definition: adc1.h:3363

◆ ADC1_Ch3_Int_Dis()

INLINE void ADC1_Ch3_Int_Dis ( void  )

disables ADC1 Channel 3 Interrupt.

Example

This example treats the ADC1 Channel 3 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH3_STS == 1u)
{
ADC1_CH3_CALLBACK();
}
}
INLINE void ADC1_Ch3_Int_Dis(void)
disables ADC1 Channel 3 Interrupt.
Definition: adc1.h:3653

◆ ADC1_Ch3_Int_En()

INLINE void ADC1_Ch3_Int_En ( void  )

enables ADC1 Channel 3 Interrupt.

Example

This example treats the ADC1 Channel 3 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH3_STS == 1u)
{
ADC1_CH3_CALLBACK();
}
}

◆ ADC1_Ch3_Overwrite_Set()

INLINE void ADC1_Ch3_Overwrite_Set ( void  )

Sets the ADC1 channel 3 result register to "overwrite".

Note
A valid result will be overwritten by a subsequent conversion, a previous unread conversion is lost.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch3_ResultValid_Get() == 1u )
{
adc_result = ADC1_P23_Result_Get();
}
}
INLINE uint8 ADC1_Ch3_ResultValid_Get(void)
Reads the valid flag for the channel 3 (P2.3) result.
Definition: adc1.h:1954
INLINE uint16 ADC1_P23_Result_Get(void)
Reads the converted value from the channel 3 result register.
Definition: adc1.h:1736
#define ADC1_MASK_P23
ADC1 Sequencer/ESM channel selection macro, channel 3 - P2.3.
Definition: adc1.h:211
INLINE void ADC1_Ch3_Overwrite_Set(void)
Sets the ADC1 channel 3 result register to "overwrite".
Definition: adc1.h:2890

◆ ADC1_Ch3_Result_Get()

INLINE uint16 ADC1_Ch3_Result_Get ( void  )

Reads the converted value from the channel 3 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch3_ResultValid_Get() == 1u )
{
adc_result = ADC1_Ch3_Result_Get();
}
}
INLINE uint16 ADC1_Ch3_Result_Get(void)
Reads the converted value from the channel 3 result register.
Definition: adc1.h:1495

◆ ADC1_Ch3_ResultValid_Get()

INLINE uint8 ADC1_Ch3_ResultValid_Get ( void  )

Reads the valid flag for the channel 3 (P2.3) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch3_ResultValid_Get() == 1u )
{
adc_result = ADC1_P23_Result_Get();
}
}

◆ ADC1_Ch3_Sample_Time_Set()

INLINE void ADC1_Ch3_Sample_Time_Set ( uint32  stc)

Sets the ADC1 channel 3 number of sampling ticks.

Note
The effective sampling time is calculated by: \(t_{sample} = \frac{2+stc}{f_{ADC1}}\).
Parameters
stcsampling tick count

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch3_Sample_Time_Set(uint32 stc)
Sets the ADC1 channel 3 number of sampling ticks.
Definition: adc1.h:2563

◆ ADC1_Ch3_WaitForRead_Set()

INLINE void ADC1_Ch3_WaitForRead_Set ( void  )

Sets the ADC1 channel 3 result register to "wait for read".

Note
A valid result will not be overwritten by a subsequent conversion until the result is read.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch3_ResultValid_Get() == 1u )
{
adc_result = ADC1_P23_Result_Get();
}
}
INLINE void ADC1_Ch3_WaitForRead_Set(void)
Sets the ADC1 channel 3 result register to "wait for read".
Definition: adc1.h:2860

◆ ADC1_Ch4_DataWidth_10bit_Set()

INLINE void ADC1_Ch4_DataWidth_10bit_Set ( void  )

Sets the ADC1 channel 4 conversion data width to 10-bit.

Note
The 10-bit word is left aligned in the 12-bit result value, ADC1_P24_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
#define ADC1_P24
ADC1 channel selection macro, channel 4 - P2.4.
Definition: adc1.h:182
INLINE void ADC1_Ch4_DataWidth_10bit_Set(void)
Sets the ADC1 channel 4 conversion data width to 10-bit.
Definition: adc1.h:2343

◆ ADC1_Ch4_DataWidth_8bit_Set()

INLINE void ADC1_Ch4_DataWidth_8bit_Set ( void  )

Sets the ADC1 channel 4 conversion data width to 8-bit.

Note
The 8-bit word is left aligned in the 12-bit result value, ADC1_P24_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch4_DataWidth_8bit_Set(void)
Sets the ADC1 channel 4 conversion data width to 8-bit.
Definition: adc1.h:2317

◆ ADC1_Ch4_Int_Clr()

INLINE void ADC1_Ch4_Int_Clr ( void  )

clears ADC1 Channel 4 Interrupt flag.

Example

This example treats the ADC1 Channel 4 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH4_STS == 1u)
{
ADC1_CH4_CALLBACK();
}
}
INLINE void ADC1_Ch4_Int_Clr(void)
clears ADC1 Channel 4 Interrupt flag.
Definition: adc1.h:3385
INLINE void ADC1_Ch4_Int_En(void)
enables ADC1 Channel 4 Interrupt.
Definition: adc1.h:3675

◆ ADC1_Ch4_Int_Dis()

INLINE void ADC1_Ch4_Int_Dis ( void  )

disables ADC1 Channel 4 Interrupt.

Example

This example treats the ADC1 Channel 4 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH4_STS == 1u)
{
ADC1_CH4_CALLBACK();
}
}
INLINE void ADC1_Ch4_Int_Dis(void)
disables ADC1 Channel 4 Interrupt.
Definition: adc1.h:3698

◆ ADC1_Ch4_Int_En()

INLINE void ADC1_Ch4_Int_En ( void  )

enables ADC1 Channel 4 Interrupt.

Example

This example treats the ADC1 Channel 4 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH4_STS == 1u)
{
ADC1_CH4_CALLBACK();
}
}

◆ ADC1_Ch4_Overwrite_Set()

INLINE void ADC1_Ch4_Overwrite_Set ( void  )

Sets the ADC1 channel 4 result register to "overwrite".

Note
A valid result will be overwritten by a subsequent conversion, a previous unread conversion is lost.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch4_ResultValid_Get() == 1u )
{
adc_result = ADC1_P24_Result_Get();
}
}
INLINE uint16 ADC1_P24_Result_Get(void)
Reads the converted value from the channel 4 result register.
Definition: adc1.h:1766
#define ADC1_MASK_P24
ADC1 Sequencer/ESM channel selection macro, channel 4 - P2.4.
Definition: adc1.h:213
INLINE void ADC1_Ch4_Overwrite_Set(void)
Sets the ADC1 channel 4 result register to "overwrite".
Definition: adc1.h:2950
INLINE uint8 ADC1_Ch4_ResultValid_Get(void)
Reads the valid flag for the channel 4 (P2.4) result.
Definition: adc1.h:1986

◆ ADC1_Ch4_Result_Get()

INLINE uint16 ADC1_Ch4_Result_Get ( void  )

Reads the converted value from the channel 4 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch4_ResultValid_Get() == 1u )
{
adc_result = ADC1_Ch4_Result_Get();
}
}
INLINE uint16 ADC1_Ch4_Result_Get(void)
Reads the converted value from the channel 4 result register.
Definition: adc1.h:1525

◆ ADC1_Ch4_ResultValid_Get()

INLINE uint8 ADC1_Ch4_ResultValid_Get ( void  )

Reads the valid flag for the channel 4 (P2.4) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch4_ResultValid_Get() == 1u )
{
adc_result = ADC1_P24_Result_Get();
}
}

◆ ADC1_Ch4_Sample_Time_Set()

INLINE void ADC1_Ch4_Sample_Time_Set ( uint32  stc)

Sets the ADC1 channel 4 number of sampling ticks.

Note
The effective sampling time is calculated by: \(t_{sample} = \frac{2+stc}{f_{ADC1}}\).
Parameters
stcsampling tick count

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch4_Sample_Time_Set(uint32 stc)
Sets the ADC1 channel 4 number of sampling ticks.
Definition: adc1.h:2592

◆ ADC1_Ch4_WaitForRead_Set()

INLINE void ADC1_Ch4_WaitForRead_Set ( void  )

Sets the ADC1 channel 4 result register to "wait for read".

Note
A valid result will not be overwritten by a subsequent conversion until the result is read.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch4_ResultValid_Get() == 1u )
{
adc_result = ADC1_P24_Result_Get();
}
}
INLINE void ADC1_Ch4_WaitForRead_Set(void)
Sets the ADC1 channel 4 result register to "wait for read".
Definition: adc1.h:2920

◆ ADC1_Ch5_DataWidth_10bit_Set()

INLINE void ADC1_Ch5_DataWidth_10bit_Set ( void  )

Sets the ADC1 channel 5 conversion data width to 10-bit.

Note
The 10-bit word is left aligned in the 12-bit result value, ADC1_P25_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
#define ADC1_P25
ADC1 channel selection macro, channel 5 - P2.5.
Definition: adc1.h:184
INLINE void ADC1_Ch5_DataWidth_10bit_Set(void)
Sets the ADC1 channel 5 conversion data width to 10-bit.
Definition: adc1.h:2395

◆ ADC1_Ch5_DataWidth_8bit_Set()

INLINE void ADC1_Ch5_DataWidth_8bit_Set ( void  )

Sets the ADC1 channel 5 conversion data width to 8-bit.

Note
The 8-bit word is left aligned in the 12-bit result value, ADC1_P25_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch5_DataWidth_8bit_Set(void)
Sets the ADC1 channel 5 conversion data width to 8-bit.
Definition: adc1.h:2369

◆ ADC1_Ch5_Int_Clr()

INLINE void ADC1_Ch5_Int_Clr ( void  )

clears ADC1 Channel 5 Interrupt flag.

Example

This example treats the ADC1 Channel 5 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH5_STS == 1u)
{
ADC1_CH5_CALLBACK();
}
}
INLINE void ADC1_Ch5_Int_Clr(void)
clears ADC1 Channel 5 Interrupt flag.
Definition: adc1.h:3406
INLINE void ADC1_Ch5_Int_En(void)
enables ADC1 Channel 5 Interrupt.
Definition: adc1.h:3720

◆ ADC1_Ch5_Int_Dis()

INLINE void ADC1_Ch5_Int_Dis ( void  )

disables ADC1 Channel 5 Interrupt.

Example

This example treats the ADC1 Channel 5 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH5_STS == 1u)
{
ADC1_CH5_CALLBACK();
}
}
INLINE void ADC1_Ch5_Int_Dis(void)
disables ADC1 Channel 5 Interrupt.
Definition: adc1.h:3743

◆ ADC1_Ch5_Int_En()

INLINE void ADC1_Ch5_Int_En ( void  )

enables ADC1 Channel 5 Interrupt.

Example

This example treats the ADC1 Channel 5 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH5_STS == 1u)
{
ADC1_CH5_CALLBACK();
}
}

◆ ADC1_Ch5_Overwrite_Set()

INLINE void ADC1_Ch5_Overwrite_Set ( void  )

Sets the ADC1 channel 5 result register to "overwrite".

Note
A valid result will be overwritten by a subsequent conversion, a previous unread conversion is lost.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch5_ResultValid_Get() == 1u )
{
adc_result = ADC1_P25_Result_Get();
}
}
INLINE uint16 ADC1_P25_Result_Get(void)
Reads the converted value from the channel 5 result register.
Definition: adc1.h:1796
#define ADC1_MASK_P25
ADC1 Sequencer/ESM channel selection macro, channel 5 - P2.5.
Definition: adc1.h:215
INLINE void ADC1_Ch5_Overwrite_Set(void)
Sets the ADC1 channel 5 result register to "overwrite".
Definition: adc1.h:3010
INLINE uint8 ADC1_Ch5_ResultValid_Get(void)
Reads the valid flag for the channel 5 (P2.5) result.
Definition: adc1.h:2018

◆ ADC1_Ch5_Result_Get()

INLINE uint16 ADC1_Ch5_Result_Get ( void  )

Reads the converted value from the channel 5 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch5_ResultValid_Get() == 1u )
{
adc_result = ADC1_Ch5_Result_Get();
}
}
INLINE uint16 ADC1_Ch5_Result_Get(void)
Reads the converted value from the channel 5 result register.
Definition: adc1.h:1555

◆ ADC1_Ch5_ResultValid_Get()

INLINE uint8 ADC1_Ch5_ResultValid_Get ( void  )

Reads the valid flag for the channel 5 (P2.5) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch5_ResultValid_Get() == 1u )
{
adc_result = ADC1_P25_Result_Get();
}
}

◆ ADC1_Ch5_Sample_Time_Set()

INLINE void ADC1_Ch5_Sample_Time_Set ( uint32  stc)

Sets the ADC1 channel 5 number of sampling ticks.

Note
The effective sampling time is calculated by: \(t_{sample} = \frac{2+stc}{f_{ADC1}}\).
Parameters
stcsampling tick count

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch5_Sample_Time_Set(uint32 stc)
Sets the ADC1 channel 5 number of sampling ticks.
Definition: adc1.h:2621

◆ ADC1_Ch5_WaitForRead_Set()

INLINE void ADC1_Ch5_WaitForRead_Set ( void  )

Sets the ADC1 channel 5 result register to "wait for read".

Note
A valid result will not be overwritten by a subsequent conversion until the result is read.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch5_ResultValid_Get() == 1u )
{
adc_result = ADC1_P25_Result_Get();
}
}
INLINE void ADC1_Ch5_WaitForRead_Set(void)
Sets the ADC1 channel 5 result register to "wait for read".
Definition: adc1.h:2980

◆ ADC1_Ch6_DataWidth_10bit_Set()

INLINE void ADC1_Ch6_DataWidth_10bit_Set ( void  )

Sets the ADC1 channel 6 conversion data width to 10-bit.

Note
The 10-bit word is left aligned in the 12-bit result value, ADC1_VDH_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
#define ADC1_VDH
ADC1 channel selection macro, channel 6 - P2.6.
Definition: adc1.h:186
INLINE void ADC1_Ch6_DataWidth_10bit_Set(void)
Sets the ADC1 channel 6 conversion data width to 10-bit.
Definition: adc1.h:2447

◆ ADC1_Ch6_DataWidth_8bit_Set()

INLINE void ADC1_Ch6_DataWidth_8bit_Set ( void  )

Sets the ADC1 channel 6 conversion data width to 8-bit.

Note
The 8-bit word is left aligned in the 12-bit result value, ADC1_VDH_Result_Get.

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch6_DataWidth_8bit_Set(void)
Sets the ADC1 channel 6 conversion data width to 8-bit.
Definition: adc1.h:2421

◆ ADC1_Ch6_Int_Clr()

INLINE void ADC1_Ch6_Int_Clr ( void  )

clears ADC1 Channel 6 Interrupt flag.

Example

This example treats the ADC1 Channel 6 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH6_STS == 1u)
{
ADC1_CH6_CALLBACK();
}
}
INLINE void ADC1_Ch6_Int_Clr(void)
clears ADC1 Channel 6 Interrupt flag.
Definition: adc1.h:3428
INLINE void ADC1_Ch6_Int_En(void)
enables ADC1 Channel 6 Interrupt.
Definition: adc1.h:3765

◆ ADC1_Ch6_Int_Dis()

INLINE void ADC1_Ch6_Int_Dis ( void  )

disables ADC1 Channel 6 Interrupt.

Example

This example treats the ADC1 Channel 6 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH6_STS == 1u)
{
ADC1_CH6_CALLBACK();
}
}
INLINE void ADC1_Ch6_Int_Dis(void)
disables ADC1 Channel 6 Interrupt.
Definition: adc1.h:3788

◆ ADC1_Ch6_Int_En()

INLINE void ADC1_Ch6_Int_En ( void  )

enables ADC1 Channel 6 Interrupt.

Example

This example treats the ADC1 Channel 6 Interrupt.

void Example_Function(void)
{
if (ADC1->IS.bit.CH6_STS == 1u)
{
ADC1_CH6_CALLBACK();
}
}

◆ ADC1_Ch6_Overwrite_Set()

INLINE void ADC1_Ch6_Overwrite_Set ( void  )

Sets the ADC1 channel 6 result register to "overwrite".

Note
A valid result will be overwritten by a subsequent conversion, a previous unread conversion is lost.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch6_ResultValid_Get() == 1u )
{
adc_result = ADC1_P26_Result_Get();
}
}
#define ADC1_MASK_VDH
ADC1 Sequencer/ESM channel selection macro, channel 6 - P2.6.
Definition: adc1.h:217
INLINE void ADC1_Ch6_Overwrite_Set(void)
Sets the ADC1 channel 6 result register to "overwrite".
Definition: adc1.h:3070
INLINE uint8 ADC1_Ch6_ResultValid_Get(void)
Reads the valid flag for the channel 6 (VDH) result.
Definition: adc1.h:2050

◆ ADC1_Ch6_Result_Get()

INLINE uint16 ADC1_Ch6_Result_Get ( void  )

Reads the converted value from the channel 6 (VDH) result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch6_ResultValid_Get() == 1u )
{
adc_result = ADC1_Ch6_Result_Get();
}
}
INLINE uint16 ADC1_Ch6_Result_Get(void)
Reads the converted value from the channel 6 (VDH) result register.
Definition: adc1.h:1585

◆ ADC1_Ch6_ResultValid_Get()

INLINE uint8 ADC1_Ch6_ResultValid_Get ( void  )

Reads the valid flag for the channel 6 (VDH) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch6_ResultValid_Get() == 1u )
{
adc_result = ADC1_VDH_Result_Get();
}
}
INLINE uint16 ADC1_VDH_Result_Get(void)
Reads the converted value from the channel 6 (VDH) result register.
Definition: adc1.h:1826

◆ ADC1_Ch6_Sample_Time_Set()

INLINE void ADC1_Ch6_Sample_Time_Set ( uint32  stc)

Sets the ADC1 channel 6 number of sampling ticks.

Note
The effective sampling time is calculated by: \(t_{sample} = \frac{2+stc}{f_{ADC1}}\).
Parameters
stcsampling tick count

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE void ADC1_Ch6_Sample_Time_Set(uint32 stc)
Sets the ADC1 channel 6 number of sampling ticks.
Definition: adc1.h:2650

◆ ADC1_Ch6_WaitForRead_Set()

INLINE void ADC1_Ch6_WaitForRead_Set ( void  )

Sets the ADC1 channel 6 result register to "wait for read".

Note
A valid result will not be overwritten by a subsequent conversion until the result is read.

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch6_ResultValid_Get() == 1u )
{
adc_result = ADC1_VDH_Result_Get();
}
}
INLINE void ADC1_Ch6_WaitForRead_Set(void)
Sets the ADC1 channel 6 result register to "wait for read".
Definition: adc1.h:3040

◆ ADC1_CSA_Result_Get()

INLINE uint16 ADC1_CSA_Result_Get ( void  )

Reads the converted value from the channel 1 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 1 (CSA) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch1_ResultValid_Get() == 1u )
{
adc_result = ADC1_CSA_Result_Get();
}
}

◆ ADC1_Current_Active_Channel_Sts()

INLINE uint8 ADC1_Current_Active_Channel_Sts ( void  )

Reads the currently active channel.

Returns
uint8, number of the current channel, values between 0..13

Example

This example enables ADC1 and switches to Software Mode and reads the currently active channel 6.

void Example_Function(void)
{
ADC1_SW_Channel_Sel( ADC1_P20 );
while (ADC1_Current_Active_Channel_Sts() & 0x6 != 0x6)
{
}
}
INLINE uint8 ADC1_Current_Active_Channel_Sts(void)
Reads the currently active channel.
Definition: adc1.h:1192

◆ ADC1_Current_Active_Sequence_Sts()

INLINE uint8 ADC1_Current_Active_Sequence_Sts ( void  )

Reads the currently active channel in Sequencer Mode.

Returns
uint8, number of the current channel, values between 0..13

Example

This example enables ADC1 and switches to Sequencer Mode and reads the currently active channel in Sequencer Mode.

void Example_Function(void)
{
ADC1_SW_Channel_Sel( ADC1_P20 );
while (ADC1_Current_Active_Sequence_Sts() & 0x6 != 0x6)
{
}
}
INLINE uint8 ADC1_Current_Active_Sequence_Sts(void)
Reads the currently active channel in Sequencer Mode.
Definition: adc1.h:1168

◆ ADC1_Current_Ch_Sts()

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.

Returns
uint8, channel number

Example

This example reads the current channel number into 'ch_no'.

void Example_Function(void)
{
uint8 ch_no;
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE uint8 ADC1_Current_Ch_Sts(void)
Reads the channel for currently ongoing conversion, if no conversion is ongoing, then it returns the ...
Definition: adc1.h:1027
uint8_t uint8
8 bit unsigned value
Definition: types.h:153

◆ ADC1_DIVA_Set()

INLINE void ADC1_DIVA_Set ( uint32  a)

ADC1 analog clock divider. \(f_{ADC1} = \frac{f_{SYS}}{DIVA}\).

Parameters
adivision 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.

void Example_Function(void)
{
//fADC1 = fSYS / 2
}

◆ ADC1_EIM_Active_Sts()

INLINE uint8 ADC1_EIM_Active_Sts ( void  )

Reads the active status of the Exceptional Interrupt Measurement (EIM).

Return values
1EIM ongoing
0no EIM active

Example

This example enables ADC1 and switches to Sequencer Mode and reads the active status of the Exceptional Interrupt Measurement (EIM).

void Example_Function(void)
{
while (ADC1_EIM_Active_Sts() == 0u)
{
}
}
INLINE uint8 ADC1_EIM_Active_Sts(void)
Reads the active status of the Exceptional Interrupt Measurement (EIM).
Definition: adc1.h:1118
INLINE void ADC1_EIM_Channel_Set(uint32 ch)
Set EIM channel for measurement.
Definition: adc1.h:3101

◆ ADC1_EIM_Channel_Set()

INLINE void ADC1_EIM_Channel_Set ( uint32  ch)

Set EIM channel for measurement.

Parameters
chchannel to be measured

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
while ( ADC1_EIM_ResultValid_Get() == 0u )
{
}
adc_result = ADC1_EIM_Result_Get();
}
#define ADC1_CH2
ADC1 channel selection macro, channel 2 - P2.2.
Definition: adc1.h:161
INLINE uint16 ADC1_EIM_Result_Get(void)
Reads the converted value from the EIM result register.
Definition: adc1.h:1616
INLINE uint8 ADC1_EIM_ResultValid_Get(void)
Reads the valid flag for the channel 6 (VDH) result.
Definition: adc1.h:2083

◆ ADC1_EIM_Int_Clr()

INLINE void ADC1_EIM_Int_Clr ( void  )

clears Exceptional Interrupt Measurement (EIM) flag.

Example

This example treats the Exceptional Interrupt Measurement (EIM).

void Example_Function(void)
{
ADC1_EIM_En();
if (ADC1->IS.bit.EIM_STS == 1u)
{
ADC1_EIM_CALLBACK();
}
}
INLINE void ADC1_EIM_Int_Clr(void)
clears Exceptional Interrupt Measurement (EIM) flag.
Definition: adc1.h:3451
INLINE void ADC1_EIM_Int_En(void)
enables Exceptional Interrupt Measurement (EIM).
Definition: adc1.h:3811

◆ ADC1_EIM_Int_Dis()

INLINE void ADC1_EIM_Int_Dis ( void  )

disables Exceptional Interrupt Measurement (EIM).

Example

This example treats the Exceptional Interrupt Measurement (EIM).

void Example_Function(void)
{
ADC1_EIM_En();
if (ADC1->IS.bit.EIM_STS == 1u)
{
ADC1_EIM_CALLBACK();
}
}
INLINE void ADC1_EIM_Int_Dis(void)
disables Exceptional Interrupt Measurement (EIM).
Definition: adc1.h:3835

◆ ADC1_EIM_Int_En()

INLINE void ADC1_EIM_Int_En ( void  )

enables Exceptional Interrupt Measurement (EIM).

Example

This example treats the Exceptional Interrupt Measurement (EIM).

void Example_Function(void)
{
ADC1_EIM_En();
if (ADC1->IS.bit.EIM_STS == 1u)
{
ADC1_EIM_CALLBACK();
}
}

◆ ADC1_EIM_Repeat_Counter_Set()

INLINE void ADC1_EIM_Repeat_Counter_Set ( TADC1_EIM_REP_CNT  repcnt)

Set ADC1 EIM Repeat Counter.

Parameters
repcntrepeat counter for EIM measurement, TADC1_EIM_REP_CNT

Example

This example enables ADC1 and configures EIM Repeat Counter as 4 Measures.

void Example_Function(void)
{
}
@ ADC1_4_Meas
Definition: adc1.h:274
INLINE void ADC1_EIM_Repeat_Counter_Set(TADC1_EIM_REP_CNT repcnt)
Set ADC1 EIM Repeat Counter.
Definition: adc1.h:4032

◆ ADC1_EIM_Result_Get()

INLINE uint16 ADC1_EIM_Result_Get ( void  )

Reads the converted value from the EIM result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
while ( ADC1_EIM_ResultValid_Get() == 0u )
{
}
adc_result = ADC1_EIM_Result_Get();
}

◆ ADC1_EIM_ResultValid_Get()

INLINE uint8 ADC1_EIM_ResultValid_Get ( void  )

Reads the valid flag for the channel 6 (VDH) result.

Note
The flag gets reset by reading.
Return values
1if result is valid
0if 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.

void Example_Function(void)
{
uint16 adc_result;
while ( ADC1_EIM_ResultValid_Get() == 0u )
{
}
adc_result = ADC1_EIM_Result_Get();
}

◆ ADC1_EIM_Trigger_Select()

INLINE void ADC1_EIM_Trigger_Select ( TADC1_TRIGG_SEL  trigsel)

Get ADC1 EIM Trigger Selection.

Parameters
trigselTrigger select, TADC1_TRIGG_SEL

Example

This example enables ADC1 and configures EIM Trigger Selection as Timer2.

void Example_Function(void)
{
}
@ ADC1_Trigg_Timer2
Definition: adc1.h:258
INLINE void ADC1_EIM_Trigger_Select(TADC1_TRIGG_SEL trigsel)
Get ADC1 EIM Trigger Selection.
Definition: adc1.h:4026

◆ ADC1_EOC_Sts()

INLINE uint8 ADC1_EOC_Sts ( void  )

Reads the End-of-Conversion status.

Return values
1if conversion has ended
0if conversion still ongoing

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
while ( ADC1_EOC_Sts() != 1u ) {}
}

◆ ADC1_ESM_Active_Sts()

INLINE uint8 ADC1_ESM_Active_Sts ( void  )

Reads the active status of the Exceptional Sequencer Measurement (ESM).

Return values
1ESM ongoing
0no ESM active

Example

This example enables ADC1 and switches to Sequencer Mode and reads the active status of the Exceptional Sequencer Measurement (ESM).

void Example_Function(void)
{
while (ADC1_ESM_Active_Sts() == 0u)
{
}
}
INLINE uint8 ADC1_ESM_Active_Sts(void)
Reads the active status of the Exceptional Sequencer Measurement (ESM).
Definition: adc1.h:1144
INLINE void ADC1_ESM_Channel_Set(uint32 mask_ch)
Set channels in ESM sequence.
Definition: adc1.h:3132

◆ ADC1_ESM_Channel_Set()

INLINE void ADC1_ESM_Channel_Set ( uint32  mask_ch)

Set channels in ESM sequence.

Parameters
mask_chbit 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.

◆ ADC1_ESM_Int_Clr()

INLINE void ADC1_ESM_Int_Clr ( void  )

clears Exceptional Sequence Measurement (ESM) flag.

Example

This example treats the Exceptional Sequence Measurement (ESM).

void Example_Function(void)
{
if (ADC1->IS.bit.ESM_STS == 1u)
{
ADC1_ESM_CALLBACK();
}
}
INLINE void ADC1_ESM_Int_En(void)
enables Exceptional Sequence Measurement (ESM).
Definition: adc1.h:3857
INLINE void ADC1_ESM_Int_Clr(void)
clears Exceptional Sequence Measurement (ESM) flag.
Definition: adc1.h:3473

◆ ADC1_ESM_Int_Dis()

INLINE void ADC1_ESM_Int_Dis ( void  )

disables Exceptional Sequence Measurement (ESM).

Example

This example treats the Exceptional Sequence Measurement (ESM).

void Example_Function(void)
{
if (ADC1->IS.bit.ESM_STS == 1u)
{
ADC1_ESM_CALLBACK();
}
}
INLINE void ADC1_ESM_Int_Dis(void)
disables Exceptional Sequence Measurement (ESM).
Definition: adc1.h:3880

◆ ADC1_ESM_Int_En()

INLINE void ADC1_ESM_Int_En ( void  )

enables Exceptional Sequence Measurement (ESM).

Example

This example treats the Exceptional Sequence Measurement (ESM).

void Example_Function(void)
{
if (ADC1->IS.bit.ESM_STS == 1u)
{
ADC1_ESM_CALLBACK();
}
}

◆ ADC1_ESM_Trigger_Select()

INLINE void ADC1_ESM_Trigger_Select ( TADC1_TRIGG_SEL  trigsel)

Set ADC1 ESM Trigger Selection.

Parameters
trigselTrigger select, TADC1_TRIGG_SEL

Example

This example enables ADC1 and configures ESM Trigger Selection as Timer2.

void Example_Function(void)
{
}
INLINE void ADC1_ESM_Trigger_Select(TADC1_TRIGG_SEL trigsel)
Set ADC1 ESM Trigger Selection.
Definition: adc1.h:4038

◆ ADC1_GetChResult()

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.

Note
This function violates [MISRA Rule 45]
Parameters
channelchannel number (defined in adc1.h)
[out]*pVar10-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)
Return values
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).

void Example_Function(void)
{
bool value_valid;
uint16 var_mV;
uint16 var;
if (ADC1_GetChResult(&var, ADC1_CH5) == true)
{
value_valid = ADC1_GetChResult_mV(&var_mV, ADC1_CH5);
}
return(value_valid);
}
#define ADC1_CH5
ADC1 channel selection macro, channel 5 - P2.5.
Definition: adc1.h:167
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 v...
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 ...

◆ ADC1_GetChResult_mV()

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.

Parameters
channelchannel number(defined in adc1.h)
[out]*pVar_mVADC1 Result Register value of the selected channel number converted to Millivolt (mV)
Return values
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).

void Example_Function(void)
{
bool value_valid;
uint16 var_mV;
uint16 var;
if (ADC1_GetChResult(&var, ADC1_CH5) == true)
{
value_valid = ADC1_GetChResult_mV(&var_mV, ADC1_CH5);
}
return(value_valid);
}

◆ ADC1_GetEIMResult()

bool ADC1_GetEIMResult ( uint16 pVar)

Get the 10-bit/8-bit value of the ADC1 EIM Result Register and returns the validity info.

Parameters
[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)
Return values
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.

void Example_Function(void)
{
bool value_valid;
uint16 var_mV;
uint16 var;
if (ADC1_GetEIMResult(&var) == true)
{
value_valid = ADC1_GetEIMResult_mV(&var_mV);
}
return(value_valid);
}
INLINE void ADC1_SetEIMChannel(uint8 channel)
Set(Change) ADC1 EIM channel.
Definition: adc1.h:3966
bool ADC1_GetEIMResult(uint16 *pVar)
Get the 10-bit/8-bit value of the ADC1 EIM Result Register and returns the validity info.
bool ADC1_GetEIMResult_mV(uint16 *pVar_mV)
Get the value of the ADC1 EIM Result Register in Millivolt (mV) and returns the validity info.

◆ ADC1_GetEIMResult_mV()

bool ADC1_GetEIMResult_mV ( uint16 pVar_mV)

Get the value of the ADC1 EIM Result Register in Millivolt (mV) and returns the validity info.

Parameters
[out]*pVar_mVADC1 EIM Result Register value converted to Millivolt (mV)
Return values
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.

void Example_Function(void)
{
bool value_valid;
uint16 var_mV;
uint16 var;
if (ADC1_GetEIMResult(&var) == true)
{
value_valid = ADC1_GetEIMResult_mV(&var_mV);
}
return(value_valid);
}

◆ ADC1_GetEocSwMode()

INLINE bool ADC1_GetEocSwMode ( void  )

Get ADC1 end of conversion status.

Return values
trueconversion done
falseconversion ongoing

Example

This example enables ADC1 and switches to Software Mode, starts a measurement and waits for it to be finished.

void Example_Function(void)
{
ADC1_SOS_Set();
while ( ADC1_GetEocSwMode() == false ) {}
}
INLINE bool ADC1_GetEocSwMode(void)
Get ADC1 end of conversion status.
Definition: adc1.h:3988

◆ ADC1_GetSwModeResult()

INLINE bool ADC1_GetSwModeResult ( uint16 pVar)

Get ADC1 latest software mode result.

Parameters
[out]*pVarresult for the recent software mode conversion
Return values
true*pVar valid
false*pVar invalid

Example

This example returns the ADC1 latest software mode result in Millivolt (mV).

void Example_Function(void)
{
bool value_valid;
uint16 var_mV;
uint16 var;
if (ADC1_GetSwModeResult(&var) == true)
{
value_valid = ADC1_GetSwModeResult_mV(&var_mV);
}
return(value_valid);
}
INLINE bool ADC1_GetSwModeResult_mV(uint16 *pVar_mV)
Get ADC1 software mode result in Millivolt.
Definition: adc1.h:4007
INLINE bool ADC1_GetSwModeResult(uint16 *pVar)
Get ADC1 latest software mode result.
Definition: adc1.h:4000

◆ ADC1_GetSwModeResult_mV()

INLINE bool ADC1_GetSwModeResult_mV ( uint16 pVar_mV)

Get ADC1 software mode result in Millivolt.

Parameters
[out]*pVar_mVADC value in mV of the recent conversion
Return values
truepVar_mV valid
falsepVar_mV invalid

Example

This example returns the ADC1 latest software mode result in Millivolt (mV).

void Example_Function(void)
{
bool value_valid;
uint16 var_mV;
uint16 var;
if (ADC1_GetSwModeResult(&var) == true)
{
value_valid = ADC1_GetSwModeResult_mV(&var_mV);
}
return(value_valid);
}

◆ ADC1_Init()

void ADC1_Init ( void  )

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

◆ ADC1_isEIMactive()

INLINE bool ADC1_isEIMactive ( void  )

checks Exceptional Interrupt Mode active

Return values
trueEIM mode is active
falseEIM mode is not active

Example

This example enables ADC1 and switches to Sequencer Mode and checks if the Exceptional Interrupt Measurement (EIM) is active.

void Example_Function(void)
{
while (ADC1_isEIMactive() == false)
{
}
}
INLINE bool ADC1_isEIMactive(void)
checks Exceptional Interrupt Mode active
Definition: adc1.h:4056

◆ ADC1_isEndOfConversion()

INLINE bool ADC1_isEndOfConversion ( void  )

checks EndOfConversion ready (Software Mode)

Return values
trueconversion done
falseconversion ongoing

Example

This example enables ADC1 and switches to Software Mode and checks if EndOfConversion is ready.

void Example_Function(void)
{
ADC1_SOS_Set();
while ( ADC1_isEndOfConversion() == false ) {}
}
INLINE bool ADC1_isEndOfConversion(void)
checks EndOfConversion ready (Software Mode)
Definition: adc1.h:4044

◆ ADC1_isESMactive()

INLINE bool ADC1_isESMactive ( void  )

checks Exceptional Sequencer Mode active

Return values
trueESM mode is active
falseESM mode is not active

Example

This example enables ADC1 and switches to Sequencer Mode and checks if Exceptional Sequencer Measurement (ESM) is ready.

void Example_Function(void)
{
while (ADC1_isESMactive() == false)
{
}
}
INLINE bool ADC1_isESMactive(void)
checks Exceptional Sequencer Mode active
Definition: adc1.h:4068

◆ ADC1_P20_Result_Get()

INLINE uint16 ADC1_P20_Result_Get ( void  )

Reads the converted value from the channel 0 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 0 (P2.0) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch0_ResultValid_Get() == 1u )
{
adc_result = ADC1_P20_Result_Get();
}
}

◆ ADC1_P22_Result_Get()

INLINE uint16 ADC1_P22_Result_Get ( void  )

Reads the converted value from the channel 2 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 2 (P2.2) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch2_ResultValid_Get() == 1u )
{
adc_result = ADC1_P22_Result_Get();
}
}

◆ ADC1_P23_Result_Get()

INLINE uint16 ADC1_P23_Result_Get ( void  )

Reads the converted value from the channel 3 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 3 (P2.3) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch3_ResultValid_Get() == 1u )
{
adc_result = ADC1_P23_Result_Get();
}
}

◆ ADC1_P24_Result_Get()

INLINE uint16 ADC1_P24_Result_Get ( void  )

Reads the converted value from the channel 4 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 4 (P2.4) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch4_ResultValid_Get() == 1u )
{
adc_result = ADC1_P24_Result_Get();
}
}

◆ ADC1_P25_Result_Get()

INLINE uint16 ADC1_P25_Result_Get ( void  )

Reads the converted value from the channel 5 result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 5 (P2.5) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch5_ResultValid_Get() == 1u )
{
adc_result = ADC1_P25_Result_Get();
}
}

◆ ADC1_Power_Off()

INLINE void ADC1_Power_Off ( void  )

Disables the ADC1 module.

Example

This example disables the ADC1 module.

void Example_Function(void)
{
}
INLINE void ADC1_Power_Off(void)
Disables the ADC1 module.
Definition: adc1.h:850

◆ ADC1_Power_On()

INLINE void ADC1_Power_On ( void  )

Enables the ADC1 module.

Example

This example enables the ADC1 module.

void Example_Function(void)
{
}

◆ ADC1_Sample_Sts()

INLINE uint8 ADC1_Sample_Sts ( void  )

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

Return values
1sampling phase ongoing
0sampling phase done, or no measurement ongoing

Example

This example reads the sample status.

void Example_Function(void)
{
while ( ADC1_Sample_Sts() == 1u )
{
//sampling ongoing
}
while ( ADC1_EOC_Sts() != 1u ) {}
}
INLINE uint8 ADC1_Sample_Sts(void)
Reads the sample status of a ongoing measurement.
Definition: adc1.h:1060

◆ ADC1_Sequence0_Set()

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.

Parameters
mask_cha 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).

◆ ADC1_Sequence1_Set()

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.

Parameters
mask_cha 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).

void Example_Function(void)
{
}
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_M...
Definition: adc1.h:1237

◆ ADC1_Sequence2_Set()

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.

Parameters
mask_cha 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).

void Example_Function(void)
{
}
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_M...
Definition: adc1.h:1260

◆ ADC1_Sequence3_Set()

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.

Parameters
mask_cha 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).

void Example_Function(void)
{
}
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_M...
Definition: adc1.h:1283

◆ ADC1_Sequence4_Set()

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.

Parameters
mask_cha 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).

void Example_Function(void)
{
}
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_M...
Definition: adc1.h:1306

◆ ADC1_Sequence5_Set()

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.

Parameters
mask_cha 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).

void Example_Function(void)
{
}
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_M...
Definition: adc1.h:1329

◆ ADC1_Sequence6_Set()

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.

Parameters
mask_cha 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).

void Example_Function(void)
{
}
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_M...
Definition: adc1.h:1352

◆ ADC1_Sequence7_Set()

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.

Parameters
mask_cha 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).

void Example_Function(void)
{
}
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_M...
Definition: adc1.h:1375

◆ ADC1_Sequencer_Mode_Sel()

INLINE void ADC1_Sequencer_Mode_Sel ( void  )

ADC1 selects the Sequencer Mode.

Note
EIM/ESM measurements are only possible in Sequencer mode.

Example

This example enables ADC1 and switches to Sequencer Mode.

void Example_Function(void)
{
}

◆ ADC1_SetEIMChannel()

INLINE void ADC1_SetEIMChannel ( uint8  channel)

Set(Change) ADC1 EIM channel.

Parameters
channelchannel number to be converted
Returns
void

Example

This example enables ADC1 and switches to Sequencer Mode, programs channel 2 (P2.2) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
while (ADC1->FILT_OUTEIM.bit.VF_EIM == 0u)
{
}
adc_result = ADC1_EIM_Result_Get();
return(adc_result);
}

◆ ADC1_SetMode()

INLINE void ADC1_SetMode ( uint8  mode)

Start ADC1 conversion mode selection.

Parameters
modeSequencer mode, Software mode

Example

This example enables ADC1 and switches to Software Mode.

void Example_Function(void)
{
}
INLINE void ADC1_SetMode(uint8 mode)
Start ADC1 conversion mode selection.
Definition: adc1.h:3976
#define SW_MODE
ADC1 Mode Selection, Software Mode.
Definition: adc1.h:132

◆ ADC1_SetSocSwMode()

INLINE void ADC1_SetSocSwMode ( uint8  Ch)

Starts ADC1 software mode conversion.

Parameters
ChChannel to be converted

Example

This example enables ADC and starts SW_MODE conversion for channel 0.

void Example_Function(void)
{
}
INLINE void ADC1_SetSocSwMode(uint8 Ch)
Starts ADC1 software mode conversion.
Definition: adc1.h:3982

◆ ADC1_SetSwMode_Channel()

INLINE void ADC1_SetSwMode_Channel ( uint8  channel)

Selects a channel for the software conversion.

Parameters
channelchannel which should be measured

Example

This example starts an ADC1 conversion on channel 1 - CSA.

void Example_Function(void)
{
}
INLINE void ADC1_SetSwMode_Channel(uint8 channel)
Selects a channel for the software conversion.
Definition: adc1.h:3971

◆ ADC1_SOC_Set()

INLINE void ADC1_SOC_Set ( void  )

ADC1 Start of Conversion, for Software mode only.

Example

This example starts an ADC1 conversion.

void Example_Function(void)
{
}

◆ ADC1_Software_Mode_Sel()

INLINE void ADC1_Software_Mode_Sel ( void  )

ADC1 selects the Software Mode, measurements are performed on user request.

Note
EIM/ESM measurements are only possible in ADC1_Sequencer_Mode_Sel.

Example

This example enables ADC1 and switches to Software Mode.

◆ ADC1_SW_Ch_Sel()

INLINE void ADC1_SW_Ch_Sel ( uint32  a)

Selects a channel for the software conversion.

Parameters
achannel which should be measured

Example

This example starts an ADC1 conversion on channel 1 - CSA.

void Example_Function(void)
{
}

◆ ADC1_VDH_Attenuator_Off()

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.

uint16 Example_Function(void)
{
uint16 adc_result;
while ( ADC1_Ch6_ResultValid_Get() == 0u )
{
}
adc_result = ADC1_VDH_Result_Get();
return(adc_result);
}
INLINE void ADC1_VDH_Attenuator_Off(void)
Disables the input attenuator for VDH.
Definition: adc1.h:3203

◆ ADC1_VDH_Attenuator_On()

INLINE void ADC1_VDH_Attenuator_On ( void  )

Enables the input attenuator for VDH.

Note
If the input attenuator is disabled ADC1_VDH_Attenuator_Off then the VDH input is basically disconnected from the ADC1.Channel6 input.

Example

This example enables ADC1 and switches to Sequencer Mode, enables the input attenuator, programs channel 6 (VDH) and reads the result.

uint16 Example_Function(void)
{
uint16 adc_result;
while ( ADC1_Ch6_ResultValid_Get() == 0u )
{
}
adc_result = ADC1_VDH_Result_Get();
return(adc_result);
}
INLINE void ADC1_VDH_Attenuator_On(void)
Enables the input attenuator for VDH.
Definition: adc1.h:3168

◆ ADC1_VDH_Attenuator_Range_0_20V_Set()

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.

void Example_Function(void)
{
uint8 data;
}
INLINE void ADC1_VDH_Attenuator_Range_0_20V_Set(void)
sets the VDH Monitoring Input Attenuator Input Range to 0 - 22V.
Definition: adc1.h:3929

◆ ADC1_VDH_Attenuator_Range_0_30V_Set()

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.

void Example_Function(void)
{
uint8 data;
}
INLINE void ADC1_VDH_Attenuator_Range_0_30V_Set(void)
sets the VDH Monitoring Input Attenuator Input Range to 0 - 30V.
Definition: adc1.h:3905

◆ ADC1_VDH_Attenuator_Range_Get()

INLINE uint8 ADC1_VDH_Attenuator_Range_Get ( void  )

Reads the VDH Monitoring Input Attenuator Input Range Configuration.

Return values
10 - 30V Range is selected.
00 - 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.

void Example_Function(void)
{
uint8 data;
}
INLINE uint8 ADC1_VDH_Attenuator_Range_Get(void)
Reads the VDH Monitoring Input Attenuator Input Range Configuration.
Definition: adc1.h:3958

◆ ADC1_VDH_Attenuator_Zhigh_Set()

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.

uint16 Example_Function(void)
{
uint16 adc_result;
while ( ADC1_Ch6_ResultValid_Get() == 0u )
{
}
adc_result = ADC1_VDH_Result_Get();
return(adc_result);
}
INLINE void ADC1_VDH_Attenuator_Zhigh_Set(void)
Enables the output attenuator for VDH.
Definition: adc1.h:3239

◆ ADC1_VDH_Attenuator_Zlow_Set()

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.

uint16 Example_Function(void)
{
uint16 adc_result;
while ( ADC1_Ch6_ResultValid_Get() == 0u )
{
}
adc_result = ADC1_VDH_Result_Get();
return(adc_result);
}
INLINE void ADC1_VDH_Attenuator_Zlow_Set(void)
Disables the output attenuator for VDH.
Definition: adc1.h:3275

◆ ADC1_VDH_Result_Get()

INLINE uint16 ADC1_VDH_Result_Get ( void  )

Reads the converted value from the channel 6 (VDH) result register.

Returns
12-bit value, with left aligned 10-bit/8-bit result

Example

This example enables ADC1 and switches to Sequencer Mode, and programs channel 6 (VDH) and reads the result.

void Example_Function(void)
{
uint16 adc_result;
if ( ADC1_Ch6_ResultValid_Get() == 1u )
{
adc_result = ADC1_VDH_Result_Get();
}
}

◆ VAREF_Enable()

bool VAREF_Enable ( void  )

Re-enables the internal VAREF LDO in case it was shutdown due to a previous failure.

Return values
trueVAREF enabled
falseVAREF enabling failed

Example

This example checks if the internal VAREF LDO is re-enabling.

void Example_Function(void)
{
while(VAREF_Enable() == false)
{
}
}
bool VAREF_Enable(void)
Re-enables the internal VAREF LDO in case it was shutdown due to a previous failure.