Error UART FreeRTOS Driver

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

Error UART FreeRTOS Driver

774件の閲覧回数
PedroCastro
Contributor III

Hi,

I have been using the example freertos_uart program from Kinetis SDK 2 for the TWR-KV31F. The example is pretty straighforward and the only thing I had to do was to configure the Serial USB for the specific baudrate. However, when the demo tries to send the string below, an odd string appears as it would be a encoding problem.

const char *to_send = "FreeRTOS UART driver example!\r\n";

...

/* Send some data */
    if (0 > UART_RTOS_Send(&handle, (uint8_t *)to_send, strlen(to_send)))
    {
        vTaskSuspend(NULL);
    }

After that, when the demo tries to receive something from the terminal with the following function, nothing happens and the software gets stucked in that function.

error = UART_RTOS_Receive(&handle, recv_buffer, sizeof(recv_buffer), &n);

Does anyone know what possibly could be wrong? I am just using an example given and a regular USB-Serial cable.

Thanks in advance

ラベル(1)
0 件の賞賛
1 返信

498件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Pedro:

This is a normal behavior.

This demo demonstrates the possibility to use the UART driver in the RTOS. The example writes string into, then reads back chars. After every 4B received, these are sent back on UART.

For example, if you send 1234, the console shows

pastedImage_1.png

Regards

Daniel

0 件の賞賛