This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我尝试用查询方式(不用中断方式)来使用28027 I2C功能读写EEPROM AT24C04。
第一步:初始化
延时十几ms后,启动写2个字节:
之后每隔1ms检查一次:
if(I2caRegs.I2CFFTX.bit.TXFFINT==1) { I2caRegs.I2CFFTX.bit.TXFFINTCLR=1; /* ...*/ }
这时I2CMDR的值变成了0x4220,I2CFFTX的值变成了0x6083。
问题一:为什么I2CMDR的值变成了0x4220?bit10是MST原来是1现在变成了0,竟然从Master mode变成了Slave mode?
问题二:为什么TXFFINTCLR=1清除中断标志不起作用?(0x6083中的那个8清不掉)
问题三:到底这次数据发送完了没有?