2021-07-26 07:38 AM
I'm confused about how to set AUTOEND and other I2C parameters to execute the selective read illustrated in the attached timing diagram. I need to write the address to read from in write mode, then output another START condition right away, then I can read the byte in memory in read mode.
But I'm not sure how to "end" the address write without setting AUTOEND=1 or explicitly setting the STOP bit, but I understand that will send a STOP condition, which I do not want. And it looks like I can't change the R/W mode to R without somehow stopping the address write.
Am I missing a key I2C parameter that I should be setting to enable this selective memory read?
Thanks!
-Brian
Solved! Go to Solution.
2021-07-26 08:05 AM
OK, I think I've got the answer. I needed to set AUTOEND=0 before writing the two address bytes, then after transmitting them I needed to wait for I2C_ISR.TC = 1, then set AUTOEND=1 and the R/W bit to read mode before reading the data byte.
2021-07-26 08:05 AM
OK, I think I've got the answer. I needed to set AUTOEND=0 before writing the two address bytes, then after transmitting them I needed to wait for I2C_ISR.TC = 1, then set AUTOEND=1 and the R/W bit to read mode before reading the data byte.