Skip to main content
ne562
Associate III
September 4, 2022
Solved

STM32G030 - fire DMA on pin's positive edge

  • September 4, 2022
  • 3 replies
  • 936 views

Is there a possibility to fire DMA transfer on a positive edge on the GPIO pin (PA3) ?

This topic has been closed for replies.
Best answer by gbm

As I already wrote above - according to the chip errata it doesn't work. So you should either connect the PA3 to any free pin being a timer input or use EXTI interrupt to achieve the similar functionality with approx. 20..30 clock cycles delay (DMA typically has 5..12 cycle delay).

UPDATE: it should be fixed in rev. Y of the chip, it didn't work in rev. Z.

3 replies

gbm
Lead III
September 4, 2022

It's possible only if the pin is a timer input - see the errata. It should be possible in G0 via DMAMUX but it's not due to the implementation problem. Other families equipped with DMAMUX support this functionality correctly - L4+, H7.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
ne562
ne562Author
Associate III
September 4, 2022

unfortunately, the pcbs are already produced, can't change pinout

[[ It should be possible in G0 via DMAMUX ]]

using CR0CR.SYNC_ID and RG0CR.SIG_ID ?

gbm
gbmBest answer
Lead III
September 4, 2022

As I already wrote above - according to the chip errata it doesn't work. So you should either connect the PA3 to any free pin being a timer input or use EXTI interrupt to achieve the similar functionality with approx. 20..30 clock cycles delay (DMA typically has 5..12 cycle delay).

UPDATE: it should be fixed in rev. Y of the chip, it didn't work in rev. Z.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice