1 Reply Latest reply on Dec 30, 2018 3:49 AM by jusac_3935691

    how to send ACK or NACK from I2c master to slave

    jusac_3935691

      hi.

       

      Now I'm writing I2C master program referring to the following.

       

      FM_PDL_2.0.1/example/mfs/i2c/i2c_polling/i2c_master_polling/main.c

       

      To read some data from slave to master, the sample program is using I2c_Read().

      And this function is calling Mfs_I2c_ConfigAck() to send ACK or NACK to slave.

       

      But the description of Mfs_I2c_ConfigAck() says "Configure ACK signal sent to master", "This function is only meaningful when I2C is in slave mode". (mfs.c L.3527~)

       

      Can I use Mfs_I2c_ConfigAck() in master program?

       

       

      Why I ask this, my I2C master program (on FM0+ S6E1C) has stop in Mfs_I2c_GetStatus() loop (main.c L.272~) after reading first byte. So I doubt that NACK has not been transmitted properly.

       

      The 1 byte looks like correct, but can't read any more.

       

      thanks.