I am attempting to read 960 halfwords from an FPGA which is connected to EMIF ASYNC 1. The read is requested and actioned properly (it can be seen on a logic analyzer) but there are 'holes' in the array that the data is read into. Reads are alternated between channel 0 and channel 1 with two separate destination buffers. The packet control for channel 0 is set up as :
struct /* 0x000-0x400 */
{
uint32 ISADDR = 0x60000038;
uint32 IDADDR = address of buffer 0 (0x0800ac20);
uint32 ITCOUNT = 0x000103c0; (1 block of 960 )
uint32 rsvd1;
uint32 CHCTRL = 0x00005002; (Auto-init off, write mode post inc - indexed shows same problem-
read mode constant, ttype 0 (hw requests 1 frame), read and write size 16 bits,
chain is no channel
uint32 EIOFF = 0x00020000;
uint32 FIOFF = 0x00000000;
uint32 rsvd2;
}PCP[32U];
Channel 1 is the same except for the buffer address.
The read is triggered by
dmaSetChEnable( DMA_CH0, DMA_SW);
or similar for channel 1
The code checks to see if any DMA is in progress by calling
dmaIsChannelActive( DMA_CH0 );
dmaIsChannelActive( DMA_CH1 );
No DMA is started unless both are inactive.
The memory for the EMIF region is set up as device shareable.
The holes are in the same place for every read each time the DMA is actioned but seem to move every time the software is restarted. They are always on a 32byte boundary and a multiple of 32 bytes in size leading me to suspect a FIFO issue. Changing the setup to read 80 blocks of 12 does not fix the problem.