# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
beyond the current time. This is a trick borrwed from upstream Marlin.
In debug mode, watch for the missed stepper interrupt ticks where the interrupts
are missed by more than 20% of the 10kHz stepper interrupt repeat rate,
and show the statistics (number of missed ticks and by how many micro
seconds was the interrupt missed, and what was the maximum missed
interrupt delay) on the display and send it to the serial line.
1) The computational load is spread more evenly along the stepper ISR
ticks by moving some of the timer and linear advance calculation from
the block initialization into the 1st tick of the steady phase
of the trapezoid.
2) Reworked planning of the Linear Advance ISR ticks to fit
the time slot allocated for the main stepper ISR tick. This is achieved
by grouping the Linear Advance extruder ticks by a power of two to tick
the Linear Advance interrupts at a maximum 7kHz. Also some
of the extruder ticks are performed just after the XYZ ticks
and if the remaining time slot for the Linear Advance ticks is too short,
all the Linear Advance steps are ticked inside the main stepper ISR invocation.
3) Added some calls to MSerial.checkRx() if the stepper ISR routine
is delayed for too long by the additional LinearAdvance ticks.
This implementation differs significantly from the original implementation
by @Sebastianv650, as this implementation tries to follow the exact
timing of the XYZ axes with the drawback of possibly ticking the extruder
faster than it could handle, while the original implementation
by @Sebastianv650 ticks the extruder slower with the drawback of possibly
spreading the XYZ ticks, thus introducing jerk in the cartesian movement.
or DISABLE_STEPPER_DRIVER_INTERRUPT().
If this is not done, the stepper interrupt would likely overflow,
leading to a maximum 32ms delay before the stepper interrupt wakes up.
In addition, the stepper timer overflow error would be reported
by the debug builds.
access to the low / high words of the 32bit values.
This is a prerequisity for an optimized 16bit only DDA
in case the number of step is lower than 32767.