Introduction
The STM32L4 series chips based on the Cortex M4 core in the ultra-low-power STM32 series integrate the DFSDM digital filter module, which, when used in conjunction with Σ-Δ devices, can perform high-precision and high-speed AD measurements. This article provides a basic introduction to DFSDM and demonstrates a practical application with the STM32L4 MCU.
Application System Block Diagram
The system is divided into two parts: the external analog front end of STM32 Σ-Δ module and the built-in digital part of the DFSDM module.
DFSDM is a new digital peripheral built into STM32 products, typically used in conjunction with external Σ-Δ devices. The external analog part can be selected according to the corresponding application for measurements, motor control, and other applications. The analog part provides serial data to DFSDM, which is responsible for processing the digital signals.
The digital part of DFSDM integrates an analog watchdog, injected and regular conversions, a flexible trigger system, interrupt signal generation, extreme value detection, and more.
Σ-Δ Module
-
Input analog signal.
-
Output 1-bit or 2-bit fast serial digital signals, up to 20MHz rate.
-
Wide vendor support: ST, TI, Analog Devices.
DFSDM= Digital Filter for Sigma Delta Modulators
-
Receive serial data from the Σ-Δ module
-
Filter the received Σ-Δ module data
-
Maximum 24-bit output precision
Typical Applications
-
Electrical signal measurement: current, voltage, etc.
-
Motor control
-
Medical applications
-
Microphone audio
The STM32 DFSDM architecture is as follows:
Transceiver
-
Fast serial input (20MHz)
-
SPI or Manchester encoding mode
-
Clock generation
-
Internal parallel input
-
16-bit register data input written by CPU/DMA
-
The transceiver provides a serial connection to external Σ-Δ modules, supporting SPI and Manchester protocols. The transceiver also supports internal 16-bit parallel data input written to the DFSDM data register by CPU or DMA.
Filter
-
Sinc1, Sinc2, Sinc3, Sinc4, Sinc5, FastSinc interpolation filters, oversampling factors up to 1024.
-
Integrator oversampling factors up to 1024
The STM32 DFSDM application block diagram is as follows:
The entire DFSDM module includes the following interfaces::
-
8 serial transceivers
-
4 Sinc filters and integrators
-
4 output data units
-
4 analog watchdogs
-
8 short circuit detectors
-
4 extreme value detectors
-
8 parallel data input registers
Serial Transceiver
Function
-
Receives 1-bit serial data from the Σ-Δ module, providing clock and data to the filtering stage, supporting up to 8 input serial channels.
Supported Protocols
-
1-line Manchester encoding
-
SPI mode (clock and data lines)
-
Sampling on rising edge, falling edge
-
Data rate measurement
-
Clock missing detection
-
Clock rate up to 20MHz
-
The serial input (clock and data) channels DFSDM_DATINy and DFSDM_CKINy can be redirected, with channel redirection used to collect PDM audio data from stereo microphone types, where the PDM stereo microphone has clock and data signals, providing left and right channel information, with the left channel sampled on the clock rising edge and the right channel sampled on the clock falling edge.
Parallel Transceiver
Function
-
Receives 16-bit parallel data from internal data sources and provides data to the filtering stage. Supports up to 8 parallel channels.
Internal Parallel Input Data Sources
-
RAM data post-processing
-
Data processing from internal ADC
-
Post-processed data from collected data
-
CPU or DMA provides data to DFSDM input registers
Using STM32 DFSDM for temperature measurement application schematic is as follows:
STPMS2 is a dual-channel second-order Σ-Δ module, one channel senses the voltage of PT100, and the other channel senses the current of PT100. A 1-second timer is used to trigger the two channels for injected scan conversion. PC7(DFSDM1_DATIN3) is channel 3, and the clock is PC2(DFSDM1_CKOUT). Channel 3 measures the voltage of PT100, and channel 2 measures the current of PT100.
The temperature calculation formula for PT100 is: T = (PT100 – 100) / (0.385), as long as the voltage and current of PT100 can be measured, the resistance value of PT100 can be calculated, and thus the temperature value can be obtained.
Application Example Introduction
The hardware platform is based on STM32L476G-EVAL, configured using the STM32CubeMx tool. For more configuration details and introductions, please click the “Read the original” link at the bottom left to download and read.
=====================================
Previous Topics Links:
1. Ways and means to obtain STMCU technical materials and support
2. Analysis of the impact of RMW on STM32F7 core operating speed
3. Issues caused by Flash erase/write operations leading to USART data loss
4. Case sharing of abnormal reception when the serial port works in DMA mode
5. The free version of STM8 cosmic C compiler with no code limitation is released
Leave a Comment
Your email address will not be published. Required fields are marked *