45.6.3.4 Host Transmitter Mode
This operating mode is not available if High-speed mode is selected.
After the host initiates a START condition when writing into the Transmit Holding register (TWIHS_THR), it sends a 7-bit client address, configured in the Host Mode register (DADR in TWIHS_MMR), to notify the client device. The bit following the client address indicates the transfer direction, 0 in this case (MREAD = 0 in TWIHS_MMR).
The TWIHS transfers require the client to acknowledge each received byte. During the acknowledge clock pulse (9th pulse), the host releases the data line (HIGH), enabling the client to pull it down in order to generate the acknowledge. If the client does not acknowledge the byte, then the Not Acknowledge flag (NACK) is set in the TWIHS Status Register (TWIHS_SR) of the host and a STOP condition is sent. The NACK flag must be cleared by reading TWIHS_SR before the next write into TWIHS_THR. As with the other status bits, an interrupt can be generated if enabled in the Interrupt Enable register (TWIHS_IER). If the client acknowledges the byte, the data written in the TWIHS_THR is then shifted in the internal shifter and transferred. When an acknowledge is detected, the TXRDY bit is set until a new write in the TWIHS_THR.
TXRDY is used as Transmit Ready for the DMA transmit channel.
While no new data is written in the TWIHS_THR, the serial clock line is tied low. When new data is written in the TWIHS_THR, the SCL is released and the data is sent. Setting the STOP bit in TWIHS_CR generates a STOP condition.
After a host write transfer, the serial clock line is stretched (tied low) as long as no new data is written in the TWIHS_THR or until a STOP command is performed.
To clear the TXRDY flag, first set the bit TWIHS_CR.MSDIS, then set the bit TWIHS_CR.MSEN.
See the figures below.