KV58 RXFIFO FLUSHING

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KV58 RXFIFO FLUSHING

跳至解决方案
1,584 次查看
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 项奖励
回复
1 解答
1,554 次查看
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 项奖励
回复
1 回复
1,555 次查看
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 项奖励
回复