
DocID024597 Rev 5
715/1830
RM0351
Digital filter for sigma delta modulators (DFSDM)
756
24.4.5
Configuring the input serial interface
The following parameters must be configured for the input serial interface:
•
Output clock predivider
. There is a programmable predivider to generate the output
clock from DFSDM clock (2 - 256). It is defined by CKOUTDIV[7:0] bits in
DFSDM_CH0CFGR1 register.
•
Serial interface type and input clock phase.
Selection of SPI or Manchester coding
and sampling edge of input clock. It is defined by SITP [1:0] bits in
DFSDM_CHyCFGR1 register.
•
Input clock source.
External source from CKINy pin or internal from CKOUT pin. It is
defined by SPICKSEL[1:0] field in DFSDM_CHyCFGR1 register.
•
Final data right bit-shift.
Defines the final data right bit shift to have the result aligned
to a 24-bit value. It is defined by DTRBS[4:0] in DFSDM_CHyCFGR2 register.
•
Channel offset per channel.
Defines the analog offset of a given serial channel (offset
of connected external
Σ∆
modulator). It is defined by OFFSET[23:0] bits in
DFSDM_CHyCFGR2 register.
•
short-circuit detector and clock absence per channel enable.
To enable or disable
the short-circuit detector (by SCDEN bit) and the clock absence monitoring (by
CKABEN bit) on a given serial channel in register DFSDM_CHyCFGR1.
•
Analog watchdog filter and short-circuit detector threshold settings.
To configure
channel analog watchdog filter parameters and channel short-circuit detector
parameters. Configurations are defined in DFSDM_CHyAWSCDR register.
24.4.6
Parallel data inputs
Each input channel provides a register for 16-bit parallel data input (besides serial data
input). Each 16-bit parallel input can be sourced from internal data sources only:
•
internal ADC results
(a)
•
direct CPU/DMA writing.
The selection for using serial or parallel data input for a given channel is done by field
DATMPX[1:0] of DFSDM_CHyCFGR1 register. In DATMPX[1:0] is also defined the parallel
data source: internal ADC
or direct write by CPU/DMA.
Each channel contains a 32-bit data input register DFSDM_CHyDATINR in which it can be
written a 16-bit data. Data are in 16-bit signed format. Those data can be used as input to
the digital filter which is accepting 16-bit parallel data.
If serial data input is selected (DATMPX[1:0] = 0), the DFSDM_CHyDATINR register is write
protected.
Input from internal ADC
In case of ADC data parallel input (DATMPX[1:0]=1) the ADC[y+1] result is assigned to
channel y input (ADC1 is filling DFSDM_CHDATIN0R register, ADC2 is filling
DFSDM_CHDATIN1R register, ... , ADC8 is filling DFSDM_CHDATIN7R register). End of
conversion event from ADC[y+1] causes update of channel y data (parallel data from
ADC[y+1] are put as next sample to digital filter). Data from ADC[y+1] is written into
DFSDM_CHyDATINR register (field INDAT0[15:0]) when end of conversion event occurred.
a. STM32L496xx/4A6xx devices only.