cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N657xx Timer Clock(s)

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)? 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

Go to the reference manual in the "Peripheral register boundary addresses" table and you can see which timer is within which APB.

TDK_0-1753314748726.png

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:

TDK_1-1753314979134.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Super User

Go to the reference manual in the "Peripheral register boundary addresses" table and you can see which timer is within which APB.

TDK_0-1753314748726.png

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:

TDK_1-1753314979134.png

 

If you feel a post has answered your question, please click "Accept as Solution".

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.  

pclk1 is the APB1 clock here:

TDK_0-1753319190814.png

 

timer group clocks is this:

TDK_1-1753319218000.png

 

This is in the CubeMX clock tree which helps visualize it, but it should match the RM. What isn't matching the documentation?

 

If you feel a post has answered your question, please click "Accept as Solution".

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.