AnsweredAssumed Answered

Error UART FreeRTOS Driver

Question asked by Pedro Correa de Castro on Jun 21, 2017
Latest reply on Jul 14, 2017 by Daniel Chen

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

Outcomes