PWM on Nucleo-STM32F103RB
There are two obvious problems that I could see with your code!


You have not clearly mentioned how you have changed the name of HAL_TIM_PWM_MspInit() to HAL_TIM_PWM_Init() but I am assuming you have directly changed the function name in the stm32f1xx_hal_msp.c file. That could be the main mistake! Because both of them are different functions and does different initializations. 


HAL_TIM_PWM_MspInit() initializes the Timer clock and HAL_TIM_PWM_Init() initializes the TIM PWM Time base according to the configurations given. 


You are skipping two important things in the timer configuration. One is HAL_TIM_MspPostInit() function which initializes the TIMER GPIO pins and the other is "AutoReloadPreload" has to be enabled!

htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
  HAL_TIM_MspPostInit(&amp;htim3)