Skip to main content
SKang.11
Associate
May 29, 2023
Solved

How to set the Prescaler register?

  • May 29, 2023
  • 1 reply
  • 3276 views

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,

This topic has been closed for replies.
Best answer by AScha.3

read in rm ->


_legacyfs_online_stmicro_images_0693W00000bl4GPQAY.png
_legacyfs_online_stmicro_images_0693W00000bl4GUQAY.png
_legacyfs_online_stmicro_images_0693W00000bl4GZQAY.png

1 reply

AScha.3
AScha.3Best answer
Super User
May 29, 2023

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""."
SKang.11
SKang.11Author
Associate
May 29, 2023

Thank you for quick reply​.