Middle state on I2C

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
739件の閲覧回数
gaelsieber
Contributor I

Hi,

In first, I apologize for my english, i'm not very good :smileyhappy:

I work on a K10 and i would like use I2C to communicate with an RTC (rv-3029)

When i write on the bus, it's works perfectly. But, when the RTC send à ACK or a Data, it result an middle state (like the pictures)

it's seems good, except this half state

I2C.jpg

I try to configure the Open drain on the port, but the flag busy is always set after that.

PORTB_PCR0 = 0|(PORT_PCR_MUX(0x2));

PORTB_PCR1 = 0|PORT_PCR_DSE_MASK|(PORT_PCR_MUX(0x2));


Thx for reply


0 件の賞賛
返信
1 解決策
508件の閲覧回数
dieterteuchert
Contributor IV

Since the I2C SDA is a digital pin function, you need to make it open drain using the ODE bit in the pin configuration register. I wrote a note two weeks ago, please look for "Kinetis I2C ODE".

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
509件の閲覧回数
dieterteuchert
Contributor IV

Since the I2C SDA is a digital pin function, you need to make it open drain using the ODE bit in the pin configuration register. I wrote a note two weeks ago, please look for "Kinetis I2C ODE".

0 件の賞賛
返信
508件の閲覧回数
gaelsieber
Contributor I

Thanks for reply

i've read your note and i succeed to correct my code, I had a problem with the pin configuration AND with my i2c sequence but it's corrected now.


0 件の賞賛
返信