37 return &(MODULE_SRC.DSADC.DSADC[channel].SRA);
45 frequency = frequency / ((
float32)1.0 + dsadc->CH[channel].IWCTR.B.NVALINT);
46 Ifx_DSADC_CH_FCFGM fcfgm = dsadc->CH[channel].FCFGM;
48 if (fcfgm.B.FIR0EN != 0)
50 frequency = frequency / 2;
53 if (fcfgm.B.FIR1EN != 0)
55 frequency = frequency / 2;
66 return frequency / ((
float32)1.0 + dsadc->CH[channel].FCFGC.B.CFMDF);
72 Ifx_DSADC_CH_FCFGC fcfgc = dsadc->CH[channel].FCFGC;
73 Ifx_DSADC_CH_FCFGM fcfgm = dsadc->CH[channel].FCFGM;
74 Ifx_DSADC_CH_DICFG dicfg = dsadc->CH[channel].DICFG;
75 Ifx_DSADC_CH_IWCTR iwctr = dsadc->CH[channel].IWCTR;
77 float32 tsComb = tsMod * (1 + fcfgc.B.CFMDF);
78 float32 tsFir0 = tsComb * (1 + fcfgm.B.FIR0EN);
79 float32 tsFir1 = tsFir0 * (1 + fcfgm.B.FIR1EN);
82 uint32 combN = (1 + fcfgc.B.CFMDF);
83 float32 gdComb = tsMod * ((fcfgc.B.CFMC < 3) ? (0.5 * (fcfgc.B.CFMC + 1) * (
float32)combN) : ((
float32)combN + 1));
84 float32 gdFir0 = (fcfgm.B.FIR0EN != 0) ? (0.5 * 8 * tsComb) : 0;
85 float32 gdFir1 = (fcfgm.B.FIR1EN != 0) ? (0.5 * 28 * tsFir0) : 0;
88 return gdDsA + gdComb + gdFir0 + gdFir1 + gdInt;
94 return &(MODULE_SRC.DSADC.DSADC[channel].SRM);
102 return sourceFreq / ((dsadc->CH[channel].MODCFG.B.DIVM + 1) * 2);
110 switch (dsadc->GLOBCFG.B.MCSEL)
135 dsadc->KRST0.B.RST = 1;
136 dsadc->KRST1.B.RST = 1;
139 while (0 == dsadc->KRST0.B.RSTSTAT)
144 dsadc->KRSTCLR.B.CLR = 1;