Skip to content

Commit c606a44

Browse files
committed
pico: fix cycle mismatch in pio-code
1 parent bfe1156 commit c606a44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pico_pio.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ stepper_pio_program *stepper_make_program() {
102102
add_step(pio_encode_jmp_pin(program.pc + 2));
103103
// Step or Pause is completed
104104
uint8_t forward_jump_1 = program.pc;
105-
add_step(pio_encode_jmp(0) | pio_encode_delay(7));
105+
// same cycle count as the branch for the position update
106+
add_step(pio_encode_jmp(0) | pio_encode_delay(6));
106107
//
107108
// Perform increment by one with only invert and decrement:
108109
// position 0 1 2 .. d e f ef

0 commit comments

Comments
 (0)