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.

MSP430FR2000: restart issue

Part Number: MSP430FR2000
Other Parts Discussed in Thread: MSP430FR2111, SN74LVC1G240

Dear,

as below code picture, the debug is normal, but after program, it may restart when  character i =4,could you help me check what is wrong with it. 

//******************************************************************************
// MSP430FR211x Demo - eUSCI_A0 UART echo at 4800 baud using BRCLK = 32768Hz.
//
// Description: This demo echoes back characters received via a PC serial port.
// ACLK is used as UART clock source and the device is put in LPM3.
// Note that level shifter hardware is needed to shift between RS232 and MSP
// voltage levels.
//
// The example code shows proper initialization of registers
// and interrupts to receive and transmit data.
// To test code in LPM3, disconnect the debugger.
//
// ACLK = REFO = 32768Hz, MCLK = SMCLK = DCODIV ~1MHz.
//
// MSP430FR2111
// -----------------
// /|\| |
// | | |
// --|RST |
// | |
// | |
// | P1.7/UCA0TXD|----> PC (echo)
// | P1.6/UCA0RXD|<---- PC
// | P2.0 EN | ----> P2.0 为1,关SN74LVC1G240,此时为接收状态 (必须上下拉)P2REN |= BIT0;// 使能 P2.0 上下拉
//
// Xiaodong Li
// Texas Instruments Inc.
// Dec. 2021
// Built with IAR Embedded Workbench v6.40 & Code Composer Studio v6.1
// 2021 12 15 修改了不能连续发送大量数据的问题
// 2021 12 15 RELEASE 长字符发送时,4个字后退出for 没有找到原因,DEBUG正常
//******************************************************************************

#include <msp430.h>

void Init_GPIO();
unsigned char uart_buff[50];
unsigned char index=0;


int main(void)
{
int i=0;
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

// Configure GPIO
Init_GPIO();

PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode
// to activate 1previously configured port settings

// Configure UART pins
P1SEL0 |= BIT6 ;//| BIT7; // set 2-UART pin as second function
P1DIR |= BIT7; // 设为入,也就是高阻态
// Configure UART

**Attention** This is a public forum