freeRTOS UART driver unreliable, Framing Errors occur

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

freeRTOS UART driver unreliable, Framing Errors occur

2,056件の閲覧回数
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,565件の閲覧回数
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,565件の閲覧回数
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,565件の閲覧回数
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,565件の閲覧回数
jbrud
Contributor III

Can anybody help me ?

0 件の賞賛
返信