diff options
author | Amir Hammad <amir.hammad@hotmail.com> | 2015-04-15 20:26:09 +0200 |
---|---|---|
committer | Amir Hammad <amir.hammad@hotmail.com> | 2015-04-15 20:26:09 +0200 |
commit | 4b23cb4850aa8f7b8a2823d053dd9369f90c8a9e (patch) | |
tree | 1cd332476beb357d1331a9a342fdcbc0e99166a3 | |
parent | 187d01e3b299465d94de2ad44437cb8e1b5afcbb (diff) | |
download | secure-hid-4b23cb4850aa8f7b8a2823d053dd9369f90c8a9e.tar.gz secure-hid-4b23cb4850aa8f7b8a2823d053dd9369f90c8a9e.tar.bz2 secure-hid-4b23cb4850aa8f7b8a2823d053dd9369f90c8a9e.zip |
demo: timer: BUGFIX: TIM6 prescaler
TIM6 has clock running at 84MHz instead of 168MHz,
so set the prescaler accordingly.
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
-rw-r--r-- | src/demo.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -72,7 +72,7 @@ static void clock_setup(void) static void tim6_setup(void)
{
timer_reset(TIM6);
- timer_set_prescaler(TIM6, 16800 - 1); // 168Mhz/10000hz - 1
+ timer_set_prescaler(TIM6, 8400 - 1); // 84Mhz/10kHz - 1
timer_set_period(TIM6, 65535); // Overflow in ~6.5 seconds
timer_enable_counter(TIM6);
}
|