Skip to content

Commit 0cc61bc

Browse files
committed
Update timer debug statements
1 parent 3f46b77 commit 0cc61bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hw/timer/stm32_timer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,12 @@ static void stm32_timer_update(Stm32Timer *s)
183183

184184
if (s->cr1 & 0x01) /* timer enable */
185185
{
186+
DPRINTF("%s Enabling timer\n", stm32_periph_name(s->periph));
186187
ptimer_run(s->timer, !(s->cr1 & 0x04));
187188
}
188189
else
189190
{
191+
DPRINTF("%s Disabling timer\n", stm32_periph_name(s->periph));
190192
ptimer_stop(s->timer);
191193
}
192194
}
@@ -319,8 +321,8 @@ static void stm32_timer_write(void * opaque, hwaddr offset,
319321
switch (offset) {
320322
case TIMER_CR1_OFFSET:
321323
s->cr1 = value & 0x3FF;
322-
stm32_timer_update(s);
323324
DPRINTF("%s cr1 = %x\n", stm32_periph_name(s->periph), s->cr1);
325+
stm32_timer_update(s);
324326
break;
325327
case TIMER_CR2_OFFSET:
326328
/* s->cr2 = value & 0xF8; */

0 commit comments

Comments
 (0)