during my work, i use the EPPI2 to receive the image, and use the EPPI0 to display image,that is connect to ch7024.
if i enable one of them alone every times,it work correctly,but if i enable both of them, it works incorrect, who can help
me, sincere thanks before.
the capture_image_ok.jpg proved that the EPPI2 works correct, but the display is incorrect.
Hi Cheng,
I guess you might be seeing some arbitration issue, as the EPPI0 and EPPI2 both are handled by same SCB slave interface, i.e SCB5. Please refer SCB chapter in HRM for more details.
Can you check if programming SCB register to some combinations will work for you or not?
Thanks,
Prashant
reg_val = *pREG_SCB5_ARBR0;
*pREG_SCB5_ARBR0 = 0xff000003;
or
*pREG_SCB5_ARBW0 = 0x0000000;
*pREG_SCB5_ARBW0 = 0x1000000;
*pREG_SCB5_ARBW0 = 0x2000000;
*pREG_SCB5_ARBW0 = 0x3000000;
*pREG_SCB5_ARBW0 = 0x4000002;
*pREG_SCB5_ARBW0 = 0x5000002;
*pREG_SCB5_ARBW0 = 0x6000002;
*pREG_SCB5_ARBW0 = 0x7000002;
*pREG_SCB5_ARBR0 = 0xff000007;
it looks like does not work, thanks
if i enable the eppi2 like this, the program running well, but point is, where is the different between using the API and direct write the register.
/* driver API result code */
ADI_EPPI_RESULT result;
/* open the EPPI driver */
result = adi_eppi_Open(PPI_DEVICE_NUM, ADI_EPPI_DIRECTION_RX, driverMemory, (uint32_t)ADI_EPPI_MEMORY_SIZE, &hDevice);
/*
* Use the driver API's to configure EPPI for SAA7113
*/
adi_eppi_SetITUMode(hDevice,ADI_EPPI_GENERAL_PURPOSE);
adi_eppi_SetFSMode(hDevice,ADI_EPPI_FS_MODE2);
adi_eppi_SetDataLength(hDevice,ADI_EPPI_8BIT);
adi_eppi_SetDmaTransferSize(hDevice,ADI_EPPI_DMA_TRANSFER_32BIT);
adi_eppi_SetSamplesPerLine(hDevice,IMAGE_WIDTH*2);
adi_eppi_SetLinesPerFrame(hDevice,IMAGE_HEIGHT);
adi_eppi_SetPack(hDevice,true);
/* Register a callback for the DMA */
result = adi_eppi_RegisterCallback(hDevice, PpiCallback, NULL);
/* submit the EPPI buffers */
result = adi_eppi_SubmitBuffer(hDevice, &CmosBuffer1, RX_CMOS_SIZE);
result = adi_eppi_Enable(hDevice,true);
return 0;
You mean, when you use ADI PPI drivers for enabling EPPI2, it doesn't work; but when you enable EPPI2 using direct register writes, then it works fine? Please clarify.