SLAU846B June 2023 – November 2024 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G1519 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3519
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 bit fields TPR , SCL_LP , and SCL_HP where:
The I2C frequency is calculated as follows:
For example, if the I2C functional clock frequency is 32MHz and target SCL frequency is 400kHz:
I2C_CLK = 32MHz
I2C_FREQ = 400kHz
SCL_LP = 6 , SCL_HP = 4
TPR = (I2C_CLK / (I2C_FREQ * (4 + 6))) - 1
TPR = 7 (0x07)
Functional Clock | TPR Bits Standard Mode 100kHz SCL |
TPR Bits Fast Mode 400kHz SCL |
TPR Bits Fast Mode Plus 1000kHz SCL |
---|---|---|---|
4MHz | 0x03 | - | - |
8MHz | 0x07 | 0x01 | - |
20MHz | 0x13 | 0x04 | 0x01 |
32MHz | 0x1F | 0x07 | 0x02(1) |
40MHz | 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: