diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index acbf0e3ab2841..5f35445cff527 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -322,7 +322,7 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, pio_program_t program_struct = { .instructions = (uint16_t *)program, .length = program_len, - .origin = -1 + .origin = offset, }; PIO pio; uint state_machine;