diff options
author | jaseg <git@jaseg.net> | 2018-12-24 18:08:01 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2018-12-24 18:08:01 +0900 |
commit | 0029ed768ea0b3626ba8b26c369c409962ff38b6 (patch) | |
tree | 509d093005306bd7fea6c39c1927d8f88c9d0df2 /fw/main.c | |
parent | 62389e00fed49b7b89f465c9cd6bb586502331be (diff) | |
download | 8seg-0029ed768ea0b3626ba8b26c369c409962ff38b6.tar.gz 8seg-0029ed768ea0b3626ba8b26c369c409962ff38b6.tar.bz2 8seg-0029ed768ea0b3626ba8b26c369c409962ff38b6.zip |
Make center ADC work in "scope mode"
Diffstat (limited to 'fw/main.c')
-rw-r--r-- | fw/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -69,8 +69,8 @@ int main(void) { TIM1->CCR4 = 1; TIM1->DIER = TIM_DIER_UIE; - TIM1->PSC = SystemCoreClock/1000000 - 1; /* 1.0us/tick */ - TIM1->ARR = 20-1; /* 20us */ + TIM1->PSC = SystemCoreClock/500000 - 1; /* 0.5us/tick */ + TIM1->ARR = 25-1; /* Preload all values */ TIM1->EGR |= TIM_EGR_UG; TIM1->CR1 = TIM_CR1_ARPE; |