lpcware

Touch panel driver AR1021: I2C and SCL streching

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by giusloq on Wed Jun 24 08:35:07 MST 2015
I'd like to use AR1021 touch panel controller with LPC1788 in I2C mode.

I read in AR1021 datasheet that the clock can be stretched (keeped low) by the slave after each byte. The master (LPC MCU) should monitor the clock line after the nineth pulse and should wait until it goes high again, before continuing with the first clock pulse of the next byte.

I was studying LPC datasheet, but I couldn't understand if the "clock streching" as used by AR1021 is compatible with syncronization logic performed by LPC:

Quote:
The synchronization logic will synchronize the serial clock generator with the clock pulses on the SCL line from another device. If two or more master devices generate clock pulses, the “mark” duration is determined by the device that generates the shortest “marks,” and the “space” duration is determined by the device that generates the longest “spaces”. Figure 117 shows the synchronization procedure.
A slave may stretch the space duration to slow down the bus master. The space duration may also be stretched for handshaking purposes. This can be done after each bit or after a complete byte transfer. the I2C block will stretch the SCL space duration after a byte has been transmitted or received and the acknowledge bit has been transferred. The serial interrupt flag (SI) is set, and the stretching continues until the serial interrupt flag is cleared.



If the two mechanism are compatible, is this automatic?

Outcomes