aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/ports/TIVA/LLD/st_lld.h4
1 files changed, 2 insertions, 2 deletions
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);
}
/**