I've been trying to get a memory-to-memory dma example working under codec engine on the OMAP-L137 processor.
Earlier investigation led me to believe that channel 8 and param set 8 are available for use (Linux lays no claim to them).
First I forced the EDMA3 LLD example project to use channel 8/ PaRAM set 8. I ran the resulting image on my target hardware using just the DSP (no ARM9 code). That worked fine.
I tried to convert the main for the EDMA3 LLD to a test function and glued it into my Codec Engine server build. That didn't work, even though I was limiting myself to 8, 8.
I ran the EDMA3 LLD example again, stopping the code before it initiated the transfer. I copied the PaRAM set into my Codec Engine code. The values are
pParam = 0x1c04100
pParam[0] is 0x81008104
pParam[1] is 0xc251d350
pParam[2] is 0x200002
pParam[3] is 0xc251d390
pParam[4] is 0x20002
pParam[5] is 0xffff
pParam[6] is 0x0
pParam[7] is 0x1
I am trying t o manually start the as the example project did. So far no luck. In order to debug my code, I cleared the EER, bit 8. According to the manual, this will caused an ESR write to bit 8 to be directly reflected in ER and not cleared until I manually clear it. (That is the way I interpreted the manual anyway.)
er = (UInt32 *)0x01c01000;
esr = (UInt32 *)0x1c01010;
eecr = (UInt32 *)0x1c01028;
and
*eecr = 1<<edmaChan;
temp = *er;
*esr = 1<<edmaChan;
temp2 = *er;
GT_1trace(gtMask, GT_1CLASS, "spi_dma_setup> ER before set = 0x%lx\n", temp);
GT_1trace(gtMask, GT_1CLASS, "spi_dma_setup> set ESR = 0x%lx\n", 1<<edmaChan);
GT_1trace(gtMask, GT_1CLASS, "spi_dma_setup> ER after set = 0x%lx\n", temp2);
where edmaChan = 8.
I get the following output:
spi_dma_setup> ER before set = 0x3000440
spi_dma_setup> set ESR = 0x100
spi_dma_setup> ER after set = 0x3000440
I expected the second ER value to have bit 8 set, but it doesn't. I have tried this using the global registers and Shadow 1 registers. Neither worked the way I expected. Can anyone see anything obvious that is wrong? (My plan was to make sure that the ESR assignment works with the EER cleared before I enabled the event.)