cancel
Showing results for 
Search instead for 
Did you mean: 

Timer2 does not generate PWM output in Slave Mode and Tim1 in Master Mode

STuser2
Senior III

I am testing the Timer and PWM with different combinations to understand it better on NucleoF446RE board. I have configured as below

Timer1 as Master with trigger output as update event, PWM channel1 output on PA8 (interrupt). 

Timer2 as slave in trigger mode and output PWM Channel1 on PA5 same as LED based on interrupt.

Problem is Timer2 Channel1 output does not toggle on PA5 but if i place break point in tiimer2 interrupt is triggered.

void TIM2_IRQHandler(void)
{
  /* USER CODE BEGIN TIM2_IRQn 0 */
  /* USER CODE END TIM2_IRQn 0 */
  HAL_TIM_IRQHandler(&htim2);
  /* USER CODE BEGIN TIM2_IRQn 1 */

  /* USER CODE END TIM2_IRQn 1 */
}

Please guide to solve the issue.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

> sConfigOC.Pulse = 0;

This produces a DC signal, not a PWM.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
waclawek.jan
Super User

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

JW

PS. Don't @-invoke users to attract attention. It's inappropriate.

TDK
Super User

> sConfigOC.Pulse = 0;

This produces a DC signal, not a PWM.

If you feel a post has answered your question, please click "Accept as Solution".
STuser2
Senior III

Yes i have to verifying the register values, it may give some hint of solving the problem.