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.

LMP91002: 状态位读取不正常,一直卡在读寄存器的中断里

Part Number: LMP91002
Other Parts Discussed in Thread: LMP91000

参考官方给出的例程,对LMP91002初始化,但是总是会卡在设备状态是否准备正常那一句

while (status == TI_LMP91000_NOT_READY)     // wait while device is not ready
    status = LMP91000_I2CReadReg(TI_LMP91000_STATUS_REG);    // Read device ready status

经过单步调试发现,实际上是会卡在TI_MSP430_i2c_USCIB0_5xx.c文件中的__interrupt void USCI_B0_ISR(void)中断服务函数里的这一句

case 10: // Vector 12: TXIFG
I2CBuffer = UCB0RXBUF; // store received data in buffer
__bic_SR_register_on_exit(LPM0_bits); // Exit LPM0
break; ,

通过使用万用表测量LMP91002芯片的引脚处供电是正常的,I2c处也加了上拉电阻,实在想不明白是怎么回事

我的全部代码工程文件在附件中,这个问题困扰了很长时间,非常希望得到工程师的解答!

MSP430_Project.zip