cancel
Showing results for 
Search instead for 
Did you mean: 

Can the STM32G4’s DMA multiplexer (DMAMUX) be synchronized to a timer other than LPTIM?

Hayden McCabe
Associate II

I’m working with an STM32G474RE chip, and I’m trying to use the synchronization feature of the DMA multiplexer to time when a DMA transfer to SPITX should occur. I’d like to have this timed synchronously to some other timer events.

Looking at the documentation, it appears like the options for synchronization signals come from EXTI 0-15, signals generated in the DMAMUX itself, or the LPTIM timer’s output.

The LPTIM timer doesn’t have the same connections to the synchronization signals as the other timers (advanced, general, and basic), so I can’t use it to generate the needed signal. I suppose I could generate a waveform on a timer’s channel output, route that with a wire to another GPIO pin, and use that as a synchronization signal, but that is so unnecessarily wasteful and introduces the possibility of capacitance issues, etc.

It seems very odd that the DMAMUX peripheral would include the synchronization function, but use an implementation that excludes timers. Is there something that can be done? I’m writing my code using CMSIS, but if there’s a HAL example somebody can point to, I could analyze that.

1 ACCEPTED SOLUTION

Accepted Solutions

> I could generate a waveform on a timer’s channel output, route that with a wire to another GPIO pin, and use that as a synchronization signal

EXTI works on output pin, too.

You can also try to synchronize to event generated from other DMAMUX, which in turn would be mapped to have its input from a TIM.

JW

View solution in original post

5 REPLIES 5

> I could generate a waveform on a timer’s channel output, route that with a wire to another GPIO pin, and use that as a synchronization signal

EXTI works on output pin, too.

You can also try to synchronize to event generated from other DMAMUX, which in turn would be mapped to have its input from a TIM.

JW

Oh wow, thank you. I think I’ll give that a try.

Please come back with your findings.

JW

Yes, after a bit of configuration, I got the DMA events to synchronize with an output (PWM) signal from a capture/compare channel in output mode. Interestingly, I was able to do it from channel 2 when channels 1 and 2 were used to make a combined channel. Thanks again.

Thanks for the info.

JW