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.

RTOS/MSP432-RTOS: uartecho example with MSP432 launchpad, uart_write hangs after outputting character

Part Number: MSP432-RTOS

Tool/software: TI-RTOS

I'm using the TI-RTOS uartecho example, the MSP432 launchpad, and CCS all for the first time and am trying to get the uartecho example to work.  

My problem is that UART_write seems to hang after being called.  It outputs the first character and then never moves on in the program.  For example, it's supposed to first output "Echoing characters" but never gets past the first 'E'.  I have a line that turns on an LED after the write command.  It never turns on so UART_write is stuck somewhere.  

If i comment out the  UART_write(uart, echoPrompt, sizeof(echoPrompt)); line, then I can echo exactly one character.  So UART_read is functioning but UART_write is definitely hanging.  

I've confirmed with a scope that my comm lines are functioning.  The UART is only transmitting one character then getting stuck.  In the code below, LED1 never turns on.    

My code isn't modified much from the example taken from the resource explorer.  

Any advice?  

#include <stdint.h>
#include <stddef.h>
#include <xdc/runtime/System.h>

/* Driver Header files */
#include <ti/drivers/GPIO.h>
#include <ti/drivers/UART.h>

/* Example/Board Header files */
#include "Board.h"

/*
 *  ======== mainThread ========
 */
void *mainThread(void *arg0)
{
    char        input;
    const char  echoPrompt[] = "Echoing characters:\r\n";
    UART_Handle uart;
    UART_Params uartParams;

    /* Call driver init functions */
    GPIO_init();
    UART_init();

    /* Turn on user LED */
  //  GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON);
    //GPIO_write(Board_GPIO_LED1, Board_GPIO_LED_ON);

    /* Create a UART with data processing off. */
    UART_Params_init(&uartParams);
    uartParams.writeDataMode = UART_DATA_BINARY;
    uartParams.readDataMode = UART_DATA_BINARY;
    uartParams.readReturnMode = UART_RETURN_FULL;
    uartParams.readEcho = UART_ECHO_OFF;
    uartParams.baudRate = 9600;

    uart = UART_open(Board_UART0, &uartParams);

    if (uart == NULL) {
        /* UART_open() failed */
        while (1);
    }

   // UART_write(uart,hello, 5);

    UART_write(uart, echoPrompt, sizeof(echoPrompt));

    //GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON);




    /* Loop forever echoing */
    while (1) {
        UART_read(uart, &input, 1);

        GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON);


        UART_write(uart, &input, 1); 
    

        GPIO_write(Board_GPIO_LED1, Board_GPIO_LED_ON);

    }
}