Skip to main content
MirKoz
Associate II
August 28, 2019
Question

How timers in STM32F7 start workig?

  • August 28, 2019
  • 1 reply
  • 2011 views

While preparing slides for students about timers in STM32F7 microcontrollers, I came across several inaccuracies in the description of their work presented in the STM32F7 reference manual RM0410 rev 4. The following sentence can be found in the mentioned document: “Note that the actual counter enable signal CNT_EN is set 1 clock cycle after CEN�?. However, in Fig 337 one of the signal is signed as follows (CEN=CNT_EN), which contradicts the statement from the quoted sentence.

In turn, elsewhere in the same document I came across the following sentence: “As soon as the CEN bit is written to 1, the prescaler is clocked by the internal clock CK_INT�?. How should I understand the statement "as soon as" – in the same moment? Fig. 337 shows that the signal CK_PSC appears two periods of CK_INT after the rising edge of CNT_EN. However, in Figs. 331 to 333 I see something different – the signal CK_PSC exists before the rising edge of CNT_EN.

This topic has been closed for replies.

1 reply

Vincent Onde
ST Employee
September 9, 2019

​Hello,

I agree there are several errors in these figures. The internal clock and CK_PSC (before the prescaler) are existing before the rising edge of CNT_CEN.

On the figure 337, on must remove the "CK_CNT=CK_PSC" as well as CEN= CNT_CEN.

The counter clock CK_CNT always appear after the CEN bit write.

Another error: the clock actually appears 2 cycles after CEN write (Fig. 337 is correct for this, while Fig. 331, 335, 336 are wrong).

This will be corrected for the next timer specifications revision, and deployed for next reference manuals releases.

Best regards,

Vincent

MirKoz
MirKozAuthor
Associate II
September 9, 2019

Thank you for your reply. I have prepared a drawing that takes into account your answer. Please correct me if something is wrong.

0690X00000AQw3oQAD.png

I steel do not know what is the relation between the CEN bit and the CNT_EN signal. Is it set 1 clock cycle after CEN bit?

I also don't know how the counter starts when the PSC is different from 0. For this case I have also prepared a drawing. If it is incorrect, I would be grateful if you could point out any errors in it.

0690X00000AQw48QAD.png

Best regards,

Mirek

Vincent Onde
ST Employee
September 10, 2019

​Hello Mirek,

The 2 drawings are perfect.

The CNT_EN (counter enable) signal is set 2 cycles after CEN bit write. But you better not mention this, it doesn't bring much to the understanding of the timer, and it is even confusing. It is enough to see the ck_cnt starting 2 cycles after CEN.

Best regards,

Vincent