2025-07-23 3:16 PM
I am confused about which clock(s) drive the timers. In the reference manual is says the APB clock drives the timers but there are 5 APB clocks. Also, in STM32CubeMX there is a "Timer Group Clocks". What clocks drive which timers or is the one drives all (Timer Group Clocks)?
Solved! Go to Solution.
2025-07-23 4:58 PM
Go to the reference manual in the "Peripheral register boundary addresses" table and you can see which timer is within which APB.
The "timer group clock" is a separate clock you can use to clock individual timers. See timgx_ck below
It's also listed here which PCLK goes with which timer:
2025-07-23 4:58 PM
Go to the reference manual in the "Peripheral register boundary addresses" table and you can see which timer is within which APB.
The "timer group clock" is a separate clock you can use to clock individual timers. See timgx_ck below
It's also listed here which PCLK goes with which timer:
2025-07-23 5:21 PM - edited 2025-07-23 5:30 PM
I missed that in the "Peripheral register boundary addresses". I guess I do not know what "PClkx" is and where it comes from. I am using STM32CubeMX and am confused on how to set the clocks for the timers. Nothing seems to match with the documentation. What are the "Timer Clock Group" clocks.
2025-07-23 6:11 PM
pclk1 is the APB1 clock here:
timer group clocks is this:
This is in the CubeMX clock tree which helps visualize it, but it should match the RM. What isn't matching the documentation?
2025-07-23 6:22 PM - edited 2025-07-23 6:54 PM
I see that. I figured out that the PClk was the APBx clock after you told me what to look for. What I don't understand is if either the PClk or "Timer Group Clocks" can be used for the timers and how to set them in STM32CubeMX. In the RM is only mentions the APB clock. On the timer diagram for each timer it show tim_pck for the simple timers and tim_pck and tim_ker_ck for the more advanced timers. Nothing is mentioned about the multiple APB clocks or "Timer Group Clocks". This is very confusing to me. I am used to the smaller STM32 devices and I am trying to figure this out.