aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authormarcoveeneman <marco-veeneman@hotmail.com>2015-03-20 21:36:52 +0100
committermarcoveeneman <marco-veeneman@hotmail.com>2015-03-20 21:36:52 +0100
commit273b1fa5252480926d8db2a87efd6d7956cf0e6c (patch)
tree92fb9e28a1aef624de0658795118ba15e3f52463 /os/hal
parentb3c2194d956ffe1f6b20fd6262bfdafea0ddbf74 (diff)
downloadChibiOS-Contrib-273b1fa5252480926d8db2a87efd6d7956cf0e6c.tar.gz
ChibiOS-Contrib-273b1fa5252480926d8db2a87efd6d7956cf0e6c.tar.bz2
ChibiOS-Contrib-273b1fa5252480926d8db2a87efd6d7956cf0e6c.zip
Fixed using incorrect registers.
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);
}
/**