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

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - bryantsorensen

Pages: [1]
1
I'm using LibMPSSE_1.0.3 and encountered a problem doing multi-byte reads using I2C_DeviceRead on an FT2232H (FTDI-Click board).  The FT2232H reads the first byte (from an EEPROM) correctly, but shows a NACK.  This causes the following bytes to be read as 0xFF, 0xFF, etc. which also have NACKs.

I'm using the command:

      FtStatus = I2C_DeviceRead(FtHandle, SlaveAddress, sizeof(ReadData), ReadData, &SizeXferred,
                     I2C_TRANSFER_OPTIONS_START_BIT |        // Give repeated start after address write
                     I2C_TRANSFER_OPTIONS_STOP_BIT |
                                I2C_TRANSFER_OPTIONS_FAST_TRANSFER_BYTES );

I also tried:

      FtStatus = I2C_DeviceRead(FtHandle, SlaveAddress, sizeof(ReadData), ReadData, &SizeXferred,
                     I2C_TRANSFER_OPTIONS_START_BIT |        // Give repeated start
                     I2C_TRANSFER_OPTIONS_STOP_BIT |
                     I2C_TRANSFER_OPTIONS_NACK_LAST_BYTE);

This also reads the data back as <correct 1st byte>, 0xFF, 0xFF...

This appears to be related to an older post: http://www.ftdicommunity.com/index.php?topic=241.msg741#msg741

Given the age of the previous post, and that it refers to lib SW which I can no longer find (for example, the poster refers to changing an "if 1" statement to an "if 0" statement on line 1400 of ftdi_i2c.c - and there's no statement anything like that in the latest ftdi_i2c.c), I'm wondering the following:

  • Did this bug get fixed going from previous version (0.6?) to 1.0.3?
  • If not fixed, is anyone acquainted with this problem and have a solution?
  • If fixed, what settings in the function call will properly read multiple bytes?

Thanks,
Bryant (just getting started with FTDI devices, appreciate the help)

Pages: [1]