Part Number: CC2642R
Tool/software: TI-RTOS
Hi,
I have peripherals connected to both UARTs on my design. The problem I'm facing is that the UART interrupt is never triggered even though the UART RX/TX lines are receiving/sending the data (I've confirmed with a scope). The function initializing any UART is below:
void SimplePeripheral_uartOpen() {
UART_Params_init(&uart_params);
uart_params.readMode = UART_MODE_CALLBACK;
uart_params.readCallback = read_uart_cb;
uart_params.readDataMode = UART_DATA_BINARY;
uart_params.readReturnMode = UART_RETURN_FULL;
uart_params.readEcho = UART_ECHO_OFF;
uart_params.baudRate = 115200;
uart_params.stopBits = UART_STOP_ONE;
uart_params.parityType = UART_PAR_NONE;
uart_params.dataLength = UART_LEN_8;
uart = UART_open(CC26X2R1_MYDEVICE_UART0, &uart_params);
//memset(uart_buf, 0, sizeof(uint8_t) * BUF_SZ);
if (uart == NULL) {
//send error here
uart_error = 1;
return;
}
UART_control(uart, UARTCC26XX_RETURN_PARTIAL_ENABLE, NULL);
}
"read_uart_cb" is never called unless I keep polling UART_read() on an infinite loop. How could I get read_uart_cb called using interrupts instead of inefficient polling?
I'm using SimplePeripheral example project and simplelink_cc26x2_sdk_2_20_00_36 SDK version. I'm also using Code Composer.
Thank you.
