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.

MSP430FR2353 IIC硬件从机 IIC硬件主机读数据问题

//从机设置如下

case USCI_I2C_UCTXIFG0:

UCB0TXBUF = j;
j++;

break; // Vector 26: TXIFG0

从机中不停的加一

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

主机配置如下

// Configure USCI_B0 for I2C mode
UCB0CTLW0 |= UCSWRST; // Software reset enabled
UCB0CTLW0 |= UCMODE_3 | UCMST | UCSYNC; // I2C mode, Master mode, sync
UCB0CTLW1 |= UCASTP_2; // Automatic stop generated
// after UCB0TBCNT is reached
UCB0BRW = 0x0008; // baudrate = SMCLK / 8
UCB0TBCNT = 0x0005; // number of bytes to be received     每次接收的字节的个数?????????????????????????????
UCB0I2CSA = 0x0048; // Slave address
UCB0CTL1 &= ~UCSWRST;
UCB0IE |= UCRXIE | UCNACKIE | UCBCNTIE;

我问题是 我每次读一次开始读连续的5个字节没有问题,硬件主机在不停的读到的数据是 1 2 3 4 5 7 8 9 10 11 13 14 15 16 17 每五个字节就会出现丢一个字节,我想的是从机中肯定哪里进入两次我的发送中断了,不知道有没有办法避免下