summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-14 15:55:51 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-14 15:57:52 +0100
commita3b1fcd977c79bf2134b9d1e794112f29ecc0879 (patch)
tree2ee61f3baf216af357807fe58dccb4ba04fc8c5d
parent2c93c5ae648864a7aecd7965a959070f4ba28a1e (diff)
downloadrtems-a3b1fcd977c79bf2134b9d1e794112f29ecc0879.tar.bz2
bsps/arm: Fix Cortex-A9 MPCore nanoseconds handler
-rw-r--r--c/src/lib/libbsp/arm/shared/arm-a9mpcore-clock-config.c2
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 b5c8ecb3b0..dbd720a923 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);