Other Parts Discussed in Thread: IWR6843, TIDA-010022,
1. I refer to TIDA-010022, it uses CC1352R1. When read radar data from IWR6843, it executes some UART_control for FIFO flush
UART_control(mmwaveLoggerUartHandle, UARTCC26XX_CMD_RX_FIFO_FLUSH, 0);
UARTCC26XX_CMD_RX_FIFO_FLUSH is declared in UARTCC26XX.h. But in UARTCC32XX.h, I don't see corresponding variable for FIFO FLUSH. So I decided to declare it like this in UARTCC32XX.h:
#define UARTCC32XX_CMD_RX_FIFO_FLUSH (UART_CMD_RESERVED + 3)
As I understand, the reference code of CC1352R1 get data from IWR6843, so we must flush FIFO to receive new data every loop.
I don't know the meaning of UART_CMD_RESERVED so I'm not sure whether I define UARTCC32XX_CMD_RX_FIFO_FLUSH as above is correct?
2. If the method above is not ok, I think of another way of using memset after each UART_read
e.g.
UART_read(mmwaveLoggerUartHandle, pBuf, tlv_length); memset(pBuf, 0, sizeof(pBuf));
Is it correct?
Please confirm whether both methods above are ok for CC3235S UART RX FIFO flush.