Skip to content

Passing parameters to state machine in PIO #9362

Discussion options

You must be logged in to vote

If I understand what you want to do, you need to first put data into PIO and then PULL from inside an SM.

import rp2

@rp2.asm_pio()
def pio_function():
    pull()
    mov(x, osr)

sm_0 = rp2.StateMachine(0, pio_function, freq=10_000)
user_parameter = int(input("Write user input: "))
sm_0.put(user_parameter)

Something along those lines.

BR

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Prakhar005
Comment options

@Vendelator
Comment options

@Prakhar005
Comment options

@Vendelator
Comment options

Answer selected by Prakhar005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants