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: LibMPSSE I2C Library ACK Issue  (Read 8191 times)

BigApple

  • Newbie
  • *
  • Posts: 6
    • View Profile
LibMPSSE I2C Library ACK Issue
« on: January 08, 2024, 08:18:38 PM »

I downloaded the DLL libraries, examples, and source code from the following link
https://ftdichip.com/software-examples/mpsse-projects/libmpsse-i2c-examples/

After running the code I noticed that the library is having an issue reading the ACK bit.

In the attached scope capture, the slave successfully acknowledges the 9th bit.  However, the FTDI device does not see it.

In LibMPSSE-I2C, I noticed there's a function called: static FT_STATUS I2C_Write8bitsAndGetAck(FT_HANDLE handle, uint8 data, bool *ack)

The function appears to call

Code: [Select]
status = FT_Channel_Write(I2C, handle, noOfBytes, buffer, &noOfBytesTransferred);
which writes a byte a data along with the 9th clock for the acknowledge bit.

For some reason, the code then calls this
Code: [Select]
{/*Get ack*/
noOfBytes = 1;
noOfBytesTransferred = 0;
INFRA_SLEEP(1);
status = FT_Channel_Read(I2C, handle, noOfBytes, inBuffer,
&noOfBytesTransferred);

I'm confused about the
Code: [Select]
/*Get Ack*/ code.  Exactly where does the I2C library read the ACK bit?

From what I can tell the library reads the acknowledge bit AFTER the 9th clock.  Is this correct?

Based on my understanding of I2C, this is the wrong time to read the acknowledge bit.



Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 884
    • View Profile
Re: LibMPSSE I2C Library ACK Issue
« Reply #1 on: January 09, 2024, 01:36:13 PM »

Hi,

This is a known issue, and there is a fix. if you send an email to support1@ftdichip.com, we can send you a fixed version.

Best Regards
FTDI Community
Logged

BigApple

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: LibMPSSE I2C Library ACK Issue
« Reply #2 on: January 09, 2024, 04:52:01 PM »

Sounds good thank you!
Logged