14.4.1 Control Register

The following table describes the Control register used for configuring the I2C peripherals.

Table 14-5. Control Register (CTRL)
Bit NumberNameR/WReset ValueDescription
7CR2R/W0Clock rate bit 2; refer to bit 0.
6ENS1R/W0Enable bit. When ENS1 = 0, the SDA and SCL outputs are in a high-impedance and SDA and SCL input signals are ignored. When ENS1 = 1, the I2C is enabled.
5STAR/W0The Start flag. When STA = 1, the I2C peripheral checks the status of the serial bus and generates a START condition, if the bus is free. STA bit is automatically cleared after START condition has been generated.
4STOR/W0The Stop flag. When STO = 1 and the I2C is in Master mode, a STOP condition is transmitted to the serial bus. STO bit is automatically cleared after STOP condition has been generated.
3SIR/W0The SI flag. The SI flag is set by the I2C whenever there is a serviceable change in the Status register. Once the register is updated, the SI bit must be cleared by software.

The SI bit is directly readable through the APB INTERRUPT signal.

2AAR/W0The assert acknowledge flag.

When AA = 1, an acknowledge is returned when:

  • The own slave address is received
  • The general call address is received when the GC bit in the address register is set
  • A data byte is received when the core is in the Master-receiver mode
  • A data byte is received when the core is in the Slave-receiver mode.

When AA = 0, a not acknowledge is returned when:

  • A data byte is received while the core is in Master-receiver mode
  • A data byte is received when I2C peripheral is in Slave-receiver mode
1CR1R/W0Serial clock rate bit 1; refer to bit 0
0CR0R/W0Serial clock rate bit 0. Clock rate is defined in Table 14-6.

BCLK is synchronized to PCLK and hence must be PCLKFREQ/2 or less.

Table 14-6. Clock Rate (CR)
CR2CR1CR0SCL Frequency
000PCLK frequency/256
001PCLK frequency/224
010PCLK frequency/192
011PCLK frequency/160
100PCLK frequency/960
101PCLK frequency/120
110PCLK frequency/60
111BCLK frequency/8