2025-08-10 8:16 AM - edited 2025-08-10 8:17 AM
I have the following settings in Cube Mx for TIM1
The TIM1 is used for PWM generation, but the slave mode, trigger source, clock source are disabled then how Tim1 receives the clock for pwm generation.
For TIM4 it is clearly stated
So i assume it will be taken from APB2 timer clock.
One final question
It is mentioned TRGO2 as above but how do i know it is connected to what? Please help.
2025-08-10 11:20 AM
I don't understand Your question.
You have to select a clock source for every Timer you want to use.
TRGO2 (and TRGO) can be used as trigger for other peripherials (for example to start and ADC converter), You have to select the Triger source if used. Then You have to select it on the receving peripherial.
Please consult the Reference manuale for the MCU you are using.
2025-08-10 12:27 PM
It is an MCSDK 6.4.0 Cube MX project and I am trying to understand it.
2025-08-10 1:22 PM
What does the manual say, what is the meaning of "Clock source" there?
JW
2025-08-10 9:42 PM - edited 2025-08-10 9:43 PM
Ok, thank you for the inputs i started verifying it
As per the clock configuration the TIM1 is driven by external 8MHZ crystal and it is 170MHz clock. It is not mentioned as internal as it is external clock driven in the CubeMx settings.
And for TIM4 it is driven by the internal clock as stated in the data sheet by 48MHz and also XOR of the Hall signals on TIM4Ch1, TIM4Ch2, TIM4Ch3.