SLAU846A June 2023 – October 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1
Standard, Fast, and Fast Plus modes are selected using a value in the I2C Controller Timer Period (I2CMTPR) register that results in a maximum SCL frequency of:
The I2C frequency I2C_FREQ is determined by the I2C_CLK frequency and bitfields TPR , SCL_LP , and SCL_HP where:
The I2C frequency is calculated as follows:
For example, if the I2C functional clock frequency is 32 MHz and target SCL frequency is 400 kHz:
I2C_CLK = 32 MHz
I2C_FREQ = 400 kHz
SCL_LP = 6 , SCL_HP = 4
TPR = (I2C_CLK / (I2C_FREQ * (4 + 6))) - 1
TPR = 7 (0x07)
Functional Clock | TPR Bits Standard Mode 100-kHz SCL |
TPR Bits Fast Mode 400-kHz SCL |
TPR Bits Fast Mode Plus 1000-kHz SCL |
---|---|---|---|
4 MHz | 0x03 | - | - |
8 MHz | 0x07 | 0x01 | - |
20 MHz | 0x13 | 0x04 | 0x01 |
32 MHz | 0x1F | 0x07 | 0x02(1) |
40 MHz | 0x27 | 0x09 | 0x03 |
I2C functional clock must be greater than or equal to 20 times the SCL frequency, I2C_CLK ≥ 20 × I2C_FREQ.
The following minimum functional clock frequencies are required when running certain I2C clock speeds: