diff --git a/DendoStepper.cpp b/DendoStepper.cpp index 407c472..a83fdf9 100644 --- a/DendoStepper.cpp +++ b/DendoStepper.cpp @@ -270,6 +270,7 @@ bool DendoStepper::xISR(gptimer_t *timer, const gptimer_alarm_event_data_t *data ctrl.status = IDLE; ctrl.stepCnt = 0; gptimer_disable(timer_handle); + GPIO.out_w1tc = (1ULL << conf.stepPin); return 0; } diff --git a/README.md b/README.md index 1ab6242..77af8bc 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,6 @@ typedef struct uint8_t stepPin; /** step signal pin */ uint8_t dirPin; /** dir signal pin */ uint8_t enPin; /** enable signal pin */ - timer_group_t timer_group; /** timer group, useful if we are controlling more than 2 steppers */ - timer_idx_t timer_idx; /** timer index, useful if we are controlling 2steppers */ microStepping_t miStep; /** microstepping configured on driver - used in distance calculation */ float stepAngle; /** one step angle in degrees (usually 1.8deg), used in steps per rotation calculation */ } DendoStepper_config_t; diff --git a/example/main/main.cpp b/example/main/main.cpp index 774b458..0114467 100644 --- a/example/main/main.cpp +++ b/example/main/main.cpp @@ -13,8 +13,6 @@ extern "C" void app_main(void) .stepPin = 16, .dirPin = 17, .enPin = 15, - .timer_group = TIMER_GROUP_0, - .timer_idx = TIMER_0, .miStep = MICROSTEP_32, .stepAngle = 1.8}; @@ -22,8 +20,6 @@ extern "C" void app_main(void) .stepPin = 18, .dirPin = 19, .enPin = 20, - .timer_group = TIMER_GROUP_0, - .timer_idx = TIMER_1, .miStep = MICROSTEP_32, .stepAngle = 1.8}; @@ -43,7 +39,7 @@ extern "C" void app_main(void) { step.runPosMm(500); step1.runPos(10000); - vTaskDelay(1000); + vTaskDelay(1000 / portTICK_PERIOD_MS); // step.runAbs(5000); } } \ No newline at end of file