repost from Kinetis section: Kinetis 60n512 + MQX + I2C Slave

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

repost from Kinetis section: Kinetis 60n512 + MQX + I2C Slave

跳至解决方案
579 次查看
eichest
Contributor I

Hello,

 

I already posted this problem in the Kinetis section, Kojto advised me to repost it in this section (http://forums.freescale.com/t5/Kinetis-ARM-Cortex-M4/Kinetis-60n512-MQX-I2C-Slave/td-p/96095).

 

I have some problems with the I2C Slave driver on the Kinetis 60n512 with MQX.

 

The main Problem is that I have to detect a repeated START or a STOP signal. This is necessary because I don't know the exact size of a package when the master begins to write the data. Is there a possibility to read out somehow when the master finished with writing? In the datasheet I didn't find a flag which would signaling this event.

 

I think the Kinetis controller doesn't provide a way to detect the end of a message or am I wrong? So we normally have to know the size of a transmission (even as slave).

 

Regards,

Stefan

0 项奖励
1 解答
322 次查看
PetrM
Senior Contributor I

Hello,

 

yes, that's the problem. There is no indication of those important bus events.

I2C driver in MQX 3.8 does this using polling of the bus state.

Please check I2C_slave example to see how to use the driver to transfer unknown size of packets.

 

Regards,

PetrM

在原帖中查看解决方案

0 项奖励
1 回复
323 次查看
PetrM
Senior Contributor I

Hello,

 

yes, that's the problem. There is no indication of those important bus events.

I2C driver in MQX 3.8 does this using polling of the bus state.

Please check I2C_slave example to see how to use the driver to transfer unknown size of packets.

 

Regards,

PetrM

0 项奖励