The I2C master module has the capability of executing a repeated START (transmit or receive) after an initial transfer has occurred.
A repeated start sequence for a master transmit is as follows:
- When the device is in the IDLE state, the master writes the slave address to the I2CMSA register and configures the R/S bit for the desired transfer type.
- Data are written to the I2CMDR register.
- When the BUSY bit in the I2CMCS register is 0, the master writes 0x3 to the I2CMCS register to initiate a transfer.
- The master does not generate a STOP condition, but instead writes another slave address to the I2CMSA register, then writes 0x3 to initiate the repeated START.
A repeated start sequence for a master receive is similar:
- When the device is in IDLE state, the master writes the slave address to the I2CMSA register and configures the R/S bit for the desired transfer type.
- The master reads data from the I2CMDR register.
- When the BUSY bit in the I2CMCS register is 0, the master writes 0x3 to the I2CMCS register to initiate a transfer.
- The master does not generate a STOP condition, but instead writes another slave address to the I2CMSA register, then writes 0x3 to initiate the repeated START.