Skip to content

rp2040 PIO limit pins used for sideset #10319

Discussion options

You must be logged in to vote

I post a pice of code where the comments tell it:

    # By specifying a pair of values for sideset_init we reserve 2 of the 5 delay/side-set bits for sideset.
    # We have to take care that every instruction has a .side() instruction added, otherwise another bit is reserved for enabling the side-set
    #    thus reducing the maximum delay to 3 instead of 7.
    @asm_pio(sideset_init=(PIO.OUT_LOW, PIO.OUT_LOW), in_shiftdir=PIO.SHIFT_LEFT, out_shiftdir=PIO.SHIFT_RIGHT)
    def sm_qgen():
        nop()                  .side(0b00)        #    so that we can start by setting PC to 0.
        nop()                  .side(0b00)        #
        nop()                  .side(0b00)        # Reas…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DrMumurmular
Comment options

Answer selected by jimmo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants