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):
289289        self .dma  =  rp2 .DMA ()
290290        req_num  =  ((self .sm_id  //  4 ) <<  3 ) +  (self .sm_id  %  4 ) +  4 
291291        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 
293293            inc_read  =  False ,
294-             treq_sel  =  req_num 
294+             treq_sel  =  req_num ,
295+             bswap  =  True 
295296            # irq_quiet = False 
296297        )
297298        self .dma .config (
298299            read  =  self .sm ,
299-             count  =  244  *  324 ,
300+             count  =  244  *  324   //   4 ,
300301            ctrl  =  dma_ctrl 
301302        )
302303
@@ -340,7 +341,7 @@ def _vsync_handler(self):
340341        # Ensure PIO RX FIFO is empty (it's not emptied by `sm.restart()`) 
341342        while  self .sm .rx_fifo () >  0 :
342343            self .sm .get ()
343-          
344+ 
344345        # Reset the DMA write address 
345346        self .dma .write  =  self .buffer 
346347
@@ -349,7 +350,7 @@ def _vsync_handler(self):
349350
350351    @rp2 .asm_pio ( 
351352            in_shiftdir  =  rp2 .PIO .SHIFT_LEFT , 
352-             push_thresh  =  8 , 
353+             push_thresh  =  32 , 
353354            autopush  =  True  
354355        ) 
355356    def  _pio_read_dvp ():
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments