Master GPIF2 read errors.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
amjoc_3854616
Level 3
Level 3

Hi,

I'm trying to read/write data (size : 8MB) to FPGA through GPIF2 interface with fx3 as a master. Example code used for this purpose is AN87216.

I've changed according to my needs. Read will start by checking FLAGA status, instead of that i used FW_TRG with INTR_CPU at RD_CTRL state. When i try to read data from Control center utility, only (2048*16) bytes of data is read. If i try to read again, the following error is shown.

BULK IN transfer

BULK IN transfer failed with Error Code:997

Can you help with start reading data without checking the flag status? I need to get complete data without data loss?

Attaching firmware code and .cydsn folder.

Message was edited by: amal john

0 Likes
1 Solution

Hi Amal,

You are using !DMA_RDY_TH0 from "DO_IN_DATA" to "RD_WR_IDLE" when DMA buffer gets exhausted. Please note that there is a delay in the propagation of this flag status. And hence you are losing 4 bytes when buffer gets full. Please use DMA_WM_TH0 (watermark flag) here. After watermark flag is received kindly do INDATA according to watermark value set  and then reach "RD_WR_IDLE" state. Use "DMA_RDY_TH0" in all other transaction equations.

Thanks & Regards
Abhinav

View solution in original post

7 Replies