[rtems commit] bsps/arm: Fix Cortex-A9 MPCore nanoseconds handler
Sebastian Huber
sebh at rtems.org
Thu Nov 14 14:51:22 UTC 2013
Module: rtems
Branch: master
Commit: a3b1fcd977c79bf2134b9d1e794112f29ecc0879
Changeset: http://git.rtems.org/rtems/commit/?id=a3b1fcd977c79bf2134b9d1e794112f29ecc0879
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Nov 14 15:55:51 2013 +0100
bsps/arm: Fix Cortex-A9 MPCore nanoseconds handler
---
.../libbsp/arm/shared/arm-a9mpcore-clock-config.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c b/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c
index b5c8ecb..dbd720a 100644
--- a/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c
+++ b/c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c
@@ -88,7 +88,7 @@ static uint32_t a9mpcore_clock_nanoseconds_since_last_tick(void)
uint32_t p = pt->load + 1;
if ((pt->irqst & A9MPCORE_PT_IRQST_EFLG) != 0) {
- c = pt->cntr + p;
+ c = pt->cntr - p;
}
return (uint32_t) (((p - c) * k) >> 32);
More information about the vc
mailing list