Closed jepler closed 3 weeks ago
Doing a single non-looping background write first may be a workaround for the problem:
sm.background_write(data)
time.sleep(.01)
sm.background_write(loop=data)
@ladyada for the TM1814 program you can also try with this workaround
def _transmit(self, buf):
self._buf = buf
## WORKAROUND FOR https://github.com/adafruit/circuitpython/issues/9678
self._sm.background_write(memoryview(buf).cast("L"), swap=True)
time.sleep(.01)
## END WORKAROUND
self._sm.background_write(loop=memoryview(buf).cast("L"), swap=True)
CircuitPython version
Code/REPL
Behavior
This program should write 32-bit SPI data 0x0 ... 0x3f, forever.
It seems like this is what it does on RP2350 (with recent-ish main branch build; though I could test more closely)
On RP2040, the first repetition of the data is truncated.
This causes problems with PIO programs like the "background writing neopixel" because when the data organization is wrong, the wrong parts of the DMA data stream can be used for a bit count or a delay count.
Description
No response
Additional information
No response