Skip to main content
KKIM.6
Senior
November 16, 2023
Solved

Example for GPIO control using DMA and PWM.

I want to change the DMA memory according to the PWM signal and change the GPIO pin to turn on/off automatically based DMA memory information.

 

Are there any good examples of this?

This topic has been closed for replies.

3 replies

ST Employee
November 16, 2023

Hello @KKIM.6,

Could you provide more details maybe? 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
KKIM.6
KKIM.6Author
Senior
November 16, 2023

My microcontroller has 48 GPIO pins and I want to turn on and off each GPIO pin when 1 MHz PWM signal. 

Only One GPIO pin should be turned on once and the other GPIO pin should be turned off.

The reason I need to use DMA is that, In the case of HAL code, the on/off function speed of GPIO is around 1 ms not 1 us (1 MHz).

 

So, I want to assign on/off of GPIO to a DMA and the PWM value change the DMA of GPIO pin.

MasterT
MasterTBest answer
Lead II
November 16, 2023