Skip to content

Commit

Permalink
adjust test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
gin66 committed Oct 14, 2023
1 parent 099084c commit dfad0dd
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 40 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion examples/StepperDemo/StepperDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
18 changes: 9 additions & 9 deletions extras/tests/simavr_based/test_sd_04_timing_2560/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

12 changes: 6 additions & 6 deletions extras/tests/simavr_based/test_sd_04_timing_328p/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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

6 changes: 3 additions & 3 deletions extras/tests/simavr_based/test_sd_11_328p/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

8 changes: 4 additions & 4 deletions extras/tests/simavr_based/test_sd_15_328p/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

8 changes: 4 additions & 4 deletions extras/tests/simavr_based/test_sd_16_328p/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

8 changes: 4 additions & 4 deletions extras/tests/simavr_based/test_sd_17_328p/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

4 changes: 2 additions & 2 deletions extras/tests/simavr_based/test_sd_18_328p/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion extras/tests/simavr_based/test_sd_18_328p/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dfad0dd

Please sign in to comment.