General Category > General Discussion

FT_SetEventNotification - Thread block

(1/1)

ol_devel:
My post relates to my use of the FTDI FT2XXX USB-Serial parts. I have used these in numerous designs, the latest of which requires communication with a Windows application (Qt - C++). Low latency is critical (2ms), and although I believe a timer-based polling mechanism can be used, I'd prefer to use an asynchronous mechanism if at all possible.

In paragraph 3.28 (FT_SetEventNotification) of version 1.4 of the D2XX Programmers Guide, the following is offered.

"An application can use this function to setup conditions which allow a thread to block until one of the conditions is met. Typically, an application will create an event, call this function, then block on the event. When the conditions are met, the event is set, and the application thread unblocked."

This leads to my question. Does this mean that I would require a thread dedicated to the receipt of data, and thus handle data transmission on a separate thread?

Your shedding more light on this will be greatly appreciated.

FTDI Community:
Hello,

There are software examples provided in the D2XX Programmer's Guide for FT_SetEventNotification.

Have you also reduced the latency timer?
Note that the minimum latency timer for full speed USB devices is 2ms, and for High Speed USB devices is 1ms.
The default latency timer is 16ms.
The easiest method to use would be through the D2XX Drivers using:
FT_SetLatencyTimer
The application code would need to set this each time it’s executed.

Best Regards,
FTDI Community

ol_devel:
Thank you for your reply.

Navigation

[0] Message Index

Go to full version