2021-01-18 11:23 AM
Dear ST,
I am coming back to you to configure a PWM peripheral with STM32F429.
I am familiar with TI DSP and I have to implement it with ST this time.
Could you help me to configure TIMER1 for symmetrical PWM and trigger an interrupt to trig ADC. I ma using CubeIDE and CubeMX.
Thank you in advance,
S.Tarik
2021-01-18 11:55 AM
Find a TIM with CH1/CH1N outputs or program CH1 in PWM1 and CH2 in PWM2 mode
The periodicity of the TIM is controlled by the Prescaler and Period values (N-1)
ie output frequency = TIMCLK / (Prescaler + 1) / (Period + 1)
The duty goes into the Compare registers, ie CCRx = (Period + 1) / 2 for 50/50 duty
TIMCLK is typically APBxCLK * 2 in the non-DIV1 cases, see clock tree to understand options and which TIM is on which bus.
2021-01-19 01:33 PM
Thank you Tesla for the precise answer.
Would please confirm that if I am using the TIM1 the external clock is the same as APB without a Prescaler?
In the reference document, ST calls the clock an internal clock. I am using an external clock, the APB2 90Mhz clock.
How I do verify that I am connected to the external clock?
Please see the picture attached to this post.
Thank you in advance,
S.Tarik