Other Parts Discussed in Thread: CC1350
Hello,
I am using CC1350 launch pad for uart application. My intention is to get interrupt ,when different data with newline as end of frame is recevied . When i configured uart readReturnMode as UART_RETURN_FULL, i am getting interrupt when buffer is full.But when uart readReturnMode is configured as UART_RETURN_NEWLINE , i am not getting interrupt when uart receives newline. the code is attached . any suggestions for the same ??
#include <stdint.h>
#include <stddef.h>
#include <unistd.h>
/* Driver Header files */
#include <ti/drivers/GPIO.h>
#include <ti/drivers/UART.h>
#include "string.h"
/* Example/Board Header files */
#include "Board.h"
void uartCallbackFunction(UART_Handle handle,void *buf, size_t count);
/*
* ======== mainThread ========
*/
int ReadByte;
uint8_t rxbuf[100];
uint8_t txbuf[100];
const char echoPrompt[] = "Echoing characters:\r\n";
int rxbytes,i;
UART_Handle uart;
void *mainThread(void *arg0)
{
UART_Handle uart;
UART_Params uartParams;
/* Call driver init functions */
UART_init();
/* Create a UART with data processing off. */
UART_Params_init(&uartParams);
uartParams.baudRate = 115200;
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_TEXT;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.readMode= UART_MODE_CALLBACK;
uartParams.writeMode=UART_MODE_BLOCKING;
uartParams.readReturnMode = UART_RETURN_NEWLINE;
uartParams.readTimeout=UART_WAIT_FOREVER;
uartParams.readCallback=uartCallbackFunction;
uart = UART_open(Board_UART0, &uartParams);
if (uart == NULL) {
/* UART_open() failed */
while (1);
}
UART_write(uart, echoPrompt, sizeof(echoPrompt))
while(1)
{
rxbytes=UART_read(uart,rxbuf,10);
for(i=0;i<100;i++);
};
}
void uartCallbackFunction(UART_Handle handle,void *buf, size_t count)
{
// UART_read(uart,rxbuf,5);
}

