Hi,
I have a problem with the EDMA in an OMAP3530 processor. I have 3 modules with an OMAP3530. On one of the OMAP3530 everything works fine. On 2 other there is a problem with EDMA. The whole code is working fine except that the EDMA doesn't copy data (finished flag is never set, buffer is empty). In error registers of EDMA there are no errors except Event missed error. EDMA is to copy data from SDRAM to L2RAM (0x107F8000) and back. The MMU unit is turned off. I try to copy 16kB and 32kB data packs.
I changed code to use SDMA instead of EDMA and it works on every processor I have, but it's too slow for my needs. With SDMA I use 0x5C7F8000 L2RAM address.
I write uboot standalone program - without an OS. I use 2 cores of OMAP3530. I configure:
SYSC_LICFG0 = 1<<!6 | 1<<15 | 1<<9 | 1<<8 | 1<<1;
//DSP cache operation transfers are optimized
//DSP program initiated write-back transfer completion is accurate
//2D DMA transfers optimization is enabled
//DMA write transfer completion is accurate
//Bursts are not allowed to cross 4KB page boundaries
What can cause this problem? Why it depends on processor?
My EDMA code for IVA2.2:
function RegisterSet( register address, value to set, field width, field offset)
void IVA_EDMA_Init(void)
{
RegisterSet(&TPCC_OPT0, 0, 6, 12);//TCC - 6bit code
RegisterSet(&TPCC_OPT0, 0, 1, 11);//0: Normal Completion
RegisterSet(&TPCC_OPT0, 2, 3, 8);//FIFO width: 2- 32bit; 0 - 8bit ?????????
RegisterSet(&TPCC_OPT0, 0, 1, 3);//Entry normal; not static
RegisterSet(&TPCC_OPT0, 1, 1, 2);//AB-Sync, Each event triggers the transfer of BCNT arrays
RegisterSet(&TPCC_OPT0, 0, 1, 1);//DAM=0 Dst addressing within an array increments
RegisterSet(&TPCC_OPT0, 0, 1, 0);//SAM=0 Src addressing within an array increments
RegisterSet(&TPCC_LNK0, 0, 16, 16);//BCNT Reload
RegisterSet(&TPCC_LNK0, 0xFFFF, 16, 0);//Link Address
RegisterSet(&TPCC_DCHMAP0, 0, 9, 5);//PaRAM Entry number for DMA Channel 0
}
void IVA_EDMA_Update(DMA_Settings * xSettings)
{
TPCC_EMCR = 0xFFFFFFFF;//clear missed events
TPCC_EMCRH = 0xFFFFFFFF;//clear missed events
TPCC_CCERRCLR = 0x00010003;//clear errros
TPCC_ECR = 0xFFFFFFFF;//event clear (previous event)
TPCC_SRC0 = (int)xSettings->BufferScr;
TPCC_DST0 = (int)xSettings->BufferDst;
RegisterSet(&TPCC_ABCNT0, xSettings->SizeY, 16, 16);//BCNT
RegisterSet(&TPCC_ABCNT0, xSettings->SizeX, 16, 0);//ACNT
RegisterSet(&TPCC_BIDX0, xSettings->SizeX, 16, 16);//Destination B-Idx offset between Destination arrays:
RegisterSet(&TPCC_BIDX0, xSettings->SizeX, 16, 0);//Source B-Idx offset between Source arrays
RegisterSet(&TPCC_CCNT0, 1, 16, 0);//CCNT Count for 3rd Dimension
}
void IVA_EDMA_Enable(void)
{
RegisterSet(&TPCC_ESR, 1, 1, 0);//Set event 0
}
int IVA_EDMA_IsFinished(void)
{
if (!(TPCC_CCSTAT & (1<<0)))
{
return 1;
} else return 0;
}
I emphasize that one of the OMAP3530 everythink works fine. I change processors by changing module with an OMAP3530 on my test board.
Best regards
Tomasz