cancel
Showing results for 
Search instead for 
Did you mean: 

DMA and DMAMUX on STM32MP157 DK

KDehm
Associate III

Hi,

I'm trying to get DMA2 requests working, using TIM and HAL. Iam using TIM5_CH2 and iam not sure which DMA2 stream should be used here (i use stream1). Creating PWM signal isn't a problem, but i want to change duty cycles (very common problem) by delivering a buffer of different pulses.

HAL_TIM_PWM_Start_DMA(&htim5, TIM_CHANNEL_2,(uint32_t*)buffer, 2) does not give the expected results.

According to the ref (p.1187 and 1227) there should probably be used multiplexing via DMAMUX, but i don't know how to use and how to interpret the table.

Maybe it is something like:

hdma_tim5_ch2.Instance = DMA2_Stream0;

hdma_tim5_ch2.DMAmuxChannel = DMAMUX1_Channel6;

in the TIM-DMA init, because DMAMUX has 16 channels with 8 streams each.

Thank you in advance!

1 REPLY 1
PatrickF
ST Employee

Hello,

Did you try generating a dummy project using CubeMx and check the generated code.

In order 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.