[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH qemu v3 20/20] Fixing the basic functionality of STM32 timers
From: |
~lbryndza |
Subject: |
[PATCH qemu v3 20/20] Fixing the basic functionality of STM32 timers |
Date: |
Sat, 02 Dec 2023 13:28:47 +0100 |
From: Lucjan Bryndza <lbryndza.oss@icloud.com>
The current implementation of timers does not work properly
even in basic functionality. A counter configured to report
an interrupt every 10ms reports the first interrupts after a
few seconds. There are also no properly implemented count up an
count down modes. This commit fixes bugs with interrupt
reporting and implements the basic modes of the counter's
time-base block.
Improve clock configuration
Signed-off-by: Lucjan Bryndza <lbryndza.oss@icloud.com>
---
hw/arm/stm32f405_soc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c
index a65bbe298d..17d6b2ec4a 100644
--- a/hw/arm/stm32f405_soc.c
+++ b/hw/arm/stm32f405_soc.c
@@ -183,7 +183,7 @@ static void stm32f405_soc_realize(DeviceState *dev_soc,
Error **errp)
/* Timer 2 to 5 */
for (i = 0; i < STM_NUM_TIMERS; i++) {
dev = DEVICE(&(s->timer[i]));
- qdev_prop_set_uint64(dev, "clock-frequency", 1000000000);
+ qdev_prop_set_uint64(dev, "clock-frequency", 48000000);
if (!sysbus_realize(SYS_BUS_DEVICE(&s->timer[i]), errp)) {
return;
}
--
2.38.5
- [PATCH qemu v3 10/20] Fixing the basic functionality of STM32 timers, (continued)
- [PATCH qemu v3 10/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 08/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 11/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 17/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 14/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 13/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 09/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 16/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 19/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 18/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- [PATCH qemu v3 20/20] Fixing the basic functionality of STM32 timers,
~lbryndza <=
- [PATCH qemu v3 15/20] Fixing the basic functionality of STM32 timers, ~lbryndza, 2023/12/02
- Re: [PATCH qemu v3 00/20] Fix malfunctioning of T2-T5 timers on the STM32 platform, Alistair Francis, 2023/12/05