Skip to main content
CDe S.2
Visitor II
May 3, 2023
Question

Timers not outputting PWM

  • May 3, 2023
  • 1 reply
  • 1302 views

I am using the Nucleo L476RG board and I have configured TIM2 to output PWM in Channel 1. I have very basic code that should output a 25% duty cycle because I set the PWM pulse in the TIM2 parameters settings to 250. I have tested several pwm pins and watched many tutorials but I cannot observe any PWM signal using my oscilloscope. I have used the project example in the STM32Cube_FW_L4 folder from ST, but I cannot understand why my current code does not generate a pwm.


_legacyfs_online_stmicro_images_0693W00000bjJhgQAE.png 


_legacyfs_online_stmicro_images_0693W00000bjJhRQAU.png 


_legacyfs_online_stmicro_images_0693W00000bjJhqQAE.png

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
May 3, 2023

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

JW