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

[复制链接]
 楼主| 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

粉丝
快速回复 在线客服 返回列表 返回顶部

32

主题

51

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部