I'm using the TWI ASF on a SAMG55 for I2C communications. Most stuff (including a couple SMBUS devices) is working fine, but I have one somewhat non-standard chip that I'm not sure how to accommodate.
During a read operation (Master writes command code, then reads result), the slave chip will NACK the slave address byte until the result is ready. The problem here is that the ASF is written to return a failure as soon as it sees the NACK. I'm also not sure how to manually detect this and re-send just the slave address byte. Inside twi_master_read(), the line p_twi->TWI_CR = TWI_CR_START; sets up the entire transfer, including writing the command byte. How can I configure it to simply resend the NACKed byte until it is ACKed (or times out)?
Attached image is the result of the p_twi->TWI_CR = TWI_CR_START; line using a chip address of 0x40 and a command byte of 0xF5