Info |
---|
All these API functions have some parameters to set: Timeout, BufferSize and others. |
...
The third set of API is a single API function: TE_USB_FX2_SendCommand(). This function is able to send the API commands to the EZ-USB FX2 microcontroller endpoint EP1 and receive the response binary code using endpoint EP1.
Using API command, TE_USB_FX2_SendCommand() is able to communicate with:
The connection with EP1 command is used to:
Scroll Title | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
|
All these functions use a synchronous version for the data transfer (Cypress XferData() function). They perform synchronous (i.e. blocking) I/O operations and do not return until the transaction completes or the endpoint TimeOut has elapsed. A synchronous operation (aka blocking operation) is an operation that owns (in an exclusive way) resources and CPU until its job is done. A synchronous function monopolizes resources until its end, even during idle time.
...
The API uses the synchronous version because it is more suitable to be included in a DLL and it is already fast. With synchronous version, the API functions are simpler to use.
BufferSize is the size of the buffer used in data/command transmission/reception of a single endpoint; the total buffer size is the sum of BufferSize of every endpoint used.
...
See Data Transfer Throughput Optimization for some insights into this kind of influence.
PacketSize is the size of packets used in data/command transmission/reception of a single endpoint.
...
Timeout is the time that is allowed to the function for sending/receiving the data packet passed to the function; this timeout shall be large enough to allow the data/command transmission/reception. Otherwise the transmission/reception will fail.
...
These values have been verified for a Core i7 processor at 2.20 GHz with Microsoft Windows 7. Other configuration may require others value. An AMD Athlon II at 1.30 GHz with Microsoft Windows 7 might require much (e.g. two or three times) larger values. If your host computer is not highly responsive, you should set TimeOut to even larger values : e.g 20, 50, 200, 1000 ms (the less responsive the host computer is, the higher the recommended values shall be).