i2c waveform

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

i2c waveform

Jump to solution
1,499 Views
jeffgu
Contributor I

Hi there,

I meet a problem about the i2c waveform. As you can see in attached figure, it is quite strange that the voltage level stay in the middle of waveform, about 1.2 volt. Presently the final result of read/write is correct, but the waveform is really not the one we expected.  Do you have any idea how to modify it? (I'm using K60, and I have ever tried the "High drive select" bit in Reigster I2C0_C2 of K60, but the result wave form is same)

Current Platform: IAR

MCU: MK60DX256ZVMC10

I2C Frq: 150KHz

i2c_wave_part.jpg

Jeff

Labels (1)
Tags (2)
0 Kudos
1 Solution
919 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Jeff:

That is probably because Open-Drain is not enabled for the I2C pins you are using. This is configured with PORTx_PCRn[ODE] bit, depending on the port (A/B/C/D/E) and pin number (0-31).


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
920 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Jeff:

That is probably because Open-Drain is not enabled for the I2C pins you are using. This is configured with PORTx_PCRn[ODE] bit, depending on the port (A/B/C/D/E) and pin number (0-31).


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
919 Views
jeffgu
Contributor I

Jorge,

You exactly helped me solved the problem. After enabling port open-drain, the waveform level seems correct. See following figures, however, there is a curve when the pin is pull high, I'm sure there is no Capacities on both SCL and SDA. Do you know if I can improve it?opendrain_i2c.jpg

0 Kudos
919 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Jeff,

Good to know it helped :smileyhappy:

Regarding the curve:

1) K60 Internal pull resistors should be disabled (PORTx_PCRn[PE] = 0)

2) Check your external pull-up resistors or try with different values (~ 3.3K to 10K)

3) Finally confirm you are connecting ground of your scope.

Regards!

Jorge Gonzalez

0 Kudos