What happens to data if the host fails to read it on time?

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

cross mob
Anonymous
Not applicable

Here's the scenario: the GPIF generates the data and passes it through the manual DMA channel to the USB side. The data generation is non-stop, so if the host is not reading the data, what happens to it, at what stage, and is there a way to signal when it happens (via events/interrupts)? Please, provide the detailed description of data flow from the GPIF unit to USB unit including all the events/interrupts, buffers, buffer wrap ups, buffer commitments and other events that happen during the transfer.

0 Likes
1 Reply
Anonymous
Not applicable

Hi,

   

If host fails to read data at time and if the External device on GPIF is not aware of this, it tries to write to FX3, but as the buffers are filled, the new data written will be dropped and previously occupied data will continue to stay in the buffer. This condition is called backflow. This can be detected as a PIB Error. The PIB errors are detected by setting up a callback using CyU3PPibRegisterCallback API.

   

TO avoid this, there should be flow control between FX3 and processor. This is implemented using DMA Flags. The flags are output control lines from FX3 to External Device to tell if FX3's DMA Buffers are ready to receive or send data.

   

This is implemented in our SlaveFifo Sync Example project in the following application note: 

   

http://www.cypress.com/documentation/application-notes/an65974-designing-ez-usb-fx3-slave-fifo-inter...

   

regards,

   

-Madhu Sudhan

0 Likes