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

USB low-full-high speed peripherals Forum Discussions

HXH
Level 1
Level 1
First reply posted First like given First like received

When there is no data in the FIFO of FX2(CY68013), if we use the upper computer(control center supplied by cypress ) to read the USB, something wrong will happen: no matter whether there is data in FIFO, the subsequent reads are all unsuccessful.

However, this situation doesn't occur in FX3(USB3014). I have tested it.

If this problem in fx2 can be solved, Can you tell me the solution?

THANK U !!!

3 Replies
MallikaK_22
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 250 replies posted

Hi,

If FX2 FIFO is empty and data if at all is read, it will not be a valid data. So, one should not read from an EMPTY FIFO.

May I know the flow of data in your case and details about your application. Also, why do you intend to read from an empty FIFO?

Regards,

Mallika

0 Likes

 Hi:

Thanks for your reply.

This is an infrared FPGA project with a USB module to transform data to an upper computer. After processing the original data, we send the data to USB. There are 3 modes in the data: test data, real data, and stopping sending data.

Due to the upper computer (written by myself in c++) keeps getting data,  read empty FIFO will occur in the third mode (stopping sending data).

after stopping mode we change the mode to the other two, but then THE USB CAN'T TRANSFORM DATA

Regards

 

0 Likes
MallikaK_22
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 250 replies posted

Hi,

How are you handling the EPx FIFO registers for the 3 different modes. Are you using auto or manual mode?

The FIFO size will be defined by the value specified in the registers. Is that being managed accordingly for the 3 different modes?

Regards,

Mallika

0 Likes