Can the STM32G4’s DMA multiplexer (DMAMUX) be synchronized to a timer other than LPTIM?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-13 11:27 PM
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.
Solved! Go to Solution.
- Labels:
-
DMA
-
LPTIM
-
STM32G4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-14 12:58 AM
> 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-14 12:58 AM
> 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-14 03:18 AM
Oh wow, thank you. I think I’ll give that a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-14 07:30 AM
Please come back with your findings.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-16 03:53 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-16 06:25 AM
Thanks for the info.
JW