Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

This function takes an already initialized CCyBulkEndPoint double pointer. The device has been previously selected by TE_USB_FX2_Open().

Info
EP6's buffer is an HW buffer inside USB FX2 microcontroller, not the SW driver's buffer (on host computer) whose size is given by BufferSize parameter.
Note
titleIt is necessary that a FW/HW routine reads USB FX2 microcontroller's EP8 buffer.

If the EP6's buffer is not is not properly written by the FPGA(reference design)/other(custom design) the EP6's buffer will become empty and the host computer will be no longer able to receive further packets. In this case the TE_USB_FX2_GetData() function could experience strange behaviors. For example, a very low throughput (9-10 Mbyte/s even if a 31-38 Mbyte/s are expected) could be measured or the function TE_USB_FX2_GetData() fails returning false.

During USB read transmission test (RX: host computer perspective) the EP6's buffer writing is carried out by MicroBlaze (inside the FPGA); this behavior is setted by MicroBlaze API command FX22MB_REG0_START_TX (TX: USB FX2 microcontroller perspective)

Code Block
languagecpp
SendFPGAcommand(USBDeviceList,FX22MB_REG0_START_TX); 

Expected Data Throughput 

...

The maximum data throughput expected (with a DataReadLength= 120*10^6) is 38 Mbyte/s (PacketSize = BufferSize = 102400), but in fact this value is variable between 31-38 Mbyte/s (the mean value seems 33.5 Mbyte/s); so if you measure this range of values, the data reception can be considered as normal.

Note

The data throughput is variable in two ways:

  • depends on the used host computer;
  • varies with every function call (computer loading dependent).

DataRead Size Shall Not Be Too Large

...

Code Block
languagecpp
TE_USB_FX2_CYAPI int TE_USB_FX2_GetData(  CCyBulkEndPoint *BulkInEP, byte DataRead, long DataReadLength);

...