From d6a05cc737c6814acac70059b31cf83ed9c21015 Mon Sep 17 00:00:00 2001 From: Cedric Walter Date: Fri, 29 Sep 2023 22:07:23 +0200 Subject: [PATCH 1/3] Updated example to new version --- example/main/main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 From 4d20225384f5840f5b48a4617f5488d3f720990a Mon Sep 17 00:00:00 2001 From: Cedric Walter Date: Wed, 4 Oct 2023 09:07:32 +0200 Subject: [PATCH 2/3] Fixed wrong number of step pin signal edges per movement --- DendoStepper.cpp | 1 + 1 file changed, 1 insertion(+) 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; } From 7fffa601a45fbb388ed99f57118175ad1e5b57b1 Mon Sep 17 00:00:00 2001 From: Cedric <41518201+cedricwritescode@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:09:44 +0200 Subject: [PATCH 3/3] Update README.md in line with fixed examples --- README.md | 2 -- 1 file changed, 2 deletions(-) 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;