iLLD_TC29x  1.0
IfxDsadc.h File Reference

DSADC basic functionality. More...

#include "_Impl/IfxDsadc_cfg.h"
#include "Src/Std/IfxSrc.h"
#include "Scu/Std/IfxScuCcu.h"
#include "_PinMap/IfxDsadc_PinMap.h"
#include "IfxDsadc_reg.h"
#include "Cpu/Std/IfxCpu_Intrinsics.h"

Go to the source code of this file.

Enumerations

enum  IfxDsadc_AuxCombFilterShift {
  IfxDsadc_AuxCombFilterShift_noShift = 0,
  IfxDsadc_AuxCombFilterShift_shiftBy1 = 1,
  IfxDsadc_AuxCombFilterShift_shiftBy2 = 2,
  IfxDsadc_AuxCombFilterShift_shiftBy3 = 3
}
 Comb Filter (auxiliary) shift control
Definition in Ifx_DSADC.FCFGA.B.AFSC. More...
 
enum  IfxDsadc_AuxCombFilterType {
  IfxDsadc_AuxCombFilterType_comb1 = 0,
  IfxDsadc_AuxCombFilterType_comb2 = 1,
  IfxDsadc_AuxCombFilterType_comb3 = 2,
  IfxDsadc_AuxCombFilterType_combF = 3
}
 Comb Filter (auxiliary) configuration/type
Definition in Ifx_DSADC.FCFGA.B.CFAC. More...
 
enum  IfxDsadc_AuxEvent {
  IfxDsadc_AuxEvent_everyNewResult = 0,
  IfxDsadc_AuxEvent_insideBoundary = 1,
  IfxDsadc_AuxEvent_outsideBoundary = 2
}
 Service request generation (auxiliary)
Definition in Ifx_DSADC.FCFGA.B.ESEL. More...
 
enum  IfxDsadc_AuxGate {
  IfxDsadc_AuxGate_definedByESEL = 0,
  IfxDsadc_AuxGate_coupledToIntegrator = 1
}
 Service request generation (auxiliary)
Definition in Ifx_DSADC.FCFGA.B.EGT. More...
 
enum  IfxDsadc_AuxServiceRequest {
  IfxDsadc_AuxServiceRequest_never = 0,
  IfxDsadc_AuxServiceRequest_auxFilter = 1,
  IfxDsadc_AuxServiceRequest_altSource = 2
}
 Service request generation (auxiliary)
Definition in Ifx_DSADC.FCFGA.B.SRGA. More...
 
enum  IfxDsadc_CarrierWaveformMode {
  IfxDsadc_CarrierWaveformMode_stopped = 0,
  IfxDsadc_CarrierWaveformMode_square = 1,
  IfxDsadc_CarrierWaveformMode_triangle = 2,
  IfxDsadc_CarrierWaveformMode_sine = 3
}
 Carrier generation mode
Definition in Ifx_DSADC.CGCFG.B.CGMOD. More...
 
enum  IfxDsadc_ChannelId {
  IfxDsadc_ChannelId_0 = 0,
  IfxDsadc_ChannelId_1 = 1,
  IfxDsadc_ChannelId_2 = 2,
  IfxDsadc_ChannelId_3 = 3,
  IfxDsadc_ChannelId_4 = 4,
  IfxDsadc_ChannelId_5 = 5,
  IfxDsadc_ChannelId_6 = 6,
  IfxDsadc_ChannelId_7 = 7,
  IfxDsadc_ChannelId_8 = 8,
  IfxDsadc_ChannelId_9 = 9
}
 Specifies the channel Index. More...
 
enum  IfxDsadc_CommonModeVoltage {
  IfxDsadc_CommonModeVoltage_a = 0,
  IfxDsadc_CommonModeVoltage_b = 1,
  IfxDsadc_CommonModeVoltage_c = 2
}
 Modulator common mode voltage selection
Definition in Ifx_DSADC.MODCFGx.B.CMVS. More...
 
enum  IfxDsadc_FirDataShift {
  IfxDsadc_FirDataShift_noShift = 0,
  IfxDsadc_FirDataShift_shiftBy1 = 1,
  IfxDsadc_FirDataShift_shiftBy2 = 2,
  IfxDsadc_FirDataShift_shiftBy3 = 3
}
 FIR data shift control
Selects the displacement caused by the data shifter at the FIR filter output
Definition in Ifx_DSADC.FCFGM.B.DSH. More...
 
enum  IfxDsadc_FirInternalShift {
  IfxDsadc_FirInternalShift_noShift = 0,
  IfxDsadc_FirInternalShift_shiftBy1 = 1
}
 FIR shift control
Selects the displacement caused by the data shifter inbetween the FIR filter blocks.
Definition in Ifx_DSADC.FCFGM.B.FSH. More...
 
enum  IfxDsadc_InputConfig {
  IfxDsadc_InputConfig_inputPin = 0,
  IfxDsadc_InputConfig_supplyVoltage = 1,
  IfxDsadc_InputConfig_commonModeVoltage = 2,
  IfxDsadc_InputConfig_referenceGround = 3
}
 Modulator configuration of positive/negative input line
Definition in Ifx_DSADC.MODCFGx.B.INCFGP and Ifx_DSADC.MODCFGx.B.INCFGN. More...
 
enum  IfxDsadc_InputDataSource {
  IfxDsadc_InputDataSource_onChipStandAlone = 0,
  IfxDsadc_InputDataSource_onChipCombined = 1,
  IfxDsadc_InputDataSource_directInputA = 2,
  IfxDsadc_InputDataSource_invertedInputA = 3,
  IfxDsadc_InputDataSource_directInputB = 4,
  IfxDsadc_InputDataSource_invertedInputB = 5
}
 Demodulator input data source selection
Definition in Ifx_DSADC.DICFG.B.DSRC. More...
 
enum  IfxDsadc_InputGain {
  IfxDsadc_InputGain_factor1 = 0,
  IfxDsadc_InputGain_factor2 = 1,
  IfxDsadc_InputGain_factor4 = 2,
  IfxDsadc_InputGain_factor8 = 3,
  IfxDsadc_InputGain_factor16 = 4
}
 Modulator gain select of analog input path
Definition in Ifx_DSADC.MODCFGx.B.GAINSEL. More...
 
enum  IfxDsadc_InputPin {
  IfxDsadc_InputPin_a = 0,
  IfxDsadc_InputPin_b = 1,
  IfxDsadc_InputPin_c = 2,
  IfxDsadc_InputPin_d = 3
}
 Modulator input pin selection
Definition in Ifx_DSADC.MODCFGx.B.INMUX. More...
 
enum  IfxDsadc_IntegrationWindowSize {
  IfxDsadc_IntegrationWindowSize_internalControl = 0,
  IfxDsadc_IntegrationWindowSize_externalControl = 1
}
 Integrator window size
Definition in Ifx_DSADC.IWCTR.B.IWS. More...
 
enum  IfxDsadc_IntegratorTrigger {
  IfxDsadc_IntegratorTrigger_bypassed = 0,
  IfxDsadc_IntegratorTrigger_fallingEdge = 1,
  IfxDsadc_IntegratorTrigger_risingEdge = 2,
  IfxDsadc_IntegratorTrigger_alwaysActive = 3
}
 Integrator trigger mode
NOTE: switch-first to bypassed before using other mode
Definition in Ifx_DSADC.DICFG.B.ITRMODE. More...
 
enum  IfxDsadc_LowPowerSupply {
  IfxDsadc_LowPowerSupply_5V = 0,
  IfxDsadc_LowPowerSupply_3_3V = 1
}
 Low power supply voltage select
Definition in Ifx_DSADC.GLOBCFG.B.LOSUP. More...
 
enum  IfxDsadc_MainCombFilterShift {
  IfxDsadc_MainCombFilterShift_noShift = 0,
  IfxDsadc_MainCombFilterShift_shiftBy1 = 1,
  IfxDsadc_MainCombFilterShift_shiftBy2 = 2,
  IfxDsadc_MainCombFilterShift_shiftBy3 = 3
}
 Comb Filter (Main Chain) shift control
Definition in Ifx_DSADC.FCFGC.B.MFSC. More...
 
enum  IfxDsadc_MainCombFilterType {
  IfxDsadc_MainCombFilterType_comb1 = 0,
  IfxDsadc_MainCombFilterType_comb2 = 1,
  IfxDsadc_MainCombFilterType_comb3 = 2,
  IfxDsadc_MainCombFilterType_combF = 3
}
 Comb Filter (Main Chain) configuration/type
Definition in Ifx_DSADC.FCFGC.B.CFMC. More...
 
enum  IfxDsadc_MainServiceRequest {
  IfxDsadc_MainServiceRequest_never = 0,
  IfxDsadc_MainServiceRequest_highGateSignal = 1,
  IfxDsadc_MainServiceRequest_lowGateSignal = 2,
  IfxDsadc_MainServiceRequest_everyNewResult = 3
}
 Service request generation (main chain)
Definition in Ifx_DSADC.FCFGC.B.SRGM. More...
 
enum  IfxDsadc_ModulatorClock {
  IfxDsadc_ModulatorClock_off = 0,
  IfxDsadc_ModulatorClock_fDSD = 1,
  IfxDsadc_ModulatorClock_fERAY = 2,
  IfxDsadc_ModulatorClock_fOSC0 = 3
}
 Modulator clock select
Definition in Ifx_DSADC.GLOBCFG.B.MCSEL. More...
 
enum  IfxDsadc_ModulatorClockDivider {
  IfxDsadc_ModulatorClockDivider_div2 = 0,
  IfxDsadc_ModulatorClockDivider_div4,
  IfxDsadc_ModulatorClockDivider_div6,
  IfxDsadc_ModulatorClockDivider_div8,
  IfxDsadc_ModulatorClockDivider_div10,
  IfxDsadc_ModulatorClockDivider_div12,
  IfxDsadc_ModulatorClockDivider_div14,
  IfxDsadc_ModulatorClockDivider_div16,
  IfxDsadc_ModulatorClockDivider_div18,
  IfxDsadc_ModulatorClockDivider_div20,
  IfxDsadc_ModulatorClockDivider_div22,
  IfxDsadc_ModulatorClockDivider_div24,
  IfxDsadc_ModulatorClockDivider_div26,
  IfxDsadc_ModulatorClockDivider_div28,
  IfxDsadc_ModulatorClockDivider_div30,
  IfxDsadc_ModulatorClockDivider_div32
}
 Modulator divider factor for modulator clock
Definition in Ifx_DSADC.MODCFGx.B.DIVM. More...
 
enum  IfxDsadc_RectifierSignSource {
  IfxDsadc_RectifierSignSource_onChipGenerator = 0,
  IfxDsadc_RectifierSignSource_nextChannel = 1,
  IfxDsadc_RectifierSignSource_externalA = 2,
  IfxDsadc_RectifierSignSource_externalB = 3
}
 Rectifier sign source
Selects the sign signal that is to be delayed.
Definition in Ifx_DSADC.RECT.B.SSRC. More...
 
enum  IfxDsadc_SampleClockSource {
  IfxDsadc_SampleClockSource_internal = 0,
  IfxDsadc_SampleClockSource_inputA = 1,
  IfxDsadc_SampleClockSource_inputB = 2,
  IfxDsadc_SampleClockSource_inputC = 3
}
 Demodulator sample clock source select
Definition in Ifx_DSADC.DICFG.B.CSRC. More...
 
enum  IfxDsadc_SampleStrobe {
  IfxDsadc_SampleStrobe_noDataStrobe = 0,
  IfxDsadc_SampleStrobe_sampleOnRisingEdge = 1,
  IfxDsadc_SampleStrobe_sampleOnFallingEdge = 2,
  IfxDsadc_SampleStrobe_sampleOnBothEdges = 3,
  IfxDsadc_SampleStrobe_reserved = 4,
  IfxDsadc_SampleStrobe_sampleOnTwoRisingEdges = 5,
  IfxDsadc_SampleStrobe_sampleOnTwoFallingEdges = 6
}
 Demodulator data strobe generation mode
Definition in Ifx_DSADC.DICFG.B.STROBE. More...
 
enum  IfxDsadc_SleepMode {
  IfxDsadc_SleepMode_enable = 0,
  IfxDsadc_SleepMode_disable = 1
}
 Enable/disable the sensitivity of the module to sleep signal
Definition in Ifx_DSADC.CLC.B.EDIS. More...
 
enum  IfxDsadc_TimestampTrigger {
  IfxDsadc_TimestampTrigger_noTrigger = 0,
  IfxDsadc_TimestampTrigger_fallingEdge = 1,
  IfxDsadc_TimestampTrigger_risingEdge = 2,
  IfxDsadc_TimestampTrigger_eachEdge = 3
}
 Timestamp trigger mode
Definition in Ifx_DSADC.DICFG.B.TSTRMODE. More...
 
enum  IfxDsadc_TriggerInput {
  IfxDsadc_TriggerInput_a = 0,
  IfxDsadc_TriggerInput_b = 1,
  IfxDsadc_TriggerInput_c = 2,
  IfxDsadc_TriggerInput_d = 3,
  IfxDsadc_TriggerInput_e = 4,
  IfxDsadc_TriggerInput_f = 5,
  IfxDsadc_TriggerInput_g = 6,
  IfxDsadc_TriggerInput_h = 7
}
 Trigger select
Definition in Ifx_DSADC.DICFG.B.TRSEL. More...
 

Functions

IFX_INLINE void IfxDsadc_setSleepMode (Ifx_DSADC *dsadc, IfxDsadc_SleepMode mode)
 Sets the sensitivity of the module to sleep signal. More...
 
IFX_INLINE void IfxDsadc_startScan (Ifx_DSADC *dsadc, uint32 modulatorMask, uint32 channelMask)
 Enables the conversion of multiple channels. More...
 
IFX_INLINE void IfxDsadc_stopScan (Ifx_DSADC *dsadc, uint32 modulatorMask)
 Disables the conversion of multiple channels. More...
 
IFX_EXTERN void IfxDsadc_resetModule (Ifx_DSADC *dsadc)
 resets the DSADC kernel More...
 
IFX_INLINE sint16 IfxDsadc_getAuxResult (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Get result from the auxiliary chain. More...
 
IFX_INLINE uint16 IfxDsadc_getMainCombDecimation (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Get the main comb decimation factor. More...
 
IFX_INLINE sint16 IfxDsadc_getMainResult (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Get result from the main chain. More...
 
IFX_INLINE boolean IfxDsadc_isModuleEnabled (Ifx_DSADC *dsadc)
 Return TRUE if DSADC module is enabled. More...
 
IFX_INLINE void IfxDsadc_setCarrierMode (Ifx_DSADC *dsadc, IfxDsadc_CarrierWaveformMode waveformMode)
 Set the carrier waveform mode. More...
 
IFX_EXTERN float32 IfxDsadc_getIntegratorOutFreq (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Get the sample frequency of the integrator output in Hz. More...
 
IFX_EXTERN float32 IfxDsadc_getMainCombOutFreq (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Get the sample frequency of the main COMB filter output in Hz. More...
 
IFX_EXTERN float32 IfxDsadc_getMainGroupDelay (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Estimate the group delay of main-chain filters in seconds. More...
 
IFX_EXTERN float32 IfxDsadc_getModulatorClockFreq (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Get the modulator clock frequency in Hz. More...
 
IFX_EXTERN float32 IfxDsadc_getModulatorInputClockFreq (Ifx_DSADC *dsadc)
 Get the input frequency of DSADC in Hz. More...
 
IFX_EXTERN volatile Ifx_SRC_SRCR * IfxDsadc_getAuxSrc (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Address/pointer to the interrupt source register. More...
 
IFX_EXTERN volatile Ifx_SRC_SRCR * IfxDsadc_getMainSrc (Ifx_DSADC *dsadc, IfxDsadc_ChannelId channel)
 Get the interrupt source register for a Main event. More...
 
IFX_INLINE void IfxDsadc_initCgPwmPin (const IfxDsadc_Cgpwm_Out *cgPwm, IfxPort_OutputMode pinMode, IfxPort_PadDriver padDriver)
 Initializes a CGPWM output. More...
 
IFX_INLINE void IfxDsadc_initCinPin (const IfxDsadc_Cin_In *cIn, IfxPort_InputMode cInMode)
 Initializes a CIN input. More...
 
IFX_INLINE void IfxDsadc_initCoutPin (const IfxDsadc_Cout_Out *cout, IfxPort_OutputMode pinMode, IfxPort_PadDriver padDriver)
 Initializes a COUT output. More...
 
IFX_INLINE void IfxDsadc_initDinPin (const IfxDsadc_Din_In *dIn, IfxPort_InputMode dInMode)
 Initializes a DIN input. More...
 
IFX_INLINE void IfxDsadc_initDsnPin (const IfxDsadc_Dsn_In *dsn, IfxPort_InputMode pinMode)
 Initializes a DS input. More...
 
IFX_INLINE void IfxDsadc_initDspPin (const IfxDsadc_Dsp_In *dsp, IfxPort_InputMode pinMode)
 Initializes a DS input. More...
 
IFX_INLINE void IfxDsadc_initItrPin (const IfxDsadc_Itr_In *itr, IfxPort_InputMode itrMode)
 Initializes a ITR input. More...
 
IFX_INLINE void IfxDsadc_initSgPin (const IfxDsadc_Sg_In *sg, IfxPort_InputMode pinMode)
 Initializes a SG input. More...
 

Detailed Description

DSADC basic functionality.

Version
iLLD_1_0_0_11_0
                            IMPORTANT NOTICE

Infineon Technologies AG (Infineon) is supplying this file for use exclusively with Infineon's microcontroller products. This file can be freely distributed within development tools that are supporting such microcontroller products.

THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

Definition in file IfxDsadc.h.