KV58 RXFIFO FLUSHING

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KV58 RXFIFO FLUSHING

Jump to solution
651 Views
alihanc_caliska
Contributor I

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.

0 Kudos
Reply
1 Solution
621 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @alihanc_caliska,

In the SDK the interrupt handler already manage some of the registers that are needed to clear the FIFO and receive a new package, since you mention the message is already receive this should clear the FIFO and the receive message shouldn't be duplicated. Have you tried checking the sending device to check if the package is the one as the one received?

Best Regards,
Alexis Andalon

View solution in original post

0 Kudos
Reply
1 Reply
622 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @alihanc_caliska,

In the SDK the interrupt handler already manage some of the registers that are needed to clear the FIFO and receive a new package, since you mention the message is already receive this should clear the FIFO and the receive message shouldn't be duplicated. Have you tried checking the sending device to check if the package is the one as the one received?

Best Regards,
Alexis Andalon

0 Kudos
Reply