ST意法半导体
直播中

杨艳

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

STM8发现错误的I2C格式

STM8发现错误的I2C格式

以上来自于谷歌翻译


以下为原文



STM8 Discovery wrong I2C format

回帖(1)

杨艳

2019-3-20 11:14:16
技术支持建议我使用EEROM示例,因此我使用了EEPROM示例中的“I2C_EE_PageWrite”函数,只是将类型从u16更改为u8,并删除了行// // I2C_SendData((u8)(WriteAddr> > 8)); / * MSB * / - 这样我就不会用每个子地址向TDA芯片发送零字节。
 
它工作得很完美,但我仍然不确定为什么因为它们都从I2C.c调用I2CSendData函数
 
杰夫

以上来自于谷歌翻译


以下为原文






Tech support suggested that I use the EEROM example so I used the “I2C_EE_PageWrite� function from the EEPROM example and just changed the type from u16 to u8 and removed the line “//I2C_SendData((u8)(WriteAddr >> 8)); /* MSB */� so that I wouldn’t send a zero byte to the TDA chip with each sub address.

It works perfect, but I’m still not sure why since they both call the I2CSendData function from I2C.c

Jeff
举报

更多回帖

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