mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-30 09:39:49 +02:00
Removed autoReload from Stepping; it doesn't work
This commit is contained in:
@@ -155,7 +155,7 @@ namespace Machine {
|
|||||||
// The argument to i2s_out_set_pulse_period is in units of microseconds
|
// The argument to i2s_out_set_pulse_period is in units of microseconds
|
||||||
i2s_out_set_pulse_period(((uint32_t)timerTicks) / ticksPerMicrosecond);
|
i2s_out_set_pulse_period(((uint32_t)timerTicks) / ticksPerMicrosecond);
|
||||||
} else {
|
} else {
|
||||||
timerAlarmWrite(stepTimer, (uint64_t)timerTicks, autoReload);
|
timerAlarmWrite(stepTimer, (uint64_t)timerTicks, false); // false disables autoreload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Stepping::startTimer() {
|
void Stepping::startTimer() {
|
||||||
@@ -192,12 +192,7 @@ namespace Machine {
|
|||||||
// The intermediate handler clears the timer interrupt so we need not do it here
|
// The intermediate handler clears the timer interrupt so we need not do it here
|
||||||
++isr_count;
|
++isr_count;
|
||||||
|
|
||||||
// Using autoReload results is less timing jitter so it is
|
timerWrite(stepTimer, 0ULL);
|
||||||
// probably best to have it on. We keep the variable for
|
|
||||||
// convenience in debugging.
|
|
||||||
if (!autoReload) {
|
|
||||||
timerWrite(stepTimer, 0ULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
// It is tempting to defer this until after pulse_func(),
|
// It is tempting to defer this until after pulse_func(),
|
||||||
// but if pulse_func() determines that no more stepping
|
// but if pulse_func() determines that no more stepping
|
||||||
|
@@ -28,7 +28,6 @@ namespace Machine {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static const int stepTimerNumber = 0;
|
static const int stepTimerNumber = 0;
|
||||||
static const bool autoReload = false;
|
|
||||||
static hw_timer_t* stepTimer;
|
static hw_timer_t* stepTimer;
|
||||||
static void onStepperDriverTimer();
|
static void onStepperDriverTimer();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user