i2c waveform

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,651件の閲覧回数
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

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,071件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
1,072件の閲覧回数
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 件の賞賛
返信
1,071件の閲覧回数
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 件の賞賛
返信
1,071件の閲覧回数
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 件の賞賛
返信