From 273b1fa5252480926d8db2a87efd6d7956cf0e6c Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Fri, 20 Mar 2015 21:36:52 +0100 Subject: Fixed using incorrect registers. --- os/hal/ports/TIVA/LLD/st_lld.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'os/hal') diff --git a/os/hal/ports/TIVA/LLD/st_lld.h b/os/hal/ports/TIVA/LLD/st_lld.h index 86a31c0..fd6dc80 100644 --- a/os/hal/ports/TIVA/LLD/st_lld.h +++ b/os/hal/ports/TIVA/LLD/st_lld.h @@ -197,7 +197,7 @@ extern "C" { */ static inline systime_t st_lld_get_counter(void) { - return (systime_t) 0xffffffff - TIVA_ST_TIM->TAV; + return (systime_t) 0xffffffff - TIVA_ST_TIM->TAR; } /** @@ -247,7 +247,7 @@ static inline void st_lld_set_alarm(systime_t time) */ static inline systime_t st_lld_get_alarm(void) { - return (systime_t) TIVA_ST_TIM->TAR; + return (systime_t) (0xffffffff - TIVA_ST_TIM->TAMATCHR); } /** -- cgit v1.2.3