I'm trying to just run a simple test to see if the UART on my chip works in TiRTOS. I entered a task defined as follows:
Void uartFxn(UArg arg0, UArg arg1)
{
char input[16];
char output[] = {1,1,8,1,1,1,1,1,1,1,1,1,1,1,1,1};
UART_Handle uartHandle;
UART_Params uartParams;
printf("Initializing UART Task");
/* 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 = 2800;
uartHandle = UART_open(CC2650_UART0, &uartParams);
if (uartHandle == NULL) {
System_abort("Error opening the UART");
}else{
puts("UART Initialized, preparing to transmit on button press.");
puts(0);
}
/* Loop forever echoing */
while (1) {
if(!GPIOPinRead(GPIO_PIN_5)){
UART_write(uartHandle, output, 15);
}
}
}
Which should just transmit a basic test whenever a button is pressed. This works once, but not after. I inserted a breakpoint inside the if statement, and while the UART_write line is reached the first time I press the button, after hitting continue I never hit it again, even if the button is pressed. Do I need to be doing something else after a UART_write to set the module to transmit again?