From dfad0ddb3f923bb5c4ec4d20bb7948b9efa5159d Mon Sep 17 00:00:00 2001 From: Jochen Kiemes Date: Sat, 14 Oct 2023 18:39:07 +0200 Subject: [PATCH] adjust test expectations --- README.md | 10 +++++++--- examples/StepperDemo/StepperDemo.ino | 1 - .../test_sd_04_timing_2560/expect.txt | 18 +++++++++--------- .../test_sd_04_timing_328p/expect.txt | 12 ++++++------ .../test_sd_04_timing_328p_37k/expect.txt | 6 +++--- .../simavr_based/test_sd_11_328p/expect.txt | 6 +++--- .../simavr_based/test_sd_15_328p/expect.txt | 8 ++++---- .../simavr_based/test_sd_16_328p/expect.txt | 8 ++++---- .../simavr_based/test_sd_17_328p/expect.txt | 8 ++++---- .../simavr_based/test_sd_18_328p/expect.txt | 4 ++-- .../test_sd_18_328p/platformio.ini | 2 +- 11 files changed, 43 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 8995d86c..fc6584e5 100644 --- a/README.md +++ b/README.md @@ -288,11 +288,15 @@ This stepper driver uses rmt module. ### ESP32S3 -This stepper driver uses mcpwm/pcnt modules. Can drive up to 4 motors. Tested with 2 motors. +This stepper driver uses mcpwm/pcnt modules. Can drive up to 4 motors. Tested with 2 motors (not by me). -### ESP32C3/ESP32-MINI-1 +Apparently the ESP32S3's rmt module is similar to esp32c3 with 4 instead of 2 channels. Theoretically can drive 4 more steppers. -Compatibility with ESP32-C3: Not supported currently. The rmt module has more changes compared to esp32/esp32s2 +### ESP32C3 + +This stepper driver uses rmt module and can drive up to 2 motors. Not thoroughly tested, so only experimental support. + +### ESP32-MINI-1 Compatibility with ESP32-MINI-1: At least mcpwm and pulse counter modules are listed in the datasheet. So there are chances, that this lib works. diff --git a/examples/StepperDemo/StepperDemo.ino b/examples/StepperDemo/StepperDemo.ino index e0d661e9..6e94a14b 100644 --- a/examples/StepperDemo/StepperDemo.ino +++ b/examples/StepperDemo/StepperDemo.ino @@ -908,7 +908,6 @@ void test_direct_drive(const struct stepper_config_s *stepper) { void setup() { SerialInterface.begin(115200); - delay(2000); output_msg(MSG_STEPPER_VERSION); SerialInterface.print(" F_CPU="); SerialInterface.println(F_CPU); diff --git a/extras/tests/simavr_based/test_sd_04_timing_2560/expect.txt b/extras/tests/simavr_based/test_sd_04_timing_2560/expect.txt index 1d84d735..5a254a05 100644 --- a/extras/tests/simavr_based/test_sd_04_timing_2560/expect.txt +++ b/extras/tests/simavr_based/test_sd_04_timing_2560/expect.txt @@ -4,9 +4,9 @@ EnableA: 1*L->H, 1*H->L EnableB: 2*L->H, 1*H->L EnableC: 2*L->H, 1*H->L - StepA: 64000*L->H, 64000*H->L, Max High=28us Total High=576437us - StepB: 64000*L->H, 64000*H->L, Max High=30us Total High=393762us - StepC: 64000*L->H, 64000*H->L, Max High=37us Total High=429542us + StepA: 64000*L->H, 64000*H->L, Max High=24us Total High=391242us + StepB: 64000*L->H, 64000*H->L, Max High=33us Total High=394815us + StepC: 64000*L->H, 64000*H->L, Max High=34us Total High=477571us Position[A]=64000 Position[B]=64000 @@ -15,15 +15,15 @@ Position[C]=64000 Time in EnableA max=233598 us, total=233598 us -Time in EnableB max=246081 us, total=246081 us +Time in EnableB max=246086 us, total=246086 us -Time in EnableC max=254229 us, total=254229 us +Time in EnableC max=254235 us, total=254235 us -Time in FillISR max=2697 us, total=2091083 us +Time in FillISR max=3140 us, total=2095013 us -Time in StepA max=28 us, total=576437 us +Time in StepA max=24 us, total=391242 us -Time in StepB max=30 us, total=393762 us +Time in StepB max=33 us, total=394815 us -Time in StepC max=37 us, total=429542 us +Time in StepC max=34 us, total=477571 us diff --git a/extras/tests/simavr_based/test_sd_04_timing_328p/expect.txt b/extras/tests/simavr_based/test_sd_04_timing_328p/expect.txt index 2aa1c005..29b2cd5e 100644 --- a/extras/tests/simavr_based/test_sd_04_timing_328p/expect.txt +++ b/extras/tests/simavr_based/test_sd_04_timing_328p/expect.txt @@ -2,21 +2,21 @@ DirB: 1*L->H, 0*H->L EnableA: 1*L->H, 1*H->L EnableB: 2*L->H, 1*H->L - StepA: 1000*L->H, 1000*H->L, Max High=14us Total High=5618us - StepB: 1000*L->H, 1000*H->L, Max High=16us Total High=5419us + StepA: 1000*L->H, 1000*H->L, Max High=13us Total High=5548us + StepB: 1000*L->H, 1000*H->L, Max High=18us Total High=5547us Position[A]=1000 Position[B]=1000 Time in EnableA max=225398 us, total=225398 us -Time in EnableB max=238110 us, total=238110 us +Time in EnableB max=238116 us, total=238116 us -Time in FillISR max=2638 us, total=47569 us +Time in FillISR max=2644 us, total=47713 us -Time in StepA max=14 us, total=5618 us +Time in StepA max=13 us, total=5548 us -Time in StepB max=16 us, total=5419 us +Time in StepB max=18 us, total=5547 us Time in StepISR max=7 us, total=9224 us diff --git a/extras/tests/simavr_based/test_sd_04_timing_328p_37k/expect.txt b/extras/tests/simavr_based/test_sd_04_timing_328p_37k/expect.txt index ac107712..0e6562ea 100644 --- a/extras/tests/simavr_based/test_sd_04_timing_328p_37k/expect.txt +++ b/extras/tests/simavr_based/test_sd_04_timing_328p_37k/expect.txt @@ -2,15 +2,15 @@ DirB: 1*L->H, 0*H->L EnableA: 1*L->H, 1*H->L EnableB: 1*L->H, 0*H->L - StepA: 1000*L->H, 1000*H->L, Max High=11us Total High=5286us + StepA: 1000*L->H, 1000*H->L, Max High=11us Total High=5281us StepB: 0*L->H, 0*H->L, Max High=0us Total High=0us Position[A]=1000 Time in EnableA max=225399 us, total=225399 us -Time in FillISR max=2015 us, total=27518 us +Time in FillISR max=2015 us, total=27776 us -Time in StepA max=11 us, total=5286 us +Time in StepA max=11 us, total=5281 us Time in StepISR max=7 us, total=4581 us diff --git a/extras/tests/simavr_based/test_sd_11_328p/expect.txt b/extras/tests/simavr_based/test_sd_11_328p/expect.txt index fdf0457e..899e1bf5 100644 --- a/extras/tests/simavr_based/test_sd_11_328p/expect.txt +++ b/extras/tests/simavr_based/test_sd_11_328p/expect.txt @@ -2,11 +2,11 @@ DirB: 1*L->H, 0*H->L EnableA: 1*L->H, 1*H->L EnableB: 1*L->H, 0*H->L - StepA: 99808*L->H, 99808*H->L, Max High=13us Total High=514674us + StepA: 99808*L->H, 99808*H->L, Max High=13us Total High=513811us StepB: 0*L->H, 0*H->L, Max High=0us Total High=0us -Position[A]=50536 +Position[A]=50736 Time in EnableA max=225395 us, total=225395 us -Time in StepA max=13 us, total=514674 us +Time in StepA max=13 us, total=513811 us diff --git a/extras/tests/simavr_based/test_sd_15_328p/expect.txt b/extras/tests/simavr_based/test_sd_15_328p/expect.txt index 4acdc895..ecfe2309 100644 --- a/extras/tests/simavr_based/test_sd_15_328p/expect.txt +++ b/extras/tests/simavr_based/test_sd_15_328p/expect.txt @@ -2,11 +2,11 @@ DirB: 1*L->H, 0*H->L EnableA: 1*L->H, 1*H->L EnableB: 1*L->H, 0*H->L - StepA: 3434*L->H, 3434*H->L, Max High=12us Total High=17813us + StepA: 3433*L->H, 3433*H->L, Max High=12us Total High=17723us StepB: 0*L->H, 0*H->L, Max High=0us Total High=0us -Position[A]=-1034 +Position[A]=-1033 -Time in EnableA max=225394 us, total=225394 us +Time in EnableA max=225396 us, total=225396 us -Time in StepA max=12 us, total=17813 us +Time in StepA max=12 us, total=17723 us diff --git a/extras/tests/simavr_based/test_sd_16_328p/expect.txt b/extras/tests/simavr_based/test_sd_16_328p/expect.txt index 63fb6cd1..5f130eb4 100644 --- a/extras/tests/simavr_based/test_sd_16_328p/expect.txt +++ b/extras/tests/simavr_based/test_sd_16_328p/expect.txt @@ -2,11 +2,11 @@ DirB: 1*L->H, 0*H->L EnableA: 1*L->H, 1*H->L EnableB: 1*L->H, 0*H->L - StepA: 1122*L->H, 1122*H->L, Max High=11us Total High=5775us + StepA: 1123*L->H, 1123*H->L, Max High=12us Total High=5797us StepB: 0*L->H, 0*H->L, Max High=0us Total High=0us -Position[A]=1122 +Position[A]=1123 -Time in EnableA max=225395 us, total=225395 us +Time in EnableA max=225397 us, total=225397 us -Time in StepA max=11 us, total=5775 us +Time in StepA max=12 us, total=5797 us diff --git a/extras/tests/simavr_based/test_sd_17_328p/expect.txt b/extras/tests/simavr_based/test_sd_17_328p/expect.txt index 7ff79eff..ba5f522e 100644 --- a/extras/tests/simavr_based/test_sd_17_328p/expect.txt +++ b/extras/tests/simavr_based/test_sd_17_328p/expect.txt @@ -2,11 +2,11 @@ DirB: 1*L->H, 0*H->L EnableA: 1*L->H, 1*H->L EnableB: 1*L->H, 0*H->L - StepA: 1431*L->H, 1431*H->L, Max High=12us Total High=7390us + StepA: 1430*L->H, 1430*H->L, Max High=11us Total High=7398us StepB: 0*L->H, 0*H->L, Max High=0us Total High=0us -Position[A]=1431 +Position[A]=1430 -Time in EnableA max=229524 us, total=229524 us +Time in EnableA max=229523 us, total=229523 us -Time in StepA max=12 us, total=7390 us +Time in StepA max=11 us, total=7398 us diff --git a/extras/tests/simavr_based/test_sd_18_328p/expect.txt b/extras/tests/simavr_based/test_sd_18_328p/expect.txt index 9b9f3401..f3b55c91 100644 --- a/extras/tests/simavr_based/test_sd_18_328p/expect.txt +++ b/extras/tests/simavr_based/test_sd_18_328p/expect.txt @@ -2,11 +2,11 @@ DirB: 1*L->H, 0*H->L EnableA: 1*L->H, 1*H->L EnableB: 1*L->H, 0*H->L - StepA: 3866*L->H, 3866*H->L, Max High=12us Total High=19824us + StepA: 3870*L->H, 3870*H->L, Max High=12us Total High=19922us StepB: 0*L->H, 0*H->L, Max High=0us Total High=0us Position[A]=0 Time in EnableA max=229523 us, total=229523 us -Time in StepA max=12 us, total=19824 us +Time in StepA max=12 us, total=19922 us diff --git a/extras/tests/simavr_based/test_sd_18_328p/platformio.ini b/extras/tests/simavr_based/test_sd_18_328p/platformio.ini index f6723879..d940baed 100644 --- a/extras/tests/simavr_based/test_sd_18_328p/platformio.ini +++ b/extras/tests/simavr_based/test_sd_18_328p/platformio.ini @@ -21,7 +21,7 @@ # [common] # This is the line input to StepperDemo: -build_flags = -D SIM_TEST_INPUT='"Q M1 A10 V100 j100000 f w1000 A100000 U X w100 R-1431 W "' +build_flags = -D SIM_TEST_INPUT='"Q M1 A10 V100 j100000 f w1000 A100000 U X w100 R-1433 W "' # The -1431 moves the stepper after the force stop, so that the visible position is 0. # Visible means: counted by watching the external step/direction signals.