cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone had any success generating sinusoidal PWM with DMA, on STM32G474? The same code that I implemented on a STM32F series does not work. Also, the ST example for this board, related to this topic, TIM_DMA, does not run as it has binaries missing.

CDami.1
Associate

0693W000007ElP4QAK.png

2 REPLIES 2
Igor Cesko
ST Employee

Hi CDami.1 (Community Member),

Please check the example provided for STM32G4 Cube library (download it as update in STM32CubeMX):

"\Repository\STM32Cube_FW_G4_V1.4.0\Projects\NUCLEO-G474RE\Examples\TIM\TIM_DMA"\ 

There is TIM DMA example: DMA is changing the duty cycle - which can be adopted to sinewave generation.

Regards

Igor

CDami.1
Associate

That was the first thing I tried, but the example does not compile. Anyhow, I found the solution to my problem; the DMA should be configured as word instead of halfword.