FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: FT_SetEventNotification - Thread block  (Read 3615 times)

ol_devel

  • Newbie
  • *
  • Posts: 1
    • View Profile
FT_SetEventNotification - Thread block
« on: July 24, 2020, 08:03:16 AM »

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.
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 484
    • View Profile
Re: FT_SetEventNotification - Thread block
« Reply #1 on: July 24, 2020, 04:40:33 PM »

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
Logged