Microchip
直播中

张慧

7年用户 213经验值
私信 关注
[问答]

I2C从器件不等待ACK

嗨,我正在用一个PIC32 MZ2048 EFM100进行I2C从机处理,我注意到在主读操作期间的一些错误。我发现,当问题发生时,从中断发生在第八个SCL时钟(TBF为空)之后,而不是第九个时钟。来自主机的EACK是发送(第0 SCL时钟上的‘0’),但是来自从属的TAKSTAT已经设置为1。在TBF是空的还是应该等待第九SCL时钟之后,从属者立即产生中断是正常的吗?是否存在作为TrSTAT的寄存器等待传输结束,但为奴隶工作?谢谢你的帮助

以上来自于百度翻译


      以下为原文

    Hi,

I'm working on a PIC32MZ2048EFM100 with i2c slave processing and I notice some errors during the master read operation.
I figured out that when the problem occurs, the Slave interrupt comes just after the eighth SCL clock (when TBF is empty) instead of the ninth one.
I can see on the scope that the ACK from the master is send ('0' on the ninth SCL clock) but the ACKSTAT from the slave is already set to 1.

Is it normal for the slave to generate interrupt immediatly after that the TBF is empty or should it wait for the ninth SCl clock ?
Does it exist a register as TRSTAT to wait for the end of transmission but working for the slave ?

Thx for your help

回帖(2)

吴键洪

2018-11-19 10:25:09
你有DIN位组吗?它只会影响从属写,而不是读,但是试着清除它。

以上来自于百度翻译


      以下为原文

    Do you have the DHEN bit set?
It's only meant to affect slave writes, not reads, but try clearing it.
 
举报

孙巍

2018-11-19 10:33:46
没有设置DHEN。如果我试图设置它,SDA总线被完全阻塞。

以上来自于百度翻译


      以下为原文

    The DHEN is not set. If I try to set it the SDA bus is completly blocked.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分