You are here

FX2 Data Corruption | Cypress Semiconductor

FX2 Data Corruption

Summary: 0 Replies, Latest post by ismell on 06 Mar 2014 09:39 AM PST
Verified Answers: 0
Log in to post new comments.
ismell's picture
8 posts


I'm experiencing some data corruption from the point I send data to the OUT endpoint and by the time it reaches the fdata pins on the slave FIFO. Let me explain my setup.

I started by following the Synchronous Slave FIFO Streaming Example. So I have an Altera MAX V CPLD acting as a Master FIFO and the FX2 configured as a Slave FIFO with two endpoints. Endpoint 0x02 is configured as an OUT BULK end point and 0x86 is configured as an IN INTERRUPT endpoint with polling interval of 1. You can see the descriptor here

The FX2 is configured to auto commit both endpoints. I am using an external clock provided by the CPLD as the FIFO clock. The clock is running at 10MHz. You can see the configuration here

My application is based off the Streaming Example included in the SDK. It queues up a few async transfers on the IN endpoint and waits for the CPLD to send a packet. shows the BeginXfer call and shows the EndXfer call. This is all copied from the example and has not been changed.

The changes do start with analyzeFrameData at If the frame contains one of the specified commands I want to send a packet on the OUT endpoint. I'm using the synchronous API to do this. You can see my XferData call on the OUT endpoint here This is where the data corruption is happening. It doesn't happen all the time, but randomly. I have used my logic analyzer to sniff the fdata[7:0] pins on the FX2 to see what it is sending to my CPLD and there is usually one byte that is incorrect.

Does anyone see anything wrong with the way I'm using the API? Is using the synchronous XferData API wrong in this case? Should I be creating an async request for my OUT endpoint? 

Any suggestions would be greatly appreciated.



p.s) I'm using an Interrupt IN endpoint because I need to keep latency as low as possible. I have under 1ms between the time the CPLD sends the pkt_end signal to the FX2 and when I have to start writing data back to the CPLD.

Log in to post new comments.