AnsweredAssumed Answered

SC584 EPPI problem: lost the first line

Question asked by Jhon on Jul 4, 2017
Latest reply on Jul 21, 2017 by Jhon

Hi all,

 

I'm using SC584 and CCES2.6.0, the output of a high speed 16bit ADC is connected to EPPI pot of SC584. XTYPE is set to 3, and FS type is set to 1 FS. The EPPI_CLK and FS1 are external. After each FS1, 4400 samples are clocked into EPPI.

 

But the DSP will always drop(miss) the first line, and the EPPI_STAT=0x0002, which indicates a "Luma FIFO error". After that, from the 2nd frame, there are only 2200 samples received each line, and the second half of the line buffer is left to zeros.

 

The following is my eppi setup code.

/* EPPI driver handle */
ADI_EPPI_HANDLE hDevice;

/* EPPI driver memory */
#pragma align 32
uint8_t driverMemory[ADI_EPPI_MEMORY_SIZE];

/* driver API result code */
ADI_EPPI_RESULT result;

/* RX buffers */
#define SAMPLES_PER_LINE (4*1100)

#pragma align 32
int16_t RxBuffer1[SAMPLES_PER_LINE];

#pragma align 32
int16_t RxBuffer2[SAMPLES_PER_LINE];

/* PPI callback */
void PPI_Callback(void* pCBParam, uint32_t u32Arg, void* pArg)
{
...
}

int eppi_setup(void)
{
/* open the EPPI driver */
result = adi_eppi_Open(0, ADI_EPPI_DIRECTION_RX, driverMemory, (uint32_t)ADI_EPPI_MEMORY_SIZE, &hDevice);

result = adi_eppi_SetDirection (hDevice, false);
result = adi_eppi_SetITUMode (hDevice, ADI_EPPI_GENERAL_PURPOSE);
result = adi_eppi_SetFSMode (hDevice, ADI_EPPI_FS_MODE1);
result = adi_eppi_SetDataLength(hDevice, ADI_EPPI_16BIT);
result = adi_eppi_SetDmaTransferSize(hDevice, ADI_EPPI_DMA_TRANSFER_16BIT);

result = adi_eppi_SetClkPolarity(hDevice, ADI_EPPI_FALLCLK_FALLFS);
result = adi_eppi_SetFSPolarity (hDevice, ADI_EPPI_FS1HI_FS2HI);

result = adi_eppi_SetSamplesPerLine (hDevice, SAMPLES_PER_LINE);
result = adi_eppi_SetHorizontalDelay(hDevice, 0);
result = adi_eppi_SetHorizontalCount(hDevice, SAMPLES_PER_LINE);

result = adi_eppi_SetInternalClk(hDevice, false);
result = adi_eppi_SetInternalFS(hDevice, false);

result = adi_eppi_StreamingEnable(hDevice, true);

result = adi_eppi_RegisterCallback(hDevice, PPI_Callback, NULL);

result = adi_eppi_SubmitBuffer(hDevice, &RxBuffer1, SAMPLES_PER_LINE);
result = adi_eppi_SubmitBuffer(hDevice, &RxBuffer2, SAMPLES_PER_LINE);

result = adi_eppi_Enable(hDevice, true);

return 0;
}

 

This figure shows the contents of the EPPI device and some other variables, when the callback function PPI_Callback is first triggered.

 

 

The test input samples are incremented integers started by 0, so the samples of first line are 0,1,2,。。。,4399, and the 2nd line is 4400, 4401,...,8799.  

 

But the first sample in RxBuffer1[0] is 4400, and then increamented to RxBuffer1[2199]=6599, and RxBuffer1[2200] to RxBuffer1[4399] are all zeros. The 2nd buffer RxBuffer2[0]=6600, (not 8800 as expected), and increamented to RxBuffer2[2199]=8799, and RxBuffer2[2200] to RxBuffer2[4399] are all zeros. This means that only half of the buffer are filled.

 

This problem has confused me for a week, can anybody give some advice?

 

Thanks,

Jhon

Attachments

Outcomes