diff --git a/Grbl_Esp32/src/Stepping.cpp b/Grbl_Esp32/src/Stepping.cpp index b90da7fa..293c440c 100644 --- a/Grbl_Esp32/src/Stepping.cpp +++ b/Grbl_Esp32/src/Stepping.cpp @@ -155,7 +155,7 @@ namespace Machine { // The argument to i2s_out_set_pulse_period is in units of microseconds i2s_out_set_pulse_period(((uint32_t)timerTicks) / ticksPerMicrosecond); } else { - timerAlarmWrite(stepTimer, (uint64_t)timerTicks, autoReload); + timerAlarmWrite(stepTimer, (uint64_t)timerTicks, false); // false disables autoreload } } void Stepping::startTimer() { @@ -192,12 +192,7 @@ namespace Machine { // The intermediate handler clears the timer interrupt so we need not do it here ++isr_count; - // Using autoReload results is less timing jitter so it is - // probably best to have it on. We keep the variable for - // convenience in debugging. - if (!autoReload) { - timerWrite(stepTimer, 0ULL); - } + timerWrite(stepTimer, 0ULL); // It is tempting to defer this until after pulse_func(), // but if pulse_func() determines that no more stepping diff --git a/Grbl_Esp32/src/Stepping.h b/Grbl_Esp32/src/Stepping.h index c2c66178..16411ef0 100644 --- a/Grbl_Esp32/src/Stepping.h +++ b/Grbl_Esp32/src/Stepping.h @@ -28,7 +28,6 @@ namespace Machine { private: static const int stepTimerNumber = 0; - static const bool autoReload = false; static hw_timer_t* stepTimer; static void onStepperDriverTimer();