Middle state on I2C

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Middle state on I2C

跳至解决方案
741 次查看
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 解答
510 次查看
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 回复数
511 次查看
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 项奖励
回复
510 次查看
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 项奖励
回复