Hi,
Would any one help me on the EDMA3 for SPI transmission problem? I posted it last week, but it seems nobody checked it. Thanks again.
I am using OMAP-L137 DSP, non BIOS.
I need transfer a bulky data array through the SPI1 interface of DSP. I instantiate an DMA channel of EMDA3 engine to transfer the data array to the SPI1 tx buffer. I follow the steps to setup my DMA channel presented in page 143 of SPRUFL1C.
However, there is no any data transferring out from SPI. Could you help me check where is the bug? I post the setup steps below.
////////////////////////////////////////
Step (1): Write EMCR, CCEERCLR, ECR registers to clear the EMR, CCERR, ER
EMCR = 0xFFFFFFFF;
CCERRCLR = 0xFFFFFFFF;
ECR = 0xFFFFFFFF;
Step (2): Set DMA channel's event enable register (EESR). We choose Event 2.
EESR = 4;
Step (3): Set PaRAM entry for DMA. As we choose Event 2 to enable, we setup the PaRAM set 2. PaRAM_Set2_BASE = 0x01C04040.
OPT = 0x100000; // enable Transfer complete interrupt
SRC address is the data array address;
DST address is SPI1_DAT1 address;
BCNT = 5;
ACNT = 2;
DSTBIDX = 0; // as DST is SPI1 tx buffer
SRCBIDX = 2;
LINK = 0xFFFF;
BCNTRLD = 0;
CNT = 1;
DSTCIDX = 0;
SRCCIDX = 0;
Step (4): Set DMA event 2's interrupt register. We enable interrupt of Event 2.
IESR = 4;
Step (5): Write to event set register (ESR) to manually initiate DMA transfer request for Event 2
ESR = 4;
////////////////////////////////////////
My second question is whether we manually set the ESR in order to initiate the DMA TR for the SPI? I thought it should be automatically to initiate the DMA TR once we setup the event 2.
Thank you.