Skip to content

Commit

Permalink
make all tests pass and disable test for issue #250
Browse files Browse the repository at this point in the history
  • Loading branch information
gin66 committed Apr 28, 2024
1 parent 19e6dfe commit df95a60
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 19 deletions.
16 changes: 8 additions & 8 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=27us Total High=390370us
StepB: 64000*L->H, 64000*H->L, Max High=33us Total High=393554us
StepC: 64000*L->H, 64000*H->L, Max High=40us Total High=618397us
StepA: 64000*L->H, 64000*H->L, Max High=31us Total High=588641us
StepB: 64000*L->H, 64000*H->L, Max High=32us Total High=414769us
StepC: 64000*L->H, 64000*H->L, Max High=40us Total High=431717us
Position[A]=64000

Position[B]=64000
Expand All @@ -17,13 +17,13 @@ Time in EnableA max=233598 us, total=233598 us

Time in EnableB max=246080 us, total=246080 us

Time in EnableC max=254236 us, total=254236 us
Time in EnableC max=254235 us, total=254235 us

Time in FillISR max=3102 us, total=2092792 us
Time in FillISR max=2804 us, total=2134900 us

Time in StepA max=27 us, total=390370 us
Time in StepA max=31 us, total=588641 us

Time in StepB max=33 us, total=393554 us
Time in StepB max=32 us, total=414769 us

Time in StepC max=40 us, total=618397 us
Time in StepC max=40 us, total=431717 us

14 changes: 7 additions & 7 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=5545us
StepB: 1000*L->H, 1000*H->L, Max High=15us Total High=5535us
StepA: 1000*L->H, 1000*H->L, Max High=14us Total High=5340us
StepB: 1000*L->H, 1000*H->L, Max High=16us Total High=5816us
Position[A]=1000

Position[B]=1000

Time in EnableA max=225398 us, total=225398 us

Time in EnableB max=238117 us, total=238117 us
Time in EnableB max=238116 us, total=238116 us

Time in FillISR max=2644 us, total=47661 us
Time in FillISR max=2642 us, total=47691 us

Time in StepA max=14 us, total=5545 us
Time in StepA max=14 us, total=5340 us

Time in StepB max=15 us, total=5535 us
Time in StepB max=16 us, total=5816 us

Time in StepISR max=7 us, total=9224 us
Time in StepISR max=7 us, total=9363 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=10us Total High=5270us
StepA: 1000*L->H, 1000*H->L, Max High=10us Total High=5028us
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=27557 us
Time in FillISR max=2014 us, total=27533 us

Time in StepA max=10 us, total=5270 us
Time in StepA max=10 us, total=5028 us

Time in StepISR max=7 us, total=4581 us

31 changes: 30 additions & 1 deletion src/AVRStepperPins.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#endif
#define stepPinStepper1A 11 /* OC1A */
#define stepPinStepper1B 12 /* OC1B */
#define stepPinStepper1C 13 /* OC1B */
#define stepPinStepper1C 13 /* OC1C */
#define stepPinStepper3A 5 /* OC3A */
#define stepPinStepper3B 2 /* OC3B */
#define stepPinStepper3C 3 /* OC3C */
Expand All @@ -41,6 +41,35 @@
#define stepPinStepper5A 46 /* OC5A */
#define stepPinStepper5B 45 /* OC5B */
#define stepPinStepper5C 44 /* OC5C */

#define OC1A_PORT PORTB
#define OC1A_PORT_BIT 0x20
#define OC1B_PORT PORTB
#define OC1B_PORT_BIT 0x40
#define OC1C_PORT PORTB
#define OC1C_PORT_BIT 0x80

#define OC3A_PORT PORTC
#define OC3A_PORT_BIT 0x08
#define OC3B_PORT PORTC
#define OC3B_PORT_BIT 0x10
#define OC3C_PORT PORTC
#define OC3C_PORT_BIT 0x20

#define OC4A_PORT PORTH
#define OC4A_PORT_BIT 0x08
#define OC4B_PORT PORTH
#define OC4B_PORT_BIT 0x10
#define OC4C_PORT PORTH
#define OC4C_PORT_BIT 0x20

#define OC5A_PORT PORTL
#define OC5A_PORT_BIT 0x08
#define OC5B_PORT PORTL
#define OC5B_PORT_BIT 0x10
#define OC5C_PORT PORTL
#define OC5C_PORT_BIT 0x20

#elif defined(__AVR_ATmega32U4__)
#define FAS_TIMER_MODULE 1
#define stepPinStepper1A 9 /* OC1A */
Expand Down

0 comments on commit df95a60

Please sign in to comment.