From 3c1fa2816f1e32c1ca263b0c480a75c0fc40b3c0 Mon Sep 17 00:00:00 2001 From: Fabio Utzig Date: Sat, 9 Apr 2016 13:55:23 +0000 Subject: [PATCH] [AVR] Fix timer usage for ATmega128 git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_16.1.x@9262 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/AVR/st_lld.c | 51 +++++++++++++++++++++++++++++---------- os/hal/ports/AVR/st_lld.h | 16 +++++++++--- 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/os/hal/ports/AVR/st_lld.c b/os/hal/ports/AVR/st_lld.c index 97b35ba9b..ea470cb07 100644 --- a/os/hal/ports/AVR/st_lld.c +++ b/os/hal/ports/AVR/st_lld.c @@ -62,20 +62,45 @@ /* Find the most suitable prescaler setting for the desired OSAL_ST_FREQUENCY */ #if ((F_CPU / OSAL_ST_FREQUENCY) <= AVR_TIMER_COUNTER_MAX) + #define AVR_TIMER_PRESCALER 1 - #define AVR_TIMER_PRESCALER_BITS (0<