diff options
author | marcoveeneman <marco-veeneman@hotmail.com> | 2015-03-23 21:08:57 +0100 |
---|---|---|
committer | marcoveeneman <marco-veeneman@hotmail.com> | 2015-03-23 21:08:57 +0100 |
commit | 91d9d096736025c31f78ee607e02fccfb3948685 (patch) | |
tree | fa5f7feb5cdacda230ac784a36b2311a3aa44493 /os | |
parent | 560076be34b1ce77d108674b80652bfd67901c73 (diff) | |
download | ChibiOS-Contrib-91d9d096736025c31f78ee607e02fccfb3948685.tar.gz ChibiOS-Contrib-91d9d096736025c31f78ee607e02fccfb3948685.tar.bz2 ChibiOS-Contrib-91d9d096736025c31f78ee607e02fccfb3948685.zip |
Removing GPTM_TAMR_TASNAPS was a bad idea. This caused the TAR register to not update at match so an incorrect value was read in st_lld_get_counter.
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/TIVA/LLD/st_lld.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/os/hal/ports/TIVA/LLD/st_lld.c b/os/hal/ports/TIVA/LLD/st_lld.c index 7ca9e61..1109855 100644 --- a/os/hal/ports/TIVA/LLD/st_lld.c +++ b/os/hal/ports/TIVA/LLD/st_lld.c @@ -221,7 +221,9 @@ void st_lld_init(void) TIVA_ST_TIM->CTL = 0; TIVA_ST_TIM->CFG = GPTM_CFG_CFG_SPLIT; /* Timer split mode */ TIVA_ST_TIM->TAMR = (GPTM_TAMR_TAMR_PERIODIC |/* Periodic mode */ - GPTM_TAMR_TAMIE); /* Match interrupt enable */ + GPTM_TAMR_TAMIE | /* Match interrupt enable */ + GPTM_TAMR_TASNAPS); /* Snapshot mode */ + TIVA_ST_TIM->TAPR = (TIVA_SYSCLK / OSAL_ST_FREQUENCY) - 1; TIVA_ST_TIM->CTL = (GPTM_CTL_TAEN | /* Timer A enable */ GPTM_CTL_TASTALL); /* Timer A stall when paused */ |