Skip to main content
Hayden McCabe
Associate
October 14, 2020
Solved

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

  • October 14, 2020
  • 5 replies
  • 1731 views

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.

This topic has been closed for replies.
Best answer by waclawek.jan

> 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

5 replies

waclawek.jan
waclawek.janBest answer
Super User
October 14, 2020

> 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

Hayden McCabe
Associate
October 14, 2020

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

waclawek.jan
Super User
October 14, 2020

Please come back with your findings.

JW

Hayden McCabe
Associate
October 16, 2020

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.

waclawek.jan
Super User
October 16, 2020

Thanks for the info.

JW