FTDI Community

General Category => Discussion - Software => Topic started by: a4711 on September 20, 2022, 07:19:13 PM

Title: How to properly use FT4222_ChipReset()?
Post by: a4711 on September 20, 2022, 07:19:13 PM
After about 60-90 minutes heavy I2C traffic I run into the situation that the FT4222 holds the SCL line (yes the clock line, not SDA) low and FT4222_I2CMaster_GetStatus() keeps reporting 0x4e as status flags (error condition, bus busy, slave address not acknowledged, data not acknowledged). Further read/write transactions always fail. It's indeed the FT4222 that keeps pulling the SCL line low, because the SCL line remains low even when disconnecting the slave but keeping the pull-ups connected.

Though closing and reopening the FT_Handle does make it work again, the GPIO interrupt timing is not as expected. Only disconnecting/reconnecting the USB cable resets the original behavior.

As a workaround I would like to perform FT4222_ChipReset() right after opening the driver handle, but the function is not working as expected and it's also unclear what the function exactly does. I call FT4222_ChipReset() after FT_open() as shown in the application note. Calling FT4222_I2CMaster_Init() right after that returns FT4222_DEVICE_NOT_SUPPORTED.

I would like to have an advice how to properly use FT4222_ChipReset(), especially what to do after the function call. Is some delay needed? Do I need to close and re-open the driver instance? The example in the application note is not sufficient and indicates that I can just call this function after FT_Open() and before other things.

Thanks.
Title: Re: How to properly use FT4222_ChipReset()?
Post by: FTDI Community on September 22, 2022, 10:44:31 AM
Hello,

If you call FT4222_ChipReset / FT4222_Close, you need to restart all chip configuration process from the beginning.

Best Regards

FTDI Community