[PATCH] bsps/arm: MP core timer setting off by one

chrisj at rtems.org chrisj at rtems.org
Tue Jun 14 01:30:27 UTC 2022


From: Chris Johns <chrisj at rtems.org>

---
 bsps/arm/shared/clock/clock-a9mpcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bsps/arm/shared/clock/clock-a9mpcore.c b/bsps/arm/shared/clock/clock-a9mpcore.c
index 6c7abb0591..b3dc30eab4 100644
--- a/bsps/arm/shared/clock/clock-a9mpcore.c
+++ b/bsps/arm/shared/clock/clock-a9mpcore.c
@@ -129,7 +129,7 @@ static void a9mpcore_clock_initialize(void)
   volatile a9mpcore_gt *gt = A9MPCORE_GT;
   uint64_t periphclk = a9mpcore_clock_periphclk();
   uint64_t us_per_tick = rtems_configuration_get_microseconds_per_tick();
-  uint32_t interval = (uint32_t) ((periphclk * us_per_tick) / 1000000);
+  uint32_t interval = (uint32_t) ((periphclk * us_per_tick) / 1000000) - 1;
   uint64_t cmpval;
 
   gt->ctrl &= A9MPCORE_GT_CTRL_TMR_EN;
-- 
2.19.1



More information about the devel mailing list