adafruit / Adafruit_CircuitPython_PIOASM

Simple assembler to convert pioasm to bytes
MIT License
27 stars 17 forks source link

.side_set N opt is not currently implemented #16

Closed kevinjwalters closed 2 years ago

kevinjwalters commented 3 years ago

The optional opt flag for .side_set is not currently implemented in the assembler. This is used in some of the common PIO examples and an example in section 3.5.4 of the RP2040 data sheet.

kevinjwalters commented 3 years ago

This may require additional code in the RP2040 CircuitPython code to distinguish between optional and non-optional side sets, cf https://github.com/micropython/micropython/blob/046164098337cc79dd0f6c710f49bdf6765aa711/ports/rp2/rp2_pio.c#L511-L522

dannystaple commented 2 years ago

I just spent a few hours to find this again (with examples the same as #21) - including disassembling. Can we put a notice for this in https://circuitpython.readthedocs.io/en/latest/shared-bindings/rp2pio/index.html?#rp2pio.StateMac?

tannewt commented 2 years ago

@dannystaple I don't think the CircuitPython doc should be updated for it because the issue is this library. I think it should work on the CP side. Instead, an error could be thrown by PIOASM if .side_set is in the assembly.

tannewt commented 2 years ago

I'm working on this now because it's needed for UART TX.

dannystaple commented 2 years ago

Ah, that is even better. Let me know if you need a PR tested - I can give it a go.