klipper/src
Kevin O'Connor a1c61563a0 avr: Fix bug causing timer_read_time() to not be in sync with scheduler
Commit 16e3dbb1 changed the avr implementation of timer_read_time().
Unfortunately, it raised the possibility for timer_read_time() to be
out of sync with the scheduler's understanding of the current time.
In particular, it was common for the timer irq to overflow the 16bit
hardware counter once at startup, and this would lead to
timer_read_time() always returning a time ~4ms ahead of the scheduler
on 16Mhz chips.  This resulted in "Move queue empty" errors.

To resolve this issue, only increment timer_high from timer_periodic()
and make sure the timer irqs start immediately after timer_init().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-03-31 14:36:57 -04:00
..
avr avr: Fix bug causing timer_read_time() to not be in sync with scheduler 2017-03-31 14:36:57 -04:00
generic timer_irq: Integrate timer_try_set_next() into timer_dispatch_many() 2017-03-30 11:25:23 -04:00
sam3x8e sam3x8e: Align the TC0_Handler timer irq handler 2017-03-30 12:04:08 -04:00
simulator sched: Move timer dispatch loop to board code 2017-03-30 11:24:42 -04:00
Kconfig sam3x8e: Add initial support for Arduino Due boards 2016-06-14 14:27:30 -04:00
Makefile pwmcmds: Add Kconfig option to allow boards to disable hardware PWM commands 2016-06-13 23:18:59 -04:00
adccmds.c sched: Rename sched_timer() to sched_add_timer() 2017-03-11 11:14:06 -05:00
basecmd.c timer: Allow board code to define its own timer_is_before implementation 2017-03-26 22:45:58 -04:00
basecmd.h basecmd: Use oid_ prefix for the oid manipulation functions 2017-03-09 13:49:03 -05:00
command.c command: Simplify sendf() switch 2017-03-26 21:55:24 -04:00
command.h build: Define DECL_CONSTANT mechanism for defining exported constants 2016-12-23 17:06:10 -05:00
compiler.h compiler.h: Check if __aligned and __section macros are already defined 2016-06-13 23:18:59 -04:00
declfunc.lds.S build: Avoid objcopy --dump-section flag 2016-07-10 21:46:57 -04:00
endstop.c sched: Rename sched_timer() to sched_add_timer() 2017-03-11 11:14:06 -05:00
gpiocmds.c timer: Allow board code to define its own timer_is_before implementation 2017-03-26 22:45:58 -04:00
pwmcmds.c sched: Rename sched_timer() to sched_add_timer() 2017-03-11 11:14:06 -05:00
sched.c sched: Move timer dispatch loop to board code 2017-03-30 11:24:42 -04:00
sched.h sched: Move timer dispatch loop to board code 2017-03-30 11:24:42 -04:00
spicmds.c Initial commit of source code. 2016-05-25 11:37:40 -04:00
stepper.c stepper: Improve performance of scheduled unsteps 2017-03-30 10:57:35 -04:00
stepper.h stepper: Introduce stepper_get_position command and remove from endstop.c 2017-03-09 14:54:52 -05:00