Part Number: CC2640R2F
Tool/software: TI-RTOS
Dear TI,
I am currently having some UART connection problems and came across this relevant post. I am using SDK 1.50.00.58 with the CC2640R2. I am using the POWER_SAVING define in the simple_peripheral_cc2640r2lp_oad_offchip example and have added some UART function calls with a proprietary peripheral device. Concretely I am doing the following in a task context:
/* Write some data */
UART_write(uartHandle, buf_send, buf_ptr);
/* Read some data */
while (UART_read(uartHandle, &buf, 1)) {
/* Do something with buf */
}
Unfortunately this does not always perform as I would expect. Our peripheral device sends correct data (sniffed with logic analyzer) but it is not always received by the CC2640R2 in the while loop. When I turn off POWER_SAVING there seem to be no problems. Also when I disable all other tasks this seems to go fine. Do you have any advice for me when trying to integrate the UART with POWER_SAVING mode? Or should this work as intended?
I am using drivers in MODE_CALLBACK with a read timeout of 2000. I have tried to set power constraints before writing and after the while loop, but I am not sure if this is the route to go. Any advice regarding power_saving and uart would be appreciated.
Best regards,
Mattia