2025-07-28 2:02 AM
Hello everyone,
in my current project, I'm working with a Nucleo H743ZI2 (with an STMH743ZIT6). My goal is to read audio data from MEMS microphones using DMA and DFSDM filters. The ultimate aim is to build an 8-microphone array, but for the first step, I only want to read data from a single microphone. And this is exactly where my problem lies: currently, no data is being saved in RAM. I suspect the problem is with DMA, as I've observed the following:
DFSDM:
DMA:
It seems to me that DMA is not starting correctly or that something in the configuration is incorrect. Even when I try to start the DMA manually by the following function, no interrupt is triggered:
void start_DMA1_Stream0(void)
{
DMA1_Stream0->CR = 0;
while (DMA1_Stream0->CR & DMA_SxCR_EN);
DMA1_Stream0->PAR = (uint32_t)DFSDM1_FLT0_CR1; // Peripherie adress
DMA1_Stream0->M0AR = (uint32_t)&audioBuffer; // buffer where the data shoul be stored
DMA1_Stream0->NDTR = 1024; // Sample count
DMAMUX1_Channel0->CCR = 101;
DMA1_Stream0->CR = (1 << 2) | // Transfer error interrupt enable
(1 << 3) | // Half transfer interrupt enable
(1 << 4) | // Transfer complete interrupt enable
(1 << 8) | // Circular Mode
(1 << 10) | // Memory increment
(1 << 12) | // Peripheral data size = word
(1 << 14) | // Memory data size = word
(1 << 0); // Enable
}
I have attached main.c below, maybe someone can help me with my problem. It also contains a few debugging functions that are not so important.
Thank you in advance.