The direction of data flow on SDA can
be changed by the controller, without first stopping a transfer, by issuing a
repeated START condition. This is called a RESTART. After a RESTART is issued, the
Target address is again sent out with the new data direction specified by the R/W
bit.
A repeated start sequence for a Controller transmit is as follows:
- When the device is in the idle state, the Controller writes the Target address
to the CSA register and configures the DIR bit for the desired transfer type.
- Data is written to the TXDATA register.
- When the BUSY bit in the CSR register is 0, the BURSTRUN and START bit in the
CCTR register need to be set to initiate a transfer.
- STOP bit needs to be 0
- Wait until the BUSY bit in the CSR register gets 0.
- The Controller does not generate a STOP condition but instead writes another
Target address to the CSA register and then sets the BURSTRUN and START bit
again with a write operation to initiate the repeated START.
A repeated start sequence for a Controller receive is similar:
- When the device is in idle, the Controller writes the Target address to the CSA
register and configures the DIR bit for the desired transfer type.
- When the BUSY bit in the CSR register is 0, the BURSTRUN and START bit in the
CCTR register need to be set to initiate a transfer.
- STOP bit needs to be 0
- The Controller reads data from the RXDATA register.
- Wait until the BUSY bit in the CSR register gets 0.
- The Controller does not generate a STOP condition but instead writes another
Target address to the CSA register and then sets the BURSTRUN and START bit
again with a write operation to initiate the repeated START.