From 84e5ff952e0c18201e45540e1a32da05f2bcbcb6 Mon Sep 17 00:00:00 2001 From: Jochen Kiemes Date: Wed, 6 Dec 2023 09:30:42 +0100 Subject: [PATCH] Fix esp32s3 to support the fourth stepper (issue #212) --- CHANGELOG.md | 3 +++ src/StepperISR_esp32_mcpwm_pcnt.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c51d215a..fb465a4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ TODO: - rename RampConstAcceleration to e.g. RampControl - merge the two esp32 rmt drivers as soon as esp32c3 works +pre-0.30.9: +- Fix esp32s3 to support the fourth stepper (issue #212) + 0.30.8: - Implement `setAbsoluteSpeedLimit(uint16_t max_speed_in_ticks)` as proposed by issue #210 diff --git a/src/StepperISR_esp32_mcpwm_pcnt.cpp b/src/StepperISR_esp32_mcpwm_pcnt.cpp index 4177ede7..e0910e50 100644 --- a/src/StepperISR_esp32_mcpwm_pcnt.cpp +++ b/src/StepperISR_esp32_mcpwm_pcnt.cpp @@ -55,7 +55,6 @@ static struct mapping_s channel2mapping[NUM_QUEUES] = { cmpr_tea_int_ena : MCPWM_OP2_TEA_INT_ENA, cmpr_tea_int_raw : MCPWM_OP2_TEA_INT_RAW }, -#ifndef SUPPORT_ESP32S3_MCPWM_PCNT { mcpwm_unit : MCPWM_UNIT_1, timer : 0, @@ -66,6 +65,7 @@ static struct mapping_s channel2mapping[NUM_QUEUES] = { cmpr_tea_int_ena : MCPWM_OP0_TEA_INT_ENA, cmpr_tea_int_raw : MCPWM_OP0_TEA_INT_RAW }, +#ifndef SUPPORT_ESP32S3_MCPWM_PCNT { mcpwm_unit : MCPWM_UNIT_1, timer : 1, @@ -339,8 +339,8 @@ static void IRAM_ATTR mcpwm0_isr_service(void *arg) { MCPWM_SERVICE(MCPWM0, 2, 2); } static void IRAM_ATTR mcpwm1_isr_service(void *arg) { -#ifndef SUPPORT_ESP32S3_MCPWM_PCNT MCPWM_SERVICE(MCPWM1, 0, 3); +#ifndef SUPPORT_ESP32S3_MCPWM_PCNT MCPWM_SERVICE(MCPWM1, 1, 4); MCPWM_SERVICE(MCPWM1, 2, 5); #endif