|
@@ -564,7 +564,7 @@ void Stepper::isr() {
|
564
|
564
|
* 10µs = 160 or 200 cycles.
|
565
|
565
|
*/
|
566
|
566
|
#if EXTRA_CYCLES_XYZE > 20
|
567
|
|
- hal_timer_t pulse_start = HAL_timer_get_current_count(STEP_TIMER_NUM);
|
|
567
|
+ hal_timer_t pulse_start = HAL_timer_get_current_count(PULSE_TIMER_NUM);
|
568
|
568
|
#endif
|
569
|
569
|
|
570
|
570
|
#if HAS_X_STEP
|
|
@@ -596,8 +596,8 @@ void Stepper::isr() {
|
596
|
596
|
|
597
|
597
|
// For minimum pulse time wait before stopping pulses
|
598
|
598
|
#if EXTRA_CYCLES_XYZE > 20
|
599
|
|
- while (EXTRA_CYCLES_XYZE > (uint32_t)(HAL_timer_get_current_count(STEP_TIMER_NUM) - pulse_start) * (STEPPER_TIMER_PRESCALE)) { /* nada */ }
|
600
|
|
- pulse_start = HAL_timer_get_current_count(STEP_TIMER_NUM);
|
|
599
|
+ while (EXTRA_CYCLES_XYZE > (uint32_t)(HAL_timer_get_current_count(PULSE_TIMER_NUM) - pulse_start) * (PULSE_TIMER_PRESCALE)) { /* nada */ }
|
|
600
|
+ pulse_start = HAL_timer_get_current_count(PULSE_TIMER_NUM);
|
601
|
601
|
#elif EXTRA_CYCLES_XYZE > 0
|
602
|
602
|
DELAY_NOPS(EXTRA_CYCLES_XYZE);
|
603
|
603
|
#endif
|
|
@@ -637,7 +637,7 @@ void Stepper::isr() {
|
637
|
637
|
|
638
|
638
|
// For minimum pulse time wait after stopping pulses also
|
639
|
639
|
#if EXTRA_CYCLES_XYZE > 20
|
640
|
|
- if (i) while (EXTRA_CYCLES_XYZE > (uint32_t)(HAL_timer_get_current_count(STEP_TIMER_NUM) - pulse_start) * (STEPPER_TIMER_PRESCALE)) { /* nada */ }
|
|
640
|
+ if (i) while (EXTRA_CYCLES_XYZE > (uint32_t)(HAL_timer_get_current_count(PULSE_TIMER_NUM) - pulse_start) * (PULSE_TIMER_PRESCALE)) { /* nada */ }
|
641
|
641
|
#elif EXTRA_CYCLES_XYZE > 0
|
642
|
642
|
if (i) DELAY_NOPS(EXTRA_CYCLES_XYZE);
|
643
|
643
|
#endif
|
|
@@ -818,7 +818,7 @@ void Stepper::isr() {
|
818
|
818
|
for (uint8_t i = step_loops; i--;) {
|
819
|
819
|
|
820
|
820
|
#if EXTRA_CYCLES_E > 20
|
821
|
|
- hal_timer_t pulse_start = HAL_timer_get_current_count(STEP_TIMER_NUM);
|
|
821
|
+ hal_timer_t pulse_start = HAL_timer_get_current_count(PULSE_TIMER_NUM);
|
822
|
822
|
#endif
|
823
|
823
|
|
824
|
824
|
START_E_PULSE(0);
|
|
@@ -837,8 +837,8 @@ void Stepper::isr() {
|
837
|
837
|
|
838
|
838
|
// For minimum pulse time wait before stopping pulses
|
839
|
839
|
#if EXTRA_CYCLES_E > 20
|
840
|
|
- while (EXTRA_CYCLES_E > (hal_timer_t)(HAL_timer_get_current_count(STEP_TIMER_NUM) - pulse_start) * (STEPPER_TIMER_PRESCALE)) { /* nada */ }
|
841
|
|
- pulse_start = HAL_timer_get_current_count(STEP_TIMER_NUM);
|
|
840
|
+ while (EXTRA_CYCLES_E > (hal_timer_t)(HAL_timer_get_current_count(PULSE_TIMER_NUM) - pulse_start) * (PULSE_TIMER_PRESCALE)) { /* nada */ }
|
|
841
|
+ pulse_start = HAL_timer_get_current_count(PULSE_TIMER_NUM);
|
842
|
842
|
#elif EXTRA_CYCLES_E > 0
|
843
|
843
|
DELAY_NOPS(EXTRA_CYCLES_E);
|
844
|
844
|
#endif
|
|
@@ -859,7 +859,7 @@ void Stepper::isr() {
|
859
|
859
|
|
860
|
860
|
// For minimum pulse time wait before looping
|
861
|
861
|
#if EXTRA_CYCLES_E > 20
|
862
|
|
- if (i) while (EXTRA_CYCLES_E > (hal_timer_t)(HAL_timer_get_current_count(STEP_TIMER_NUM) - pulse_start) * (STEPPER_TIMER_PRESCALE)) { /* nada */ }
|
|
862
|
+ if (i) while (EXTRA_CYCLES_E > (hal_timer_t)(HAL_timer_get_current_count(PULSE_TIMER_NUM) - pulse_start) * (PULSE_TIMER_PRESCALE)) { /* nada */ }
|
863
|
863
|
#elif EXTRA_CYCLES_E > 0
|
864
|
864
|
if (i) DELAY_NOPS(EXTRA_CYCLES_E);
|
865
|
865
|
#endif
|
|
@@ -1299,7 +1299,7 @@ void Stepper::report_positions() {
|
1299
|
1299
|
|
1300
|
1300
|
#if EXTRA_CYCLES_BABYSTEP > 20
|
1301
|
1301
|
#define _SAVE_START const hal_timer_t pulse_start = HAL_timer_get_current_count(STEP_TIMER_NUM)
|
1302
|
|
- #define _PULSE_WAIT while (EXTRA_CYCLES_BABYSTEP > (uint32_t)(HAL_timer_get_current_count(STEP_TIMER_NUM) - pulse_start) * (STEPPER_TIMER_PRESCALE)) { /* nada */ }
|
|
1302
|
+ #define _PULSE_WAIT while (EXTRA_CYCLES_BABYSTEP > (uint32_t)(HAL_timer_get_current_count(STEP_TIMER_NUM) - pulse_start) * (PULSE_TIMER_PRESCALE)) { /* nada */ }
|
1303
|
1303
|
#else
|
1304
|
1304
|
#define _SAVE_START NOOP
|
1305
|
1305
|
#if EXTRA_CYCLES_BABYSTEP > 0
|