...
Given a PacketSize of 102,400 bytes (it can be subdivided into 200 USB packets of 512 bytes), the influence of XferSize (driver buffer size reserved for data communication) on the throughput is reported in the following table.
XferSize (bytes) | Throughput (Mbyte/s) |
---|---|
PacketSize = 102,400 bytes | |
4,096 (Cypress Default) | 15.6 |
8,192 | 20.4 |
16,384 | 26.3 |
32,768 | 30.2 |
65,536 | 34.1 |
131,072 | 36.2 |
262,144 | 36.7 |
Table 37: data throughput as a function of XferSize given PacketSize = 102,400 bytes.
To change XferSize in C++, the method
BulkEndPoint->SetXferSize(DesiredValue);
shall be used. Cypress sets DesiredValue to 4,096 bytes by default. This default value is not documented in the CyAPI.lib manual (pag 62 of CyAPI.pdf), but it has been retrieved by using the following C++ instructions:
int XferSizeReadValue = BulkEndPoint->GetXferSize();
cout<<
co
ut<< "XferSizeReadValue" << XferSizeReadValue <<endl;Chart 1: data
Scroll Title | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
. |
Chart 2: data throughput [Mbyte/s] as a function of PacketSize [byte] given XferSize = 102,400 bytes
...