Change us_ticker timer as needed for PWM

Hello all, I have prepared a custom target for the STM32F103VDT and it is working but for any reason the PWMs on pins PD_12,13,14,15 are not. I have changed the us_timer as per Jan Kamidra suggestion but with no success, this is what I have done :

/*
#define TIM_MST      TIM4
#define TIM_MST_IRQ  TIM4_IRQn
#define TIM_MST_RCC  __HAL_RCC_TIM4_CLK_ENABLE()
#define TIM_MST_DBGMCU_FREEZE  __HAL_DBGMCU_FREEZE_TIM4()

#define TIM_MST_RESET_ON   __HAL_RCC_TIM4_FORCE_RESET()
#define TIM_MST_RESET_OFF  __HAL_RCC_TIM4_RELEASE_RESET()

*/
#define TIM_MST      TIM5
#define TIM_MST_IRQ  TIM5_IRQn
#define TIM_MST_RCC  __HAL_RCC_TIM5_CLK_ENABLE()
#define TIM_MST_DBGMCU_FREEZE  __HAL_DBGMCU_FREEZE_TIM5()

#define TIM_MST_RESET_ON   __HAL_RCC_TIM5_FORCE_RESET()
#define TIM_MST_RESET_OFF  __HAL_RCC_TIM5_RELEASE_RESET()

#define TIM_MST_BIT_WIDTH  16 // 16 or 32

#define TIM_MST_PCLK  1 // Select the peripheral clock number (1 or 2)

Do I miss something?, maybe I need to do something more to free TIM4 for PWM?

Thank you very much

Regards

Miguel Angel

It seems the alternate function for channels 1 to 4 in timer 4 is not exectuted, forcing the execution using HAL solves the problem:

    __HAL_AFIO_REMAP_TIM4_ENABLE();
 
    PwmOut pump8(PD_12);
    pump8.period_us(50);
    pump8.write(0.10f); 

    PwmOut pump7(PD_13);
    pump7.period_us(50);
    pump7.write(0.25f); 

    PwmOut pump6(PD_14);
    pump6.period_us(50);
    pump6.write(0.50f);  

    PwmOut pump5(PD_15);
    pump5.period_us(50);
    pump5.write(0.75f);  

Thank you.

Miguel Angel