Hi all,
First of all I'm using twr-kv58f220m board and twr-ind-io duo. I try to solve RS485. I'm okey with SDK example code but flushing don't run correctly. In my case, I send a messge through serial terminal as a 8-byte message. Firstly, I can get the message properly. For instance I send '01234567' and I can get. But, I want to send another 8-byte like '78965412', I can't get the message properly. I get like '701234567' and after that '870123456' and so on. I tried all solved issues in community but I can't run properly my application.
Solution1
Solution2
These are not valid for me. Here is my code below.
static uint8_t temp;
static uint8_t ch;
DEMO_UART->C2 &= ~UART_C2_RE_MASK;
DEMO_UART->C2 &= ~UART_C2_TE_MASK;
// //DEMO_UART-> PFIFO = UART_PFIFO_RXFE_MASK | UART_PFIFO_RXFIFOSIZE(6);
// temp = (DEMO_UART-> S1) | UART_S1_OR_MASK; // clear OR
// ch = DEMO_UART->D; //clear OR
DEMO_UART-> CFIFO |= UART_CFIFO_RXFLUSH_MASK;
DEMO_UART-> CFIFO |= UART_CFIFO_TXFLUSH_MASK;
DEMO_UART-> SFIFO |= UART_SFIFO_RXOF_MASK;
DEMO_UART-> SFIFO |= UART_SFIFO_TXOF_MASK;
DEMO_UART->C2 |= UART_C2_RE_MASK;
DEMO_UART->C2 |= UART_C2_TE_MASK;
Btw, I'm using nonBlockingTransferFunction. I'm waiting for your urgent rep.
My full example code is attached below.
Thanks in advance.