cancel
Showing results for 
Search instead for 
Did you mean: 

DMA channel1 Stream 0-7 which channel to choose

StanJerm
Associate III

Hi i m working on H732 timer1 as PWM and its working fine, but when I try to implement DMA on timer1, there is no waveform. I enclosed the DMA code below, as I declare an array of 10 PWM duty cycle values..

i suspect it's the Timer1 channel1 stream that's causing the issue, can anyone advise which stream to choose? (stream 0-7 ? )

  HAL_TIM_PWM_Start_DMA(&htim1, TIM_CHANNEL_1, (uint32_t *)pwmAll, 10);  

 

StanJerm_0-1725327735894.png

 

6 REPLIES 6
TDK
Guru

The streams within a DMA are equivalent in all important aspects. In any case, choosing a different stream will not fix the problem.

The problem is likely that the array is not in a location that the DMA can access.

DMA is not working on STM32H7 devices - STMicroelectronics Community

If you feel a post has answered your question, please click "Accept as Solution".

***! Why did the H7 series got this DMA issue? It looks like I have to migrate to F7 series? 

> ***! Why did the H7 series got this DMA issue? It looks like I have to migrate to F7 series? 

Did you read the linked article? It doesn't sound like you did.

If you feel a post has answered your question, please click "Accept as Solution".

I have used the F072 DMA with PWM before, and it works fine... Why does the H7 have all these issues...

Because it's very complicated. 

And that's because that's the only way to achieve the high operational speed. 

JW

Why does the H7 have all these issues...

Because it's a big, capable monster, even more an SoC than the "smaller" STMs.

You just have to learn how to tame it, there's lots of pitfalls, READ the reference manual & datasheet.

If it's anything like RM0468 for H723/725/733/735, then check chapter "2 MEmory and bus architecture", there should be a table which bus master / DMA / peripheral can access which bus slave / memory areas.

I recommend implementing the memory areas in the linker file, that will prevent the compiler from placing / using RAM areas which some parts cannot access, because you tell it where the used variables should be.

 

Anyway, set the DMA to circular, and the correct timer request?

You cannot always trust CubeMx to spill out working code...