I2C baudrate issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C baudrate issue

332 Views
Punit_01
Contributor II

Hello Team,

I am trying to configure the I2C module in Master mode in S32 Design studio for S32K144 uC.

I want the speed to be 400kbps using the LPI2C0 module.

Upon generating the driver code & initializing, I see that the communication happens but at a slightly lower speed. The probe on the SCL line shows a clock of ~386kbps.The clock source for I2C is CLK_SRC_SIRC_DIV2 & the CPU clock is 48MHz with a external crystal oscillator.

Need your support to identify where I would be going wrong. 

 

0 Kudos
1 Reply

318 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Punit_01

This can be explained.

For details, you can refer to S32K-RM Chapter: 52.3.2.4 Timing Parameters
The SCL clock is not only determined by the module clock, but also affected by other parameters, including SCL_LATENCY,

The latency parameters are defined in the following table, these parameters assume the
risetime is less than one LPI2C functional clock cycle. The risetime depends on a number
of factors, including the I/O propagation delay, the I2C bus loading and the external pullup
resistor sizing. A larger risetime will increase the number of cycles that the signal
takes to propagate through the synchronizer (and glitch filter), which increases the
latency.

In summary, the difference in the electrical characteristics of the external circuit will also affect the SCK.

0 Kudos