I use blackfin 532. I find memdma is difficult to use, especially when externer sdram as destination. For example, I use descriptor-based memdma, with the wdsize set to 32, L1 sram to sdram. the dma seems work, but occasionally locks up, with DMA_RUN flag not cleared. My program relies heavily on dma, other dma like ppi dma, sport0 dma and memdma with L1 data sram or sdram to L1 sram work well. But when destination is sdram, thing becomes bad. To workaround, I use instruction copy. Codes like this: lsetup(lcopys3, lcopye3) lc0 = p0; lcopys3: lsetup(lcopys4, lcopye4) lc1 = p1; lcopys4: r0 = [p3++]; lcopye4: [p2++] = r0; lcopye3: p2 = p2 + p4; It doesn't work properly, until I add a ssync at the end of [p2++] = r0; That's why? It works, but the performance is poor. Do you have the same problem? I am appreciated for any advice. Thanks in advance. |
|
BF532 memdma error and sdram access problem
Started by ●January 4, 2004
Reply by ●January 4, 20042004-01-04
--On Sunday, January 04, 2004 8:40 AM +0000 linchongliang <> wrote: > To workaround, I use instruction copy. Codes like this: > > lsetup(lcopys3, lcopye3) lc0 = p0; > lcopys3: > lsetup(lcopys4, lcopye4) lc1 = p1; > lcopys4: r0 = [p3++]; > lcopye4: [p2++] = r0; > lcopye3: > p2 = p2 + p4; > It doesn't work properly, until I add a ssync at the end of [p2++] = > r0; > That's why? > It works, but the performance is poor. While I don't know the answer to your question, I'd suggest looking at the source code for memcpy in VisualDSP to see how ADI does this. |
|
Reply by ●January 4, 20042004-01-04
Take a look at the anamoly list (copied below). Looks like this could definately be affecting you. The best solution seems to be get some rev 0.2 silicon if you can. Hope it helps. 17. Descriptor-based MemDMA may lock up with 32-bit transfers or if transfers span 64KB buffers [05000102]: Description: MemDMA streams can deadlock (stop all DMAs for all channels) if a) a descriptor-based transfer is used AND EITHER b) 1) 32-bit data transfers (MDMA_yy_CONFIG:WDSIZE[1:0])OR 2) the transfer spans 64KB page boundaries Workaround: For descriptor-based MemDMA use 16-bit MemDMAs and split each DMA up into multiple MemDMA operations so it does not span a 64-KB page boundary. This problem does not occur in autobuffer mode. Applies to revision(s): ADSP-BF533-0.1 --- In , Kenneth Porter <kenneth_porter@k...> wrote: > --On Sunday, January 04, 2004 8:40 AM +0000 linchongliang > <linchongliang@y...> wrote: > > > To workaround, I use instruction copy. Codes like this: > > > > lsetup(lcopys3, lcopye3) lc0 = p0; > > lcopys3: > > lsetup(lcopys4, lcopye4) lc1 = p1; > > lcopys4: r0 = [p3++]; > > lcopye4: [p2++] = r0; > > lcopye3: > > p2 = p2 + p4; > > It doesn't work properly, until I add a ssync at the end of [p2++] = > > r0; > > That's why? > > It works, but the performance is poor. > > While I don't know the answer to your question, I'd suggest looking at the > source code for memcpy in VisualDSP to see how ADI does this. |