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.

[参考译文] MSP430FR6922:代码卡在 UART 中断中

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1186215/msp430fr6922-code-is-getting-stuck-in-uart-interrupt

器件型号:MSP430FR6922

大家好、

  我正在尝试通过串行通信将 MSP432P401M 控制器与 Raspberry PI 进行通信。从 RPI 控制器接收数据时、会在"#endif"语句中遇到 UART 中断。

我随附了您的参考代码

#if defined (__TI_Compiler_version__)|| Defined (__IAR_systems_ICC__)
#pragma vector=USCI_A0_Vector
_interrupt void USCI_A0_ISR (void)
#Elif defined (_GNU_)
void __attribute__((中断(USCI_A0_Vector)) USCI_A0_ISR (void)
其他
错误编译器不受支持!
#endif

switch (__evo_in_range (UCA0IV、USCI_UART_UCTXCPTIFG))

USCI_NONE 案例:中断;
USCI_UART_UCRXIFG 案例:
teststop=0;
计数= 0;
CurrentLCValue=0;
CurrentLCValue_15bit = 0;
PreviousLCValue=0;
PeakValue=0;

//计时器停止
TA0CCTL0 &=~CCIE;

//RTC 被禁用
RTCCTL0_L &=~RTCTEVIE;

P7OUT&=~ BIT0;//继电器关闭

RXDATA[p++]=UCA0RXBUF;

如果(RXDATA[0]=0x01)

如果(p==3)

P=0;
giNewFrameFlag=1;


其他

P=0;

中断;

案例 USCI_UART_UCTXIFG:中断;
案例 USCI_UART_UCSTTIFG:中断;
案例 USCI_UART_UCTXCPTIFG:中断;

原因是什么?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您是说卡在这里吗?

    您能显示更多信息吗?