cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the Prescaler register?

SKang.11
Associate

Hi there,

I am using Nucleo-H745ZI-Q. I am trying to create 1 microsecond(us) timer. My timer clock frequency is 75Mhz. So first time, I put in 75Mhz for the prescaler. But the error range was 500 ms per second.

So I googled and found this comment.

-->> In the CubeMX perspective, open Timers and select TIM16. Set the Prescaler (PSC) to 74. I’ll write “75 - 1�? to show that a prescaler value of 74 actually means use a clock divider or 75. The prescaler is off by 1 because it’s 0-based: a PSC value of “0�? means to use a prescaler (clock divider) of 1.

I put in 74Mhz for the prescaler and error range was under 500 us(solved problem).

I just want to make sure about that. I couldn't find the official comment about the prescaler in the manual and datasheet document.

Could you confirm it for me?

Please give me the comment or let me know where it is commented.

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Principal III

read in rm ->


_legacyfs_online_stmicro_images_0693W00000bl4GPQAY.png
_legacyfs_online_stmicro_images_0693W00000bl4GUQAY.png
_legacyfs_online_stmicro_images_0693W00000bl4GZQAY.png

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

View solution in original post

2 REPLIES 2
AScha.3
Principal III

read in rm ->


_legacyfs_online_stmicro_images_0693W00000bl4GPQAY.png
_legacyfs_online_stmicro_images_0693W00000bl4GUQAY.png
_legacyfs_online_stmicro_images_0693W00000bl4GZQAY.png

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

Thank you for quick reply​.