本帖最后由 zhmili 于 2010-3-20 19:27 编辑
2.9 I2C peripheral
2.9.1 Some software events must be managed before the current byte is
being transferred
Description
When the EV7, EV7_1, EV6_1, EV2, EV8, and EV3 events are not managed before the
current byte is being transferred, problems may be encountered such as receiving an extra
byte, reading the same data twice or missing data.
Workarounds
When it is not possible to manage the EV7, EV7_1, EV6_1, EV2, EV8, and EV3 events
before the current byte transfer and before the acknowledge pulse when changing the ACK
control bit, it is recommended to:
1.use the I2C with DMA in general, except when the Master is receiving a single byte
2. use I2C interrupts and boost their priorities to the highest one in the application to make
them uninterruptible
摘自 STM32F101xC/D/E and STM32F103xC/D/E Errata sheet Doc ID 14732 Rev 7
基本理解:
在当前位被传送前,一些软件事件标志位( EV7, EV7_1, EV6_1, EV2, EV8, and EV3)必须处理(该设置高的要设置高,该设置低的要设置低),如果没能处理就用以下办法处理:
1、除了 主机仅接收一个字节外,都用DMA 方式传输
2、用I2C的中断,将其设定到最高优先级,是他们不可中断
疑问1:except when the Master is receiving a single byte 是主机仅接收一个字节外的意思么
疑问2:make
them uninterruptible 是什么意思 |