2008-05-07 22:43:36     PPI DMA in flow Large descriptor mode.

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-05-07 22:43:36     PPI DMA in flow Large descriptor mode.

Praneeth Bodduluri (INDIA)

Message: 55618   

 

Hello,

 

I am having trouble in getting the DMA to run in the large descriptor mode.  I am mostly gettign IRQ errors and the even if the DMA does manage to get into the proper IRQ it fails to load the second descriptor.

 

 

 

Attached is the part of the Code I modified (After setting DMA_FLOW_MODE to 0x0007)

 

~~

 

Praneeth

 

upload.c

QuoteReplyEditDelete

 

 

2008-05-07 22:46:43     Re: PPI DMA in flow Large descriptor mode.

Praneeth Bodduluri (INDIA)

Message: 55619   

 

Upload didnt seem to work

 

 

 

http://lifeeth.googlepages.com/upload.c

QuoteReplyEditDelete

 

 

2008-05-08 12:14:35     Re: PPI DMA in flow Large descriptor mode.

Hans Eklund (SWEDEN)

Message: 55648    Struggled with similar problem recently, have not studied your code in detail, but watch out doing enable_dma(CH_PPI) while having loaded the current descriptor with DMA_EN flag. Enabling dma in the dma config registry will load the next descriptor in the chain automatically i believe. Check HRM(Hardware reference manual) for the Blackfin, DMA chapter more closley. It should suffice to load the current descriptor register with with DMA_EN and not do enable_dma() call. My working code snippets for interrupt on second descriptor(just 2 blocks of data for me): desc->cfg = DMAFLOW_LARGE | NDSIZE_9 | RESTART | WDSIZE_16 | WNR | DMA2D | DMAEN; (desc+1)->cfg = DMAFLOW_STOP | NDSIZE_0 | RESTART | WDSIZE_16 | WNR | DMA2D| DMAEN | DI_EN ; set_dma_x_count(CH_PPI, desc->x_count); set_dma_x_modify(CH_PPI, desc->x_modify); set_dma_y_count(CH_PPI, desc->y_count); set_dma_y_modify(CH_PPI, desc->y_modify); set_dma_start_addr(CH_PPI, desc->start_addr); set_dma_next_desc_addr(CH_PPI, (unsigned long)desc); set_dma_config( CH_PPI, desc->cfg ); SSYNC(); then i just enable the PPI and _dont_ do enable_dma(). Maybe not 100% accurate for your case, but maybe it will help. /Hans

Attachments

Outcomes