From 7c3b54d05166d23666e3697949de6711a2a2bf08 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 14 Mar 2022 08:21:34 +0000 Subject: [PATCH] Fixed bug #1222. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15503 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/rt/include/chstats.h | 4 ++++ readme.txt | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/os/rt/include/chstats.h b/os/rt/include/chstats.h index 1bd7c97e7..54fdaea3a 100644 --- a/os/rt/include/chstats.h +++ b/os/rt/include/chstats.h @@ -102,6 +102,10 @@ static inline void __stats_object_init(kernel_stats_t *ksp) { ksp->n_ctxswc = (ucnt_t)0; chTMObjectInit(&ksp->m_crit_thd); chTMObjectInit(&ksp->m_crit_isr); + + /* The initialization code will stop the measurement on the final call + to chSysUnlock().*/ + chTMStartMeasurementX(&ksp->m_crit_thd); } #else /* CH_DBG_STATISTICS == FALSE */ diff --git a/readme.txt b/readme.txt index 0c7b052dd..a81a234a6 100644 --- a/readme.txt +++ b/readme.txt @@ -121,9 +121,11 @@ ARMv7-M and ARMv8-M-ML. - NEW: On STM32WBxx added a check on STM32_LSI_ENABLE required by IWDG. - NEW: Added SPIv2 support also to STM32WB and STM32WL. +- FIX: Reverted bug #1100 (backported to 20.3.5)(backported to 21.11.2). +- FIX: Fixed invalid cumulative time stat in RT (bug #1222) + (backported to 21.11.2). - FIX: Fixed incorrect type cast in TIME_I2US() (bug #1221) (backported to 20.3.5)(backported to 21.11.2). -- FIX: Reverted bug #1100 (backported to 20.3.5)(backported to 21.11.2). - FIX: Fixed missing clock disable for STM32 OCTOSPI2 (bug #1220) (backported to 20.3.5)(backported to 21.11.2). - FIX: Fixed wrong condition in STM32 sio_lld_read() function (bug #1219)