Skip to main content
parth kothiya
Associate III
January 21, 2020
Question

STM32F4 disco TIM1 PWM DMA mode not work.

  • January 21, 2020
  • 2 replies
  • 735 views

i want to generate variable duty PWM using TIM1 & DMA but it not work.

uint16_t variable_duty[10] = {0,1000,2000,3000,4000,5000,6000,7000,8000,9000};
 
HAL_TIM_PWM_Start_DMA(&htim1,TIM_CHANNEL_1,(uint32_t*)variable_duty,10);
HAL_TIM_PWM_Start_DMA(&htim1,TIM_CHANNEL_2,(uint32_t*)variable_duty,10);
HAL_TIM_PWM_Start_DMA(&htim1,TIM_CHANNEL_3,(uint32_t*)variable_duty,10);

This topic has been closed for replies.

2 replies

KnarfB
Super User
January 21, 2020

The correct setup of everything (not shown in your code) is important. You might look at this example http://fabioangeletti.altervista.org/blog/stm32-interface-ws2812b/

KnarfB

Imen GH
ST Employee
March 23, 2020

​Hello,

Please find attached a document which helps you to solve your problem.

As I mentioned, you must add the instructions and variables and check all configurations.

Regards