qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH qemu v3 00/20] Fix malfunctioning of T2-T5 timers on the STM32 platform
@ 2023-12-02 13:40 ~lbryndza
  2023-12-02 11:55 ` [PATCH qemu v3 01/20] Fixing the basic functionality of STM32 timers ~lbryndza
                   ` (20 more replies)
  0 siblings, 21 replies; 23+ messages in thread
From: ~lbryndza @ 2023-12-02 13:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alistair Francis, Peter Maydell

Current implementation of T2 - T5 times on the STM32 platform does not
work properly.
After configuring the timer-counter circuit to report interrupts every
10ms, in reality the first interrupt is reported
only once after a few seconds, while subsequent interrupts do not come.
The current code also does not properly emulate the operation of even
the basic functions of the TIME-BASE unit.
This patch contains fixes that reimplements the basic functionality
of the time base unit such as up-counting down-counting , and alternate-
mode up-down counting.
The ptimer() API is used to emulate timers.
After applying the patch, STM32 timer works correctly in its basic
functionality.
The ISIX-RTOS test unit was used to test the patch.
Links and instructions can be found below:

https://github.com/lucckb/isixrtos/blob/master/tests/libisix/01_basic_primitives.cpp
https://github.com/lucckb/isixrtos/blob/master/extras/doc/unit_test_qemu.md


qemu-system-arm -M olimex-stm32-h405  -kernel
build/tests/libisix/isixunittests.binary -nographic
unittests_entry.cpp:146|ISIX VERSION pub/ep0319-157-gb239b35f-dirty
unittests_entry.cpp:83|Exceptions pretest. OK
51 selected tests
[   RUN    ] 01_base_00 TimeBase timer vs systick
[  1001ms  ] ...
[   RUN    ] 01_base_01 Basic heap allocator
[   1ms    ] ...

Lucjan Bryndza (20):
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers
  Fixing the basic functionality of STM32 timers

 hw/arm/stm32f405_soc.c             |   2 +-
 hw/timer/stm32f2xx_timer.c         | 262 +++++++++++++++++++----------
 include/hw/timer/stm32f2xx_timer.h |  23 ++-
 3 files changed, 189 insertions(+), 98 deletions(-)

-- 
2.38.5


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-12-06 15:53 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-02 13:40 [PATCH qemu v3 00/20] Fix malfunctioning of T2-T5 timers on the STM32 platform ~lbryndza
2023-12-02 11:55 ` [PATCH qemu v3 01/20] Fixing the basic functionality of STM32 timers ~lbryndza
2023-12-02 12:05 ` [PATCH qemu v3 02/20] " ~lbryndza
2023-12-06 15:52   ` Alex Bennée
2023-12-02 12:09 ` [PATCH qemu v3 03/20] " ~lbryndza
2023-12-02 12:11 ` [PATCH qemu v3 04/20] " ~lbryndza
2023-12-02 12:12 ` [PATCH qemu v3 05/20] " ~lbryndza
2023-12-02 12:13 ` [PATCH qemu v3 06/20] " ~lbryndza
2023-12-02 12:15 ` [PATCH qemu v3 07/20] " ~lbryndza
2023-12-02 12:16 ` [PATCH qemu v3 08/20] " ~lbryndza
2023-12-02 12:18 ` [PATCH qemu v3 09/20] " ~lbryndza
2023-12-02 12:18 ` [PATCH qemu v3 10/20] " ~lbryndza
2023-12-02 12:19 ` [PATCH qemu v3 11/20] " ~lbryndza
2023-12-02 12:19 ` [PATCH qemu v3 12/20] " ~lbryndza
2023-12-02 12:20 ` [PATCH qemu v3 13/20] " ~lbryndza
2023-12-02 12:21 ` [PATCH qemu v3 14/20] " ~lbryndza
2023-12-02 12:21 ` [PATCH qemu v3 15/20] " ~lbryndza
2023-12-02 12:22 ` [PATCH qemu v3 16/20] " ~lbryndza
2023-12-02 12:23 ` [PATCH qemu v3 17/20] " ~lbryndza
2023-12-02 12:24 ` [PATCH qemu v3 18/20] " ~lbryndza
2023-12-02 12:26 ` [PATCH qemu v3 19/20] " ~lbryndza
2023-12-02 12:28 ` [PATCH qemu v3 20/20] " ~lbryndza
2023-12-06  1:04 ` [PATCH qemu v3 00/20] Fix malfunctioning of T2-T5 timers on the STM32 platform Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).