Skip to main content
Akoli.2
Associate II
June 23, 2022
Question

single DMA buffer for two timers STM32G0xx

  • June 23, 2022
  • 2 replies
  • 871 views

Hello. In a project with stm32g030 (071) I use two different timers to generate two PWM signals. The triggering of timers and PWM signals is out of phase by 180 degrees. Can I use one DMA buffer to load data into CCMR registers of two different timers?

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
June 23, 2022

Yes, why not.

DMA is just a simple busmaster which upon some stimulus reads memory and writes to peripheral. It does not care at all, whether any other busmaster or other channel of the same DMA reads the same memory.

JW

Akoli.2
Akoli.2Author
Associate II
June 23, 2022

Thank you. I don't see any problems either. Due to the phase shift, the timing of DMA channels accessing the buffer is different. But I decided to consult to be sure.