Skip to content

Commit 270e5fb

Browse files
committed
Fix bug regarding update of UIF flag
1 parent 0cc61bc commit 270e5fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/timer/stm32_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static void stm32_timer_update(Stm32Timer *s)
195195

196196
static void stm32_timer_update_UIF(Stm32Timer *s, uint8_t value) {
197197
s->sr &= ~0x1; /* update interrupt flag in status reg */
198-
s->sr |= 0x1;
198+
s->sr |= (value & 0x1);
199199

200200
qemu_set_irq(s->irq, value);
201201
}

0 commit comments

Comments
 (0)