Follow the high-level UNICOMM configurations in Section 24.3 before executing the below I2CC-specific configurations.
- Clear the ENABLE bit in the CR register before making any of the below configuration changes.
- Set the desired SCL clock speed by writing the TPR bit in TPR register with the correct value. For example, with a 20MHz I2Cclk and 100kbps desired SCL clock, a TPR value of 19 (0x13) needs to be written to TPR. For more information about how to calculate the TPR value, refer to Clock Control.
- Configure the desired FIFO trigger levels in the IFLS register.
- Enable/Disable clock stretching in the CR register.
- Specify the target address, initial direction of transfer, and addressing mode (7-bit or 10-bit ) by writing the TA register.
- Enable desired interrupts and/or DMA event by using CPU_INT, DMA_TRIG_RX, DMA_TRIG_TX group IMASK registers.
- (Optionally) Configure the emulation mode for the peripheral in the PDBGCTL register.
- Enable the I2CC by setting the CR.ENABLE bit.
- Specify the initial length of transfer, acknowledgement settings, and START/STOP conditions through the CTR register. If operating in controller-transmitter mode, TXDATA can be written with data to be transmitted. Start a frame by writing to the FRM_START bit.