Skip to content

Commit 3f46b77

Browse files
committed
Add comment regarding timing
1 parent a5af78b commit 3f46b77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hw/timer/stm32_timer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ struct Stm32Timer {
115115

116116
static void stm32_timer_freq(Stm32Timer *s)
117117
{
118+
// Why do we need to multiply the frequency by 2? This is how real hardware
119+
// behaves.
118120
uint32_t clk_freq = 2*stm32_rcc_get_periph_freq(s->stm32_rcc, s->periph) / (s->psc + 1);
119121
DPRINTF
120122
(

0 commit comments

Comments
 (0)