cancel
Showing results for 
Search instead for 
Did you mean: 

Example for GPIO control using DMA and PWM.

KKIM.6
Senior II

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?

1 ACCEPTED SOLUTION
3 REPLIES 3
Sarra.S
ST Employee

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
Senior II

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.