Skip to main content
Visitor II
October 15, 2024
Question

PWM signal generating by using DMA stream on TIM3_CH3

  • October 15, 2024
  • 4 replies
  • 1763 views

I tried configuring PC8 for TIM3_CH3 to generate a PWM signal by using DMA stream. But im not seeing any signal on the line. The same is tried by configuring TIM3_CH4 on PB1 and this works. Please help me understanding what can be going wrong.

    This topic has been closed for replies.

    4 replies

    ST Employee
    October 15, 2024

    Hello @AnoopYadav

    Could you specify which product are you using?

    Visitor II
    October 16, 2024

    I am using stm32h753.

    Super User
    October 16, 2024

    Read out and check/post content of TIM and relevant DMA and GPIO registers.

    JW

    Visitor II
    October 16, 2024

    Hi waclawek.jan,

    Thank you for the response. The information provided in the reference manual does not contain details about the pin that is to be used for PWM and it is observed that when TIM3 - Channel 3 is enabled for PWM generation, two options are available in the DMA settings namely TIM3_CH3 and TIM3_UP. Needed more clarity of which selection of channel and the GPIO to use for my requirement.

    Super User
    October 16, 2024

    > The information provided in the reference manual does not contain details about the pin that is to be used for PWM

    Assignment of pins to individual peripherals (here TIM3_CH3) is in the Datasheet to given STM32.

    > when TIM3 - Channel 3 is enabled for PWM generation, two options are available in the DMA settings namely TIM3_CH3 and TIM3_UP

    You are probably talking about CubeMX. I don't use Cube/CubeMX. The choice of DMA trigger depends on whether the respective TIMx_CCRx register is set to be preloaded or not. In the former case (which is in the majority of cases the preferred one), you want to use the Update event (TIM3_UP), as that gives you the most time until the next Update where the preloaded value gets active; in the latter case you probably want to use TIM3_CH3 as trigger.

    But get PWM working first, without DMA.

    If you are a beginner, you also may want to start with the examples provided in Cube.

    JW

    Super User
    October 17, 2024

    What hardware is this, a "known good" board like Nucleo or Disco, or your own?

    JW

    Visitor II
    October 18, 2024

    I am using Nucleo-H753ZI.

    Super User
    October 19, 2024

    Where do you measure the PC8 ouput?
    Have you tried to set PC8 to GPIO output and toggle it "manually" in the program?

    JW