File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -289,14 +289,15 @@ def start_pio_dma(self):
289
289
self .dma = rp2 .DMA ()
290
290
req_num = ((self .sm_id // 4 ) << 3 ) + (self .sm_id % 4 ) + 4
291
291
dma_ctrl = self .dma .pack_ctrl (
292
- size = 0 , # 0 = 8-bit, 1 = 16-bit, 2 = 32-bit
292
+ size = 2 , # 0 = 8-bit, 1 = 16-bit, 2 = 32-bit
293
293
inc_read = False ,
294
- treq_sel = req_num
294
+ treq_sel = req_num ,
295
+ bswap = True
295
296
# irq_quiet = False
296
297
)
297
298
self .dma .config (
298
299
read = self .sm ,
299
- count = 244 * 324 ,
300
+ count = 244 * 324 // 4 ,
300
301
ctrl = dma_ctrl
301
302
)
302
303
@@ -340,7 +341,7 @@ def _vsync_handler(self):
340
341
# Ensure PIO RX FIFO is empty (it's not emptied by `sm.restart()`)
341
342
while self .sm .rx_fifo () > 0 :
342
343
self .sm .get ()
343
-
344
+
344
345
# Reset the DMA write address
345
346
self .dma .write = self .buffer
346
347
@@ -349,7 +350,7 @@ def _vsync_handler(self):
349
350
350
351
@rp2 .asm_pio (
351
352
in_shiftdir = rp2 .PIO .SHIFT_LEFT ,
352
- push_thresh = 8 ,
353
+ push_thresh = 32 ,
353
354
autopush = True
354
355
)
355
356
def _pio_read_dvp ():
You can’t perform that action at this time.
0 commit comments