Skip to content
Snippets Groups Projects
Commit 9f462f0c authored by Scott Lahteine's avatar Scott Lahteine Committed by Richard Wackerbarth
Browse files

Hack to address stuttering caused by ISR not finishing in time

(PR #138)

When the ISR does not finish in time, the timer will
wrap in the computation of the next interrupt time.

This hack replaces the correct (past) time with a time not far in the future.
parent a3566998
Branches
Tags
No related merge requests found
......@@ -749,6 +749,8 @@ ISR(TIMER1_COMPA_vect) {
step_loops = step_loops_nominal;
}
OCR1A = (OCR1A < (TCNT1 +16)) ? (TCNT1 + 16) : OCR1A;
// If current block is finished, reset pointer
if (step_events_completed >= current_block->step_event_count) {
current_block = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment