kevinjwalters wrote:Is the PIO PULL instruction fully supported in CircuitPython for the Raspberry Pi Pico including feeding the data to it via the FIFO?
The latest checked in code requires you to block in your pioasm. Otherwise, `write` will never return. My working branch has this changed so you can set `wait_for_txstall` to False.
kevinjwalters wrote:I was trying to create the equivalent of this
PIO PWM MicroPython code in CircuitPython but couldn't get it to work. That example uses
exec's instructions to run code before the state machine starts up. The
init constructor parameter looks like it can't be used as a sustitute (or to initialise things) because it is not guaranteed to run
before the state machine's code? From
https://github.com/adafruit/circuitpyth ... eMachine.c
I'm changing this as well in my branch. init code will run before start up. I didn't realize you could run stuff when the SM wasn't enabled.
kevinjwalters wrote:I also couldn't control-c the write method sometimes from serial console.
I'll double check the wait loops in write when I look at this code next.
kevinjwalters wrote:Are there any plans to add a loop option to write?
Not in the near future. It's not clear what the right API is since write blocks.
kevinjwalters wrote:How many state machines can be created in CircuitPython? The hardware looks like it has 2*4=8?
Ya, 8 assuming your instructions can all fit. CP will co-locate into a PIO if given the same program bytearray and a free SM is available.