打印

STM32勘误表的I2C部分的理解与疑问3

[复制链接]
2474|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
zhmili|  楼主 | 2010-3-20 19:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
2.9.5 Data valid (有效)time (tVD;DAT) violated (破坏)without the OVR flag being set
Description
The data valid time (tVD;DAT, tVD;ACK) described by the I²C standard can be violated (as well
as the maximum data hold time of the current data (tHD;DAT)) under the conditions described
below. This violation cannot be detected because the OVR flag is not set (no transmit buffer
underrun is detected).
This issue can occur only under the following conditions:
in Slave transmit mode
with clock stretching disabled (NOSTRETCH=1)
if the software is late to write the DR data register, but not late enough to set the OVR
flag (the data register is written before)
Workaround
If the master device allows it, use the clock stretching mechanism by programming the bit
NOSTRETCH=0 in the I2C_CR1 register.
If the master device does not allow it, ensure that the software is fast enough when polling
the TXE or ADDR flag to immediately write to the DR data register. For instance, use an
interrupt on the TXE or ADDR flag and boost its priority to the higher level
摘自 STM32F101xC/D/E and STM32F103xC/D/E Errata sheet  Doc ID 14732 Rev 7

理解:如果OVR(从机没有足够时间读取主机发来的数据,该位 错误标志发生)没有发生,将破坏数据的有效性,解决办法是 如果工作机允许的话将NOSTRETCH位设置,不然就采用中断等方法加速数据的读取
沙发
mmuuss586| | 2014-4-20 20:23 | 只看该作者

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

32

主题

51

帖子

1

粉丝