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.
Tool/software: TI C/C++ Compiler
I am trying to print and read data from UART in simple peripheral project. I have added the UART driver and UART_read and UART_write functions.
I am using 1 characteristic to read data and another to write data in UART. Now, the issue is: In order to read data continuously, UART_read needs to be in an infinite loop, but this affects the UART_write functionality as now it first expects UART_read to take place and then prints data.
To read from UART :
UART_read(uart,&charValue2,sizeof(charValue2));
SimpleProfile_SetParameter(SIMPLEPROFILE_CHAR2, sizeof(uint8_t),
&charValue2);
Is there any other way to implements this ?
Hi Akanksha,
Could you maybe elaborate on the following, I am not sure I fully understand what you are going for here?
"I am using 1 characteristic to read data and another to write data in UART. Now, the issue is: In order to read data continuously, UART_read needs to be in an infinite loop, but this affects the UART_write functionality as now it first expects UART_read to take place and then prints data."
Taking a swing at this by guessing, it sound like you want to setup the UART in callback mode and from the read callback issue an event to update the parameter value. In the read callback you could choose to restart the read operation again, no blocking or dependency on the write function.
Yes. You got it right. One parameter should be for read function and another should be for write function.
Hi Akanksha,
I would recommend you look into how to sue the driver in callback mode: