2020-12-29 10:38 AM
I have working sytem with 4 ADC and 4 DMA
Since Im triggering 2 ADC with one Timer (at fixed 25 kHz) and 2 ADC with another timer (at variable 70-240khz) I want to synchronize the DMA data from all ADCs (to the frequency of slower 25kHz timer)
So in one of my slower DMA chanel I have enabled synchronization event with request number 1.
For the faster ADC-DMA channels I have enabled synchronization signal to get it from slower DMA chanell.
Unfortunately in my faster DMA I have recievied data only once and despite the my slow DMA Channel are working.
Im using Cube with LL.
code for dma which syncs all other dma's:
LL_DMAMUX_EnableEventGeneration(DMAMUX1, LL_DMAMUX_CHANNEL_1);
LL_DMAMUX_SetSyncRequestNb(DMAMUX1, LL_DMAMUX_CHANNEL_1, 1);
Code for DMA which shoud be synchronized :
LL_DMAMUX_EnableSync(DMAMUX1, LL_DMAMUX_CHANNEL_4);
LL_DMAMUX_SetSyncID(DMAMUX1, LL_DMAMUX_CHANNEL_4, LL_DMAMUX_SYNC_DMAMUX_CH1);
LL_DMAMUX_SetSyncPolarity(DMAMUX1, LL_DMAMUX_CHANNEL_4, LL_DMAMUX_SYNC_POL_RISING);
LL_DMAMUX_SetSyncRequestNb(DMAMUX1, LL_DMAMUX_CHANNEL_4, 1);
Should i have to clear some flag (but overrunn is not occuring) or something like that?
2021-05-27 05:47 AM
Hi KoRba88,
Please try to study the DMA MUX synchronization example which is provided within STM32 Cube package for STM32G4: "\STM32Cube_FW_G4_V1.4.0\Projects\NUCLEO-G474RE\Examples\DMA\DMA_MUXSYNC".
Maybe this can help to solve your problem.
Regards
Igor