cancel
Showing results for 
Search instead for 
Did you mean: 

Timer + PWM + DMA

AFink
Associate III

Hi,

I’m looking for some tutorial (or any other learning staff) related to Timer + PWM + DMA.

Unfortunately, I couldn’t find much info related to these issues.

 

I’d like to learn:

  1. LL_TIM_CC_EnableChannel() and LL_TIM_CC_DisableChannel():
    1. What exactly do these func do? When should IO use them?
    2. Is it available only while using DMA?
    3. What is the sequence of calling this func?
      1. Do I have to start DMA first using HAL_TIM_PWM_Start_DMA()?
      2. Will LL_TIM_CC_DisableChannel() stop/pause the DMA operation, or I must call HAL_TIM_PWM_Stop_DMA()?
  2. What is the flow chart (i.e.: sequence) of the MCU while using Timer + PWM + DMA? As far as I understood (please fix me:( Timer event --> “Send” data using to PWM DMA --> PWM operation on gpio (according to data)
  3. ...

Thanks,

Aviv

2 REPLIES 2
STTwo-32
ST Employee

Hello @AFink 

I suggest you to follow the fifth and sixth video of this playlist.

Best Regards.

STTwo-32 

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.

Pierre_Paris
ST Employee

Hello @AFink and @STTwo-32 ,

Thank you for your question !
I am adding some information / questions :

  • You can also read this article named "Custom Signal generation using PWM and DMA"
  • I need to know more about what is your application & STM32 product ? Can you please explain it ?
  • According to User Manual LL_TIM_CC_EnableChannel() allow to enable capture/compare channels. Each Capture/Compare channel is built around a capture/compare register (including a shadow register), a input stage for capture (with digital filter, multiplexing and prescaler) and an output stage (with comparator and output control). To read more about capture/compare channels, read chapter 17.3.5 of the RM0090.
  • Check also the 17.4.7 chapter, which mode are you interested in ?

Best Regards,

Pierre

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.