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: FT260 and LibFT260, using Interrupts  (Read 18824 times)

wberger

  • Newbie
  • *
  • Posts: 1
    • View Profile
FT260 and LibFT260, using Interrupts
« on: November 12, 2019, 02:30:00 PM »

I am using FT260 in combination with libFT260 which works nicely for i2c interfacing and GPIO.
But now I'd like to use Interrupt Pin and UART Ring indicator. I am struggeling with the libFT260 functions and there is no sample code.

Did anybody succeed in using this through libFT260 ? I don't wanna go away from the lib and instead use the endpoints in windows.
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 896
    • View Profile
Re: FT260 and LibFT260, using Interrupts
« Reply #1 on: November 13, 2019, 11:02:07 AM »

Hello,

Thanks for your post.

I believe that you have also contacted email support where we will continue to deal with your issue and post any resolution here.

Regards,
FTDI Community
Logged

ffred

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: FT260 and LibFT260, using Interrupts
« Reply #2 on: April 12, 2023, 10:29:05 AM »

hello,
it would be nice to also have replies on the forum here. it would allow to have a source of information for the missing points in the documentation...

I'm also looking for info about the interrupt possibility with the FT260 and the Windows DLL.
actually it's not clear what we can do with the interrupt and how to use it.
in AN395 there's two function in the "FT260 general functions": FT260_SetWakeupInterrupt & FT260_SetInterruptTriggerType.
but there's also two functions in the "UART functions": FT260_GetInterruptFlag & FT260_CleanInterruptFlag.
if I only activate the I2C interface but not the UART, can I still use the two functions get & clean interruptFlag, since those two don't have "UART" in their name unlike the other functions in the UART section ?
does the SetWakeupInterrupt & SetInterruptTriggerType functions are related to the functions GetInterruptFlag & CleanInterruptFlag ? is it the "same" interrupt ?
can I use those functions to receive interrupts from I2C ICs (like when an input change on a I/O expander) or are those functions dedicated to USB transactions ?

thanks..
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 896
    • View Profile
Re: FT260 and LibFT260, using Interrupts
« Reply #3 on: April 13, 2023, 02:59:16 PM »

Hello,

The FT260 supports two I2C modes:
  • USB to HID-over-I2C Bridge
  • USB to I2C master controller
In HID-over-I²C mode, the FT260 needs to configure a interrupt to communicate the attached device.

In USB-HID to I²C mode, the interrupt pin is spare and cannot be used.

It can't be used in UART mode either.

Best Regards,
FTDI Community
Logged

ffred

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: FT260 and LibFT260, using Interrupts
« Reply #4 on: April 14, 2023, 12:23:36 PM »

Hello,
thanks for replying but it's still less clear for me..
the LibFT260 DLL is not made for "USB to HID-over-I2C Bridge" but for "USB to I2C (and/or UART) master controller". so why is there 4 interrupt functions in this DLL if the interrupt can't be used ?? how to use those functions ?

what I understand when reading AN395 is that it probably can't be used as a "real" interrupt but it could be used to see (by reading the interrupt flag > function "FT260_GetInterruptFlag") if an interrupt condition as been encountered.
I will try it later like that (can't set a test board right now), but since it's not really clear in the doc that's why I asked here before.. and what made it less clear, is that the two functions to read/reset the flag are in the UART part of the documentation..
« Last Edit: April 14, 2023, 03:13:32 PM by ffred »
Logged

ffred

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: FT260 and LibFT260, using Interrupts
« Reply #5 on: March 01, 2024, 07:32:04 AM »

Hi,
just to report informations about some tests I did (after a long pause on my FT260 project..) on a small dev board. I put a UMFT260EV1A on it, with a MCP23008 I/O expander connected to 4 buttons and 4 Leds and I connected the MCP23008 INT pin to GPIO3 (INTRIN/WAKEUP) of the FT260.

I had to activate the two HID ports, for I2C & UART, because with only the I2C it wasn't working.. (so the DLL is really using the UART to read the interrupt flag)

so, from LibFT260, I used FT260_UART_Init, FT260_SetInterruptTriggerType, FT260_SetWakeUpInterrupt , then FT260_I2CMaster_Init.
after that I send the config to the MCP23008 to activate the interrupt in open drain mode when I push a button.
and then I could use F260_CleanInterruptFlag to see if an interrupt occured and set a Led ON. and it worked !  ;D

so the Interrupt flag can be used.
Logged