I've got things working without DMA for the moment, I have the state machine handling all the various serial shifting and pin enabling to the hardware. I'm looping put() commands to feed it with data, and want to use DMA.
But I'm stuck on setting it up. I have everything configured right, I think, but for the life of me can't get attach the dma object to the state machine.
The problem is in the following code, taken from the above example which doesn't compile.
It throws this error:
What is the syntax for specifying a PIO in the write=param? Is there any documentation on this? The only example I found doesn't compile and
https://docs.micropython.org/en/latest/ ... 2.DMA.html seems to say that it should work. (write=my_state_machine)
Using MicroPython 1.22.2
But I'm stuck on setting it up. I have everything configured right, I think, but for the life of me can't get attach the dma object to the state machine.
The problem is in the following code, taken from the above example which doesn't compile.
Code:
self._sm = StateMachine(sm_id, muxed7seg, freq=2 * count_freq, out_base=Pin(pin_out), pull_thresh=11)...self.dma0.config(read=addressof(self.seg_buffer), write=self._sm, count=3, ctrl=self.ctrl0)
Code:
Traceback (most recent call last): File "<stdin>", line 83, in <module> File "<stdin>", line 48, in __init__TypeError: can't convert StateMachine to int
https://docs.micropython.org/en/latest/ ... 2.DMA.html seems to say that it should work. (write=my_state_machine)
Using MicroPython 1.22.2
Statistics: Posted by iansmith6 — Thu Apr 11, 2024 9:16 pm