NO PWM Whatsoever
Hi Ben
Thank you. Without realizing it you have just solved a problem for me by posting your 2nd picture showing your clock tree. It helped because it shows the the TIM peripherals are clocked at 2x the APBx rate of other peripherals.I had to double my prescaler divider without knowing why - now I do know why - thanks.
I Have Just got PWM Output working for channel-1 of General purpose TIM10 of a STM32F407VGt6 to drive a standard Futaba FPS148 servo. I am Using HAL version 1.4.4 in STM32 Cube F4 version 1.11.0. Consequently I will look at your work and see if I can spot any subspace anomalies.
In the meanwhile find attached a working TIM register snapshot. And my initialization code.
For what its worth I had exactly the same NO PWM problem and found that the TIM10->CCMR1(output) register had not been configured - it was 0 when it should have been 0x68. The reason was because the “HOW TO USE” instructions at the top of the stm32f4xx_hal_tim.c had a bullet list of instructions which I WRONGLY assumed contained ONE instruction per bullet - I had missed the 2nd instruction on one bullet to call function HAL_TIM_PWM_ConfigChannel(). It is possible others have missed that too.
To set the PWM level I load TIM10->CCR1 with a number between 1260 and 9660 (centered around 5460) because the servo PWM pulse is only allowed to be high for the first .3ms to 2.3ms of a 15.6ms period (in my application anyway. Officially/generically/typically it’s 1 to 2ms in a 20ms period, says Wiki)


