2021-09-17 2:22 AM
Hi,
I want to use an STM32H743 for sampling one TIM.CNT and one ADC channel synchronously and store the data of both peripherals in array buf_adc[5000] and buf_timcnt[5000].
Therefore I want to use the DMAMUX request generation and use LPTIM2 as trigger with a update frequency of 6 MHz.
I configured two DMA channels in circular mode in CUBE and the LPTIM2 as request generator.
For testing I use one TIM.CNT and transfer the data from this register two both memory buffers to check for synchronous sampling.
I tested the DMA streams synchronous sampling by checking NDTR register for both streams. This value of NDTR is consistent, but if I compare the two arrays, one is showing a perfect sawtooth signal and the other one shows just trash.
Has anyone ever tried to synchonize two DMA transfers at this high frequency or/and can help me with this problem?
It seems the DMA transfer is corrupted.
2021-09-17 3:57 AM
Does it work at lower speeds?
If that fails then clearly that's a red herring..
2021-09-17 4:14 AM
2021-09-17 4:19 AM
I will check again if the serial connection, where is send data to the pc is fine. Maybe that's a problem
2021-09-17 4:38 AM
Serial connection is fine. It really seems to be a DMA problem.
2021-09-24 3:00 AM
Hi @DFlad.1 ,
Is your application based on a code generated with latest versions of STM32CubeMX (6.3.0) or STM32CubeIDE (1.7.0)?
If yes, please make sure that MX_DMA_Init() is called before peripheral initialization.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.