I am trying to communicate cc3200 with at42qt2120 over I2C.
This chip requires a Nack and a stop condition after read to release it's change line. I am able to communicate with it ( I2C read and write), but i am not able to give Nack and stop bit.
How do i give Nack from cc3200 master receiver?
I have made on own regread function on lines i2c_demo example
int read2120(char addr){ I2CMasterSlaveAddrSet(I2C_BASE, SLAVE_ADDRESS, false); I2CMasterDataPut(I2C_BASE,addr ); Wire.I2CTransact(I2C_MASTER_CMD_SINGLE_SEND ); I2CMasterSlaveAddrSet(I2C_BASE, SLAVE_ADDRESS, true); Wire.I2CTransact(I2C_MASTER_CMD_SINGLE_RECEIVE ); char recvd = I2CMasterDataGet(I2C_BASE); return recvd; }
I am able to read value from register with address "addr", but the slave is not receiving a Nack n stop condition as a result its change line is always low.