Skip to main content
KDehm
Associate III
February 12, 2020
Question

DMA and DMAMUX on STM32MP157 DK

  • February 12, 2020
  • 1 reply
  • 774 views

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!

This topic has been closed for replies.

1 reply

PatrickF
Technical Moderator
February 13, 2020

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 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent