freeRTOS UART driver unreliable, Framing Errors occur

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

freeRTOS UART driver unreliable, Framing Errors occur

2,046 次查看
jbrud
Contributor III

Hi All,

I started to work with the the freeRTOS UART example from the the SDK (sdk/boards/twrk64f120m/rtos_examples/freertos_uart). Unfortunately it does not really work. I use the settings as explained in the readme:

    - 115200 baud rate
    - 8 data bits
    - No parity
    - One stop bit
    - No flow control

It works somehow in the case if you give exactly 4 characters. But if you send 4 characters step by step it doesn't work. It completely stops working at all. I read here in the forum that this is a known isssue/limitation. But even if I change the code to only wait for on character it does not work reliable.

Through debugging  I found out that the UART_RTOS_Callback()  of fsl_uart_freertos.c will be called with status = kStatus_UART_FramingError. You can reproduce it on your side easily by adding a : else if (status == kStatus_UART_FramingError).

标记 (1)
0 项奖励
回复
4 回复数

1,555 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Johannes

 FreeRTOS UART driver is a blocking task, it blocks current task until whole required data are received.

In this demo, uint8_t recv_buffer[4]; so task will wait until 4 bytes received

If you need to send only one byte, you can change the recv_buff size to 1.

Regards

Daniel

0 项奖励
回复

1,555 次查看
jbrud
Contributor III

Hi Daniel Chen,

as I mentioned  I'm aware of this. The problem is, it is not reliable even with  recv_buff size = 1. 

For your information, I'm working with a TWR-K64F120M.

What about the UART_FramingErrors ?

On my side I tested it with different hosts and serial tools:

* Linux + Minicom

* Windows + Hterm

It makes no different ...

0 项奖励
回复

1,555 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Johannes:

Sorry I can't reproduce your issue on my side now.   what do you mean  when you say "send 4 characters step by step" ? set break point in your code ?

Regards

Daniel

0 项奖励
回复

1,555 次查看
jbrud
Contributor III

Can anybody help me ?

0 项奖励
回复