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.

[参考译文] MSP430F5529:通过 I2C 与 LMP91002进行的通信始终停留在_interrupt void USCI_B0_ISR (void)中断中

Guru**** 1143600 points
Other Parts Discussed in Thread: LMP91002
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1055041/msp430f5529-communication-with-the-lmp91002-over-i2c-is-always-stuck-in-the-__interrupt-void-usci_b0_isr-void-interrupt

器件型号:MSP430F5529
主题中讨论的其他器件:LMP91002

大家好、

#pragma vector=USCI_B0_VECTOR
__interrupt void USCI_B0_ISR(void)
{
  switch(__even_in_range(UCB0IV,12))
  {
  case  0: break;                                                              // Vector  0: No interrupts
  case  2: break;                                                              // Vector  2: ALIFG
  case  4: break;                                                              // Vector  4: NACKIFG
  case  6: break;                                                              // Vector  6: STTIFG
  case  8: break;                                                              // Vector  8: STPIFG
  case 10:                                                                     // Vector 12: TXIFG  
    I2CBuffer = UCB0RXBUF;                                                     // store received data in    buffer
    __bic_SR_register_on_exit(LPM0_bits);                                      // Exit LPM0
    break;                                                                     // Vector 10: RXIFG
  case 12:                                  
    if (PtrTransmit >= 0)                                                      // Check Transmit pointer
    {
      UCB0TXBUF = I2CBufferArray[PtrTransmit];                                 // Load TX buffer
      PtrTransmit--;                                                           // Decrement TX byte counter
    }
    else
    {
      UCB0IFG &= ~UCTXIFG;                                                     // Clear USCI_B0 TX int flag
      __bic_SR_register_on_exit(LPM0_bits);                                    // Exit LPM0
    }  
    break;
  default: break;
  }  
}

始终卡在 TI_MSP430_i2c_USCIB0_5xx.c 文件中的案例10中、上拉电阻已添加到 I2C 并使用官方的 LMP91002驱动程序库。 客户想知道原因是什么。

源代码如下: /cfs-file/__key/communityserver-discussions-components-files/150/MSP430_5F00_Project.zip

您可以帮助检查此案例吗? 谢谢。

此致、

樱桃