![]() |
TLE986x Device Family SDK
|
Go to the source code of this file.
ADC2 low level access library.
Macros | |
#define | ADC2_VREF (1.211F) |
ADC2 \( V_{BG}\) in Volts. More... | |
#define | ADC2_VREF_mV (1211) |
ADC2 \( V_{BG}\) (1.211 V) in millivolts. More... | |
#define | ADC2_FILTOUT_MAX (1023u) |
ADC2 Filtered output register maximum value. More... | |
#define | VS_ATTEN_CONV_NOMIN_MAX28V (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VS: attenuator for VS Range 0..28V is 0.039 => Inverse fraction (1000/39) More... | |
#define | VS_ATTEN_CONV_DENOM_MAX28V (39u) |
#define | VS_ATTEN_CONV_NOMIN_MAX22V (200u) |
Nominator and Denominator of Attenuator Conversion formula for VS: attenuator for VS Range 0..22V is 0.055 => Inverse fraction (200/11) More... | |
#define | VS_ATTEN_CONV_DENOM_MAX22V (11u) |
#define | VSD_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VSD: attenuator for VSD is 0.039 => Inverse fraction (1000/39) More... | |
#define | VSD_ATTEN_CONV_DENOM (39u) |
#define | VCP_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VCP: attenuator for VCP is 0.023 => Inverse fraction (1000/23) More... | |
#define | VCP_ATTEN_CONV_DENOM (23u) |
#define | MON_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for MON: attenuator for MON is 0.039 => Inverse fraction (1000/39) More... | |
#define | MON_ATTEN_CONV_DENOM (39u) |
#define | VDDP_ATTEN_CONV_NOMIN (250u) |
Nominator and Denominator of Attenuator Conversion formula for VDDP: attenuator for VDDP is 0.164 => Inverse fraction (250/41) More... | |
#define | VDDP_ATTEN_CONV_DENOM (41u) |
#define | VAREF_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VAREF: attenuator for VAREF is 0.219 => Inverse fraction (1000/219) More... | |
#define | VAREF_ATTEN_CONV_DENOM (219u) |
#define | VBG_ATTEN_CONV_NOMIN (4u) |
Nominator and Denominator of Attenuator Conversion formula for VBG: attenuator for VBG is 0.75 => Inverse fraction (4/3) More... | |
#define | VBG_ATTEN_CONV_DENOM (3u) |
#define | VDDC_ATTEN_CONV_NOMIN (4u) |
Nominator and Denominator of Attenuator Conversion formula for VDDC: attenuator for VDDC is 0.75 => Inverse fraction (4/3) More... | |
#define | VDDC_ATTEN_CONV_DENOM (3u) |
#define | V_TEMP_REF_OFFSET_mV (666u) |
Offset of V_Temp (mV) corresponding to 0 °C reference. More... | |
#define | V_TEMP_SCALE_FACT (100u) |
Scaling factor for V_Temp (mV) More... | |
#define | CONV_COEFF_mV_TO_degC (231u) |
Conversion coefficient from V_Temp (mV) to Temperature (°C) multiplied by V_TEMP_SCALE_FACT. More... | |
#define | ADC2_VBAT (0) |
ADC2 channel selection macro, channel 0 - VBAT. More... | |
#define | ADC2_VS (1) |
ADC2 channel selection macro, channel 1 - VS. More... | |
#define | ADC2_VSD (2) |
ADC2 channel selection macro, channel 2 - VSD. More... | |
#define | ADC2_VCP (3) |
ADC2 channel selection macro, channel 3 - VCP. More... | |
#define | ADC2_MON (4) |
ADC2 channel selection macro, channel 4 - MON. More... | |
#define | ADC2_VDDP (5) |
ADC2 channel selection macro, channel 5 - VDDP. More... | |
#define | ADC2_VAREF (6) |
ADC2 channel selection macro, channel 6 - VAREF. More... | |
#define | ADC2_VBG (7) |
ADC2 channel selection macro, channel 7 - VBG. More... | |
#define | ADC2_VDDC (8) |
ADC2 channel selection macro, channel 8 - VDDC. More... | |
#define | ADC2_TEMP (9) |
ADC2 channel selection macro, channel 9 - TEMP. More... | |
#define | ADC2_VS_Attenuator_Range_3_28V (1u) |
#define | ADC2_VS_Attenuator_Range_3_22V (0u) |
Functions | |
INLINE void | ADC2_VS_Attenuator_Range_3_28V_Set (void) |
sets ADC2 Channel 1 (VS) Attenuator Range to Range 2 (from 3 to 28 V). More... | |
INLINE void | ADC2_VS_Attenuator_Range_3_22V_Set (void) |
sets ADC2 Channel 1 (VS) Attenuator Range to Range 1 (from 3 to 22 V). More... | |
INLINE uint8 | ADC2_VS_Attenuator_Range_Get (void) |
gets ADC2 Channel 1 (VS) Attenuator Range. More... | |
INLINE void | ADC2_VS_OV_Int_Clr (void) |
clears VS Overvoltage Interrupt Status. More... | |
INLINE void | ADC2_VS_UV_Int_Clr (void) |
clears VS Undervoltage Interrupt Status. More... | |
INLINE void | ADC2_VDDP_OV_Int_Clr (void) |
clears VDDP Overvoltage Interrupt Status. More... | |
INLINE void | ADC2_VDDP_UV_Int_Clr (void) |
clears VDDP Undervoltage Interrupt Status. More... | |
INLINE void | ADC2_VDDC_OV_Int_Clr (void) |
clears VDDC Overvoltage Interrupt Status. More... | |
INLINE void | ADC2_VDDC_UV_Int_Clr (void) |
clears VDDC Undervoltage Interrupt Status. More... | |
INLINE void | ADC2_VSD_OV_Int_Clr (void) |
clears Driver Supply MU High Interrupt Status. More... | |
INLINE void | ADC2_VSD_UV_Int_Clr (void) |
clears Driver Supply MU Low interrupt flag. More... | |
INLINE void | ADC2_VCP_OV_Int_Clr (void) |
clears Charge Pump MU High Interrupt Status. More... | |
INLINE void | ADC2_VCP_UV_Int_Clr (void) |
clears Charge Pump MU Low Interrupt Status. More... | |
INLINE void | ADC2_VBG_OV_Int_Clr (void) |
clears 8 Bit ADC2 Reference Overvoltage Interrupt Status. More... | |
INLINE void | ADC2_VBG_UV_Int_Clr (void) |
clears 8 Bit ADC2 Reference Undervoltage Interrupt Status. More... | |
INLINE void | ADC2_TEMP_OT_Int_Clr (void) |
clears System Overtemperature Shutdown Interrupt Status. More... | |
INLINE void | ADC2_TEMP_WARN_Int_Clr (void) |
clears System Overtemperature Prewarning Interrupt Status. More... | |
INLINE void | ADC2_VS_OV_Int_En (void) |
enables VS Overvoltage interrupt. More... | |
INLINE void | ADC2_VS_OV_Int_Dis (void) |
disables VS Overvoltage interrupt. More... | |
INLINE void | ADC2_VS_UV_Int_En (void) |
enables VS Undervoltage interrupt. More... | |
INLINE void | ADC2_VS_UV_Int_Dis (void) |
disables VS Undervoltage interrupt. More... | |
INLINE void | ADC2_VDDP_OV_Int_En (void) |
enables VDDP Overvoltage interrupt. More... | |
INLINE void | ADC2_VDDP_OV_Int_Dis (void) |
disables VDDP Overvoltage interrupt. More... | |
INLINE void | ADC2_VDDP_UV_Int_En (void) |
enables VDDP Undervoltage interrupt. More... | |
INLINE void | ADC2_VDDP_UV_Int_Dis (void) |
disables VDDP Undervoltage interrupt. More... | |
INLINE void | ADC2_VDDC_OV_Int_En (void) |
enables VDDC Overvoltage interrupt. More... | |
INLINE void | ADC2_VDDC_OV_Int_Dis (void) |
disables VDDC Overvoltage interrupt. More... | |
INLINE void | ADC2_VDDC_UV_Int_En (void) |
enables VDDC Undervoltage interrupt. More... | |
INLINE void | ADC2_VDDC_UV_Int_Dis (void) |
disables VDDC Undervoltage interrupt. More... | |
INLINE void | ADC2_VSD_OV_Int_En (void) |
enables Driver Supply MU High interrupt. More... | |
INLINE void | ADC2_VSD_OV_Int_Dis (void) |
disables Driver Supply MU High interrupt. More... | |
INLINE void | ADC2_VSD_UV_Int_En (void) |
enables Driver Supply MU Low interrupt. More... | |
INLINE void | ADC2_VSD_UV_Int_Dis (void) |
disables Driver Supply MU Low interrupt. More... | |
INLINE void | ADC2_VCP_OV_Int_En (void) |
enables Charge Pump MU High interrupt. More... | |
INLINE void | ADC2_VCP_OV_Int_Dis (void) |
disables Charge Pump MU High interrupt. More... | |
INLINE void | ADC2_VCP_UV_Int_En (void) |
enables Charge Pump MU Low interrupt. More... | |
INLINE void | ADC2_VCP_UV_Int_Dis (void) |
disables Charge Pump MU Low interrupt. More... | |
INLINE void | ADC2_VBG_OV_Int_En (void) |
enables 8 Bit ADC2 Reference Overvoltage interrupt. More... | |
INLINE void | ADC2_VBG_OV_Int_Dis (void) |
disables 8 Bit ADC2 Reference Overvoltage interrupt. More... | |
INLINE void | ADC2_VBG_UV_Int_En (void) |
enables 8 Bit ADC2 Reference Undervoltage interrupt. More... | |
INLINE void | ADC2_VBG_UV_Int_Dis (void) |
disables 8 Bit ADC2 Reference Undervoltage interrupt. More... | |
INLINE void | ADC2_Temp_OT_Int_En (void) |
enables System Overtemperature Shutdown interrupt. More... | |
INLINE void | ADC2_Temp_OT_Int_Dis (void) |
disables System Overtemperature Shutdown interrupt. More... | |
INLINE void | ADC2_Temp_Warn_Int_En (void) |
enables System Overtemperature Prewarning interrupt. More... | |
INLINE void | ADC2_Temp_Warn_Int_Dis (void) |
disables System Overtemperature Prewarning interrupt. More... | |
void | ADC2_Init (void) |
Initializes the ADC2 based on the IFXConfigWizard configuration. More... | |
INLINE uint16 | ADC2_GetChResult (uint8 channel) |
Returns the 10 bit wide result of the selected ADC2 channel. More... | |
INLINE uint16 | ADC2_VS_Result_mV (void) |
returns the Voltage of the VS line (ADC2 Channel 1) in millivolt (mV) More... | |
INLINE uint16 | ADC2_VSD_Result_mV (void) |
returns the Voltage of the VSD line (ADC2 Channel 2) in millivolt More... | |
INLINE uint16 | ADC2_VCP_Result_mV (void) |
returns the Voltage of the VCP line (ADC2 Channel 3) in millivolt (mV) More... | |
INLINE uint16 | ADC2_MON_Result_mV (void) |
returns the Voltage of the MON line (ADC2 Channel 4) in millivolt (mV) More... | |
INLINE uint16 | ADC2_VAREF_Result_mV (void) |
returns the Voltage of the VAREF line (ADC2 Channel 6) in millivolt (mV) More... | |
INLINE uint16 | ADC2_VDDP_Result_mV (void) |
returns the Voltage of the VDDP line (ADC2 Channel 5) in millivolt (mV) More... | |
INLINE uint16 | ADC2_VBG_Result_mV (void) |
returns the Voltage of the VBG line (ADC2 Channel 7) in millivolt (mV) More... | |
INLINE uint16 | ADC2_VDDC_Result_mV (void) |
returns the Voltage of the VDDC line (ADC2 Channel 8) in millivolt (mV) More... | |
INLINE sint16 | ADC2_Temp_Result_C (void) |
Returns the Temperature read by the ADC2 Channel 9 in degrees Celsius (°C). More... | |
#define ADC2_FILTOUT_MAX (1023u) |
ADC2 Filtered output register maximum value.
#define ADC2_MON (4) |
ADC2 channel selection macro, channel 4 - MON.
#define ADC2_TEMP (9) |
ADC2 channel selection macro, channel 9 - TEMP.
#define ADC2_VAREF (6) |
ADC2 channel selection macro, channel 6 - VAREF.
#define ADC2_VBAT (0) |
ADC2 channel selection macro, channel 0 - VBAT.
#define ADC2_VBG (7) |
ADC2 channel selection macro, channel 7 - VBG.
#define ADC2_VCP (3) |
ADC2 channel selection macro, channel 3 - VCP.
#define ADC2_VDDC (8) |
ADC2 channel selection macro, channel 8 - VDDC.
#define ADC2_VDDP (5) |
ADC2 channel selection macro, channel 5 - VDDP.
#define ADC2_VREF (1.211F) |
ADC2 \( V_{BG}\) in Volts.
#define ADC2_VREF_mV (1211) |
ADC2 \( V_{BG}\) (1.211 V) in millivolts.
#define ADC2_VS (1) |
ADC2 channel selection macro, channel 1 - VS.
#define ADC2_VS_Attenuator_Range_3_22V (0u) |
#define ADC2_VS_Attenuator_Range_3_28V (1u) |
#define ADC2_VSD (2) |
ADC2 channel selection macro, channel 2 - VSD.
#define CONV_COEFF_mV_TO_degC (231u) |
Conversion coefficient from V_Temp (mV) to Temperature (°C) multiplied by V_TEMP_SCALE_FACT.
#define MON_ATTEN_CONV_DENOM (39u) |
#define MON_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for MON: attenuator for MON is 0.039 => Inverse fraction (1000/39)
#define V_TEMP_REF_OFFSET_mV (666u) |
Offset of V_Temp (mV) corresponding to 0 °C reference.
#define V_TEMP_SCALE_FACT (100u) |
Scaling factor for V_Temp (mV)
#define VAREF_ATTEN_CONV_DENOM (219u) |
#define VAREF_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VAREF: attenuator for VAREF is 0.219 => Inverse fraction (1000/219)
#define VBG_ATTEN_CONV_DENOM (3u) |
#define VBG_ATTEN_CONV_NOMIN (4u) |
Nominator and Denominator of Attenuator Conversion formula for VBG: attenuator for VBG is 0.75 => Inverse fraction (4/3)
#define VCP_ATTEN_CONV_DENOM (23u) |
#define VCP_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VCP: attenuator for VCP is 0.023 => Inverse fraction (1000/23)
#define VDDC_ATTEN_CONV_DENOM (3u) |
#define VDDC_ATTEN_CONV_NOMIN (4u) |
Nominator and Denominator of Attenuator Conversion formula for VDDC: attenuator for VDDC is 0.75 => Inverse fraction (4/3)
#define VDDP_ATTEN_CONV_DENOM (41u) |
#define VDDP_ATTEN_CONV_NOMIN (250u) |
Nominator and Denominator of Attenuator Conversion formula for VDDP: attenuator for VDDP is 0.164 => Inverse fraction (250/41)
#define VS_ATTEN_CONV_DENOM_MAX22V (11u) |
#define VS_ATTEN_CONV_DENOM_MAX28V (39u) |
#define VS_ATTEN_CONV_NOMIN_MAX22V (200u) |
Nominator and Denominator of Attenuator Conversion formula for VS: attenuator for VS Range 0..22V is 0.055 => Inverse fraction (200/11)
#define VS_ATTEN_CONV_NOMIN_MAX28V (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VS: attenuator for VS Range 0..28V is 0.039 => Inverse fraction (1000/39)
#define VSD_ATTEN_CONV_DENOM (39u) |
#define VSD_ATTEN_CONV_NOMIN (1000u) |
Nominator and Denominator of Attenuator Conversion formula for VSD: attenuator for VSD is 0.039 => Inverse fraction (1000/39)
Returns the 10 bit wide result of the selected ADC2 channel.
Returns 0 if the selected channel number is greater than 9
channel | selected ADC2 channel number (0 to 9) |
Example
This example returns the ADC2 Channel 4 result value.
void ADC2_Init | ( | void | ) |
Initializes the ADC2 based on the IFXConfigWizard configuration.
returns the Voltage of the MON line (ADC2 Channel 4) in millivolt (mV)
calculated based on attenuator conversion factor as follows:
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{1000}{39}\)
Example
This example returns the specified value./
INLINE void ADC2_TEMP_OT_Int_Clr | ( | void | ) |
clears System Overtemperature Shutdown Interrupt Status.
Example
This example treats the System Overtemperature Shutdown interrupt.
INLINE void ADC2_Temp_OT_Int_Dis | ( | void | ) |
disables System Overtemperature Shutdown interrupt.
Example
This example treats the System Overtemperature Shutdown interrupt.
INLINE void ADC2_Temp_OT_Int_En | ( | void | ) |
enables System Overtemperature Shutdown interrupt.
Example
This example treats the System Overtemperature Shutdown interrupt.
Returns the Temperature read by the ADC2 Channel 9 in degrees Celsius (°C).
\( Temp(°C) = \frac{V_{Temp}(mV)-666(mV)}{2.31\frac{(mV)}{(°C)}}\)
where
\( V_{Temp}(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}\)
Example
This example returns the specified value./
INLINE void ADC2_TEMP_WARN_Int_Clr | ( | void | ) |
clears System Overtemperature Prewarning Interrupt Status.
Example
This example treats the System Overtemperature Prewarning interrupt.
INLINE void ADC2_Temp_Warn_Int_Dis | ( | void | ) |
disables System Overtemperature Prewarning interrupt.
Example
This example treats the System Overtemperature Prewarning interrupt.
INLINE void ADC2_Temp_Warn_Int_En | ( | void | ) |
enables System Overtemperature Prewarning interrupt.
Example
This example treats the System Overtemperature Prewarning interrupt.
returns the Voltage of the VAREF line (ADC2 Channel 6) in millivolt (mV)
calculated based on attenuator conversion factor as follows:
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{1000}{219}\)
Example
This example returns the specified value./
INLINE void ADC2_VBG_OV_Int_Clr | ( | void | ) |
clears 8 Bit ADC2 Reference Overvoltage Interrupt Status.
Example
This example treats the 8 Bit ADC2 Reference Overvoltage interrupt.
INLINE void ADC2_VBG_OV_Int_Dis | ( | void | ) |
disables 8 Bit ADC2 Reference Overvoltage interrupt.
Example
This example treats the 8 Bit ADC2 Reference Overvoltage interrupt.
INLINE void ADC2_VBG_OV_Int_En | ( | void | ) |
enables 8 Bit ADC2 Reference Overvoltage interrupt.
Example
This example treats the 8 Bit ADC2 Reference Overvoltage interrupt.
returns the Voltage of the VBG line (ADC2 Channel 7) in millivolt (mV)
calculated based on attenuator conversion factor as follows:
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{4}{3}\)
Example
This example returns the specified value./
INLINE void ADC2_VBG_UV_Int_Clr | ( | void | ) |
clears 8 Bit ADC2 Reference Undervoltage Interrupt Status.
Example
This example treats the 8 Bit ADC2 Reference Undervoltage interrupt.
INLINE void ADC2_VBG_UV_Int_Dis | ( | void | ) |
disables 8 Bit ADC2 Reference Undervoltage interrupt.
Example
This example treats the 8 Bit ADC2 Reference Undervoltage interrupt.
INLINE void ADC2_VBG_UV_Int_En | ( | void | ) |
enables 8 Bit ADC2 Reference Undervoltage interrupt.
Example
This example treats the 8 Bit ADC2 Reference Undervoltage interrupt.
INLINE void ADC2_VCP_OV_Int_Clr | ( | void | ) |
clears Charge Pump MU High Interrupt Status.
Example
This example treats the Charge Pump MU High interrupt.
INLINE void ADC2_VCP_OV_Int_Dis | ( | void | ) |
disables Charge Pump MU High interrupt.
Example
This example treats the Charge Pump MU High interrupt.
INLINE void ADC2_VCP_OV_Int_En | ( | void | ) |
enables Charge Pump MU High interrupt.
Example
This example treats the Charge Pump MU High interrupt.
returns the Voltage of the VCP line (ADC2 Channel 3) in millivolt (mV)
calculated based on attenuator conversion factor as follows:
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{1000}{23}\)
Example
This example returns the specified value./
INLINE void ADC2_VCP_UV_Int_Clr | ( | void | ) |
clears Charge Pump MU Low Interrupt Status.
Example
This example treats the Charge Pump MU Low interrupt.
INLINE void ADC2_VCP_UV_Int_Dis | ( | void | ) |
disables Charge Pump MU Low interrupt.
Example
This example treats the Charge Pump MU Low interrupt.
INLINE void ADC2_VCP_UV_Int_En | ( | void | ) |
enables Charge Pump MU Low interrupt.
Example
This example treats the Charge Pump MU Low interrupt.
INLINE void ADC2_VDDC_OV_Int_Clr | ( | void | ) |
clears VDDC Overvoltage Interrupt Status.
Example
This example treats the VDDC Overvoltage interrupt.
INLINE void ADC2_VDDC_OV_Int_Dis | ( | void | ) |
disables VDDC Overvoltage interrupt.
Example
This example treats the VDDC Overvoltage interrupt.
INLINE void ADC2_VDDC_OV_Int_En | ( | void | ) |
enables VDDC Overvoltage interrupt.
Example
This example treats the VDDC Overvoltage interrupt.
returns the Voltage of the VDDC line (ADC2 Channel 8) in millivolt (mV)
calculated based on attenuator conversion factor as follows:
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{4}{3}\)
Example
This example returns the specified value./
INLINE void ADC2_VDDC_UV_Int_Clr | ( | void | ) |
clears VDDC Undervoltage Interrupt Status.
Example
This example treats the VDDC Undervoltage interrupt.
INLINE void ADC2_VDDC_UV_Int_Dis | ( | void | ) |
disables VDDC Undervoltage interrupt.
Example
This example treats the VDDC Undervoltage interrupt.
INLINE void ADC2_VDDC_UV_Int_En | ( | void | ) |
enables VDDC Undervoltage interrupt.
Example
This example treats the VDDC Undervoltage interrupt.
INLINE void ADC2_VDDP_OV_Int_Clr | ( | void | ) |
clears VDDP Overvoltage Interrupt Status.
Example
This example treats the VDDP Overvoltage interrupt.
INLINE void ADC2_VDDP_OV_Int_Dis | ( | void | ) |
disables VDDP Overvoltage interrupt.
Example
This example treats the VDDP Overvoltage interrupt.
INLINE void ADC2_VDDP_OV_Int_En | ( | void | ) |
enables VDDP Overvoltage interrupt.
Example
This example treats the VDDP Overvoltage interrupt.
returns the Voltage of the VDDP line (ADC2 Channel 5) in millivolt (mV)
calculated based on attenuator conversion factor as follows:
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{250}{41}\)
Example
This example returns the specified value./
INLINE void ADC2_VDDP_UV_Int_Clr | ( | void | ) |
clears VDDP Undervoltage Interrupt Status.
Example
This example treats the VDDP Undervoltage interrupt.
INLINE void ADC2_VDDP_UV_Int_Dis | ( | void | ) |
disables VDDP Undervoltage interrupt.
Example
This example treats the VDDP Undervoltage interrupt.
INLINE void ADC2_VDDP_UV_Int_En | ( | void | ) |
enables VDDP Undervoltage interrupt.
Example
This example treats the VDDP Undervoltage interrupt.
INLINE void ADC2_VS_Attenuator_Range_3_22V_Set | ( | void | ) |
sets ADC2 Channel 1 (VS) Attenuator Range to Range 1 (from 3 to 22 V).
Example
This example sets ADC2 Channel 1 (VS) Attenuator Range to Range 1 (from 3 to 22 V).
INLINE void ADC2_VS_Attenuator_Range_3_28V_Set | ( | void | ) |
sets ADC2 Channel 1 (VS) Attenuator Range to Range 2 (from 3 to 28 V).
Example
This example sets ADC2 Channel 1 (VS) Attenuator Range to Range 2 (from 3 to 28 V).
gets ADC2 Channel 1 (VS) Attenuator Range.
1 | if Range 2 (from 3 to 22V) is selected. |
0 | if Range 1 (from 3 to 28V) is selected. |
Example
This example reads ADC2 Channel 1 (VS) Attenuator Range.
INLINE void ADC2_VS_OV_Int_Clr | ( | void | ) |
clears VS Overvoltage Interrupt Status.
Example
This example treats the VS Overvoltage interrupt.
INLINE void ADC2_VS_OV_Int_Dis | ( | void | ) |
disables VS Overvoltage interrupt.
Example
This example treats the VS Overvoltage interrupt.
INLINE void ADC2_VS_OV_Int_En | ( | void | ) |
enables VS Overvoltage interrupt.
Example
This example treats the VS Overvoltage interrupt.
returns the Voltage of the VS line (ADC2 Channel 1) in millivolt (mV)
calculated based on attenuator conversion factor as follows:
If the VS range is up to 28 V, then
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{1000}{39}\)
If the VS range is up to 22 V, then
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{200}{11}\)
Example
This example returns the specified value.
INLINE void ADC2_VS_UV_Int_Clr | ( | void | ) |
clears VS Undervoltage Interrupt Status.
Example
This example treats the VS Undervoltage interrupt.
INLINE void ADC2_VS_UV_Int_Dis | ( | void | ) |
disables VS Undervoltage interrupt.
Example
This example treats the VS Undervoltage interrupt.
INLINE void ADC2_VS_UV_Int_En | ( | void | ) |
enables VS Undervoltage interrupt.
Example
This example treats the VS Undervoltage interrupt.
INLINE void ADC2_VSD_OV_Int_Clr | ( | void | ) |
clears Driver Supply MU High Interrupt Status.
Example
This example treats the Driver Supply MU High interrupt.
INLINE void ADC2_VSD_OV_Int_Dis | ( | void | ) |
disables Driver Supply MU High interrupt.
Example
This example treats the Driver Supply MU High interrupt.
INLINE void ADC2_VSD_OV_Int_En | ( | void | ) |
enables Driver Supply MU High interrupt.
Example
This example treats the Driver Supply MU High interrupt.
returns the Voltage of the VSD line (ADC2 Channel 2) in millivolt
calculated based on attenuator conversion factor as follows:
\( Voltage(mV) = \frac{ADC2.Digital.Result(bit)*(V_{BG}*1000)(mV)}{ADC2.Max.Digital.Value(bit)}*\frac{1000}{39}\)
Example
This example returns the specified value./
INLINE void ADC2_VSD_UV_Int_Clr | ( | void | ) |
clears Driver Supply MU Low interrupt flag.
Example
This example treats the Driver Supply MU Low interrupt.
INLINE void ADC2_VSD_UV_Int_Dis | ( | void | ) |
disables Driver Supply MU Low interrupt.
Example
This example treats the Driver Supply MU Low interrupt.