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.

I2C例程的问题



I2C例程中使用了两个中断,一个是SCD中断,另外一个是ARDY中断。SCD中断我看得明白一些,但是ARDY中断就不太清楚是什么意思了。

// Interrupt source = Register Access Ready
// This interrupt is used to determine when the EEPROM address setup portion of the
// read data communication is complete. Since no stop bit is commanded, this flag
// tells us when the message has been sent instead of the SCD flag. If a NACK is
// received, clear the NACK bit and command a stop. Otherwise, move on to the read
// data portion of the communication.
else if(IntSource == I2C_ARDY_ISRC)
{
if(I2caRegs.I2CSTR.bit.NACK == 1)
{
I2caRegs.I2CMDR.bit.STP = 1;
I2caRegs.I2CSTR.all = I2C_CLR_NACK_BIT;
}
else if(CurrentMsgPtr->MsgStatus == I2C_MSGSTAT_SEND_NOSTOP_BUSY)
{
CurrentMsgPtr->MsgStatus = I2C_MSGSTAT_RESTART;
}
} // end of register access ready

else
{
// Generate some error due to invalid interrupt source
asm(" ESTOP0");
}

这里存储器访问就绪的意思是指什么呢?根据注释所说的,是没有停止位的情况下,用NACK位来判断并停止,这个也不太明白,停止位不是有的么?