cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C0 DMAMUX SYNC example

Kraal
Lead

Dear community,

I would like to send a char buffer through UART using DMA, but at a precise interval (or delay).

I know how to use the DMA with USART TX, it works flawlessly.
The interesting bit is the delay between the DMA transfers.
I know I can do it with a polling loop, and I know I can do it with a timer and in its interrupt, trig the DMA by enabling the DMA channel.

On the C0 devices (and others), the DMA uses a DMAMUX that has a SYNC feature, which according to the documentation, should provide exactly what I'm looking for.
However, I could not make it work at all.

According to RM0490, table 51 on page 245, the sync input 21 is TIM14 TRGO (by the way, what is TIM14 signal for TRGO ?). So I set the SYNC ID, the number of requests (to anything for the moment, let say 4), rising edge for the sync polarity and set the SE bit (which is redundant with SPOL in my view, since SPOL = 0 will stop the sync).

Has anyone succesfully used the SYNC feature of DMAMUX, to a similar use case ?

Thank you and have a nice day.

1 REPLY 1
Imen.D
ST Employee

Hello @Kraal 

Did you follow the DMAMUX configuration and examples provided in this application note: AN5224 Introduction to DMAMUX for STM32 MCUs?

This article helps on how to use DMAMUX: How to use DMAMUX on the STM32 microcontrollers

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen