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

Chris Johns chrisj at rtems.org
Wed Jun 15 03:09:34 UTC 2022


Module:    rtems
Branch:    master
Commit:    cb52e374648976ccb20d39cb169691831c0be054
Changeset: http://git.rtems.org/rtems/commit/?id=cb52e374648976ccb20d39cb169691831c0be054

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue Jun 14 11:29:41 2022 +1000

bsps/arm: MP core timer setting off by one

---

 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;



More information about the vc mailing list