Skip to main content
Explorer
August 6, 2025
Solved

PWM generation on pb15 led pins nucleo wl55

  • August 6, 2025
  • 2 replies
  • 261 views

I am working with the NUCLEO-WL55 board and trying to generate PWM on multiple pins.

PWM output works fine on normal channels (e.g., TIM2 CH4 on PB11, TIM17 CH1 on PB9),

but I cannot get any PWM signal on TIM1 CH3N (PB15).

 

 

HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_3);

HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_4);

HAL_TIM_PWM_Start(&htim17, TIM_CHANNEL_1);

 

__HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_3, 200);    //ledpin pb15 ch3n

__HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_4, 300);    //ledpin pb11 ch4

__HAL_TIM_SET_COMPARE(&htim17, TIM_CHANNEL_1, 500);  //ledpin pb9 ch1

 

 

  1. Is there a specific configuration required to enable the complementary output (CH3N) on TIM1?

  2. Does CH3N require enabling the complementary outputs or any special polarity settings in CubeMX?

  3. Could this be a hardware limitation of the NUCLEO-WL55 board?

 

 

Any guidance or working example for TIM1 CH3N (PB15) PWM would be appreciated.

 

 

 

 

    This topic has been closed for replies.
    Best answer by Mike_ST

    Hello,

    Please use the HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel) function that is in stm32wlxx_hal_tim_ex.c to enable the complementary output.

    2 replies

    Super User
    August 6, 2025

    The MOE bit needs set on advanced timers to enable output.

    Mike_STAnswer
    Technical Moderator
    August 6, 2025

    Hello,

    Please use the HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel) function that is in stm32wlxx_hal_tim_ex.c to enable the complementary output.