2024-09-02 06:51 PM
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);
2024-09-02 07:22 PM
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
2024-09-02 07:45 PM
***! Why did the H7 series got this DMA issue? It looks like I have to migrate to F7 series?
2024-09-02 07:53 PM
> ***! 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.
2024-09-02 07:58 PM
I have used the F072 DMA with PWM before, and it works fine... Why does the H7 have all these issues...
2024-09-02 10:27 PM
Because it's very complicated.
And that's because that's the only way to achieve the high operational speed.
JW
2024-09-02 10:29 PM
> 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...