3 Replies Latest reply on Jul 19, 2020 11:10 PM by HemanthR_06

    FX3 not releasing i2C bus after send device read address to FPGA

    user_4067446

      Hi

       

      We are working on a solution that involves i2C communication between the XC7A35T-1FTG256C and FX3 DK and are experiencing problems reading data from the FPGA register.

       

      The issue is that the FX3 does not release the Bus after sending the device address followed by a read bit to the FPGA.

       

      The register we are reading from is 0x40 and has one byte of data. The i2C read code is as follows:

       

      CyU3PReturnStatus_t Status;

      CyU3PI2cPreamble_t preamble;

      preamble.length    = 3;

      preamble.buffer[0] = 0xA2; // i2C write address

      preamble.buffer[1] = 0x04;

      preamble.buffer[2] = 0xA3; // i2C read address

      preamble.ctrlMask  = 0x0002;

       

       

      uint8_t buffer[] = {0};

       

       

      Status = CyU3PI2cReceiveBytes(&preamble, (uint8_t *)&buffer, 1, 0);

      CheckStatus("I2C_Write", Status);

       

       

      I have attached an image of the results we get from the signal analyzer.

       

      How do we implement the i2C read transaction in such a way that it releases the bus after sending the read address to the FPGA?

       

      Thanks