<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic flexio uart  driver for freertos in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flexio-uart-driver-for-freertos/m-p/791871#M48178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my implementation of FreeRTOS driver for FLEXIO UART drvier. This is tested on MKL17Zxxx controller. It requires a patch to the fsl_flexio_uart.c to fix a bug in that driver (as shown on the previous post). If you use this code in your project please let me know if you find any bugs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample way to use the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define FLEXIO_UART_TX_PIN 6U // FLEXIO_D06&lt;BR /&gt;#define FLEXIO_UART_RX_PIN 7U // FLEXIO_D07&lt;BR /&gt;#define FLEXIO_CLOCK_FREQUENCY 4000000U // 4MHz to allow timer_div &amp;lt; 255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static flexio_uart_rtos_handle_t g_handle;&lt;BR /&gt;static flexio_uart_handle_t g_t_handle;&lt;/P&gt;&lt;P&gt;static uint8_t g_background_buffer[32]; // used by g_rtos_config struct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static struct _flexio_uart_rtos_config g_rtos_config = {&lt;BR /&gt; .flexio_uart.flexioBase = FLEXIO, /*!&amp;lt; FLEXIO UART base address */&lt;BR /&gt; .flexio_uart.TxPinIndex = FLEXIO_UART_TX_PIN,&lt;BR /&gt; .flexio_uart.RxPinIndex = FLEXIO_UART_RX_PIN,&lt;BR /&gt; .srcclk = FLEXIO_CLOCK_FREQUENCY, /*!&amp;lt; UART source clock in Hz*/&lt;BR /&gt; .baudrate = 9600U, /*!&amp;lt; Desired communication speed */&lt;BR /&gt; .bitCountPerChar = kFLEXIO_UART_8BitsPerChar, /*!&amp;lt; number of bits, 7/8/9 -bit */&lt;BR /&gt; .buffer = g_background_buffer, /*!&amp;lt; Buffer for background reception */&lt;BR /&gt; .buffer_size = sizeof(g_background_buffer) /*!&amp;lt; Size of buffer for background reception */&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void task(void *pvParameters)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;status_t result;&lt;/P&gt;&lt;P&gt;size_t size_not_used;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( (result=FLEXIO_UART_RTOS_Init(&amp;amp;g_handle, &amp;amp;g_t_handle, &amp;amp;g_rtos_config)) != kStatus_Success)&lt;BR /&gt; {&lt;BR /&gt; SEGGER_RTT_WriteString(0,"Task init failed.\n");&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vTaskSuspend(NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((result=FLEXIO_UART_RTOS_Send(&amp;amp;g_handle, g_tx_cmd_read_result, sizeof(g_tx_cmd_read_result))) != kStatus_Success)&lt;BR /&gt; {&lt;BR /&gt;SEGGER_RTT_WriteString(0, "Write cmd failed (send error %d).\r\n", result);&lt;BR /&gt;vTaskSuspend(NULL);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if ((result = FLEXIO_UART_RTOS_Receive(&amp;amp;g_handle, g_buffer, 2, &amp;amp;not_used)) != kStatus_Success) // get two bytes&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;SEGGER_RTT_WriteString(0, "Read cmd failed (receive error %d).\r\n", result);&lt;BR /&gt;vTaskSuspend(NULL);&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2018 21:56:42 GMT</pubDate>
    <dc:creator>michals</dc:creator>
    <dc:date>2018-07-26T21:56:42Z</dc:date>
    <item>
      <title>flexio uart  driver for freertos</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flexio-uart-driver-for-freertos/m-p/791871#M48178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my implementation of FreeRTOS driver for FLEXIO UART drvier. This is tested on MKL17Zxxx controller. It requires a patch to the fsl_flexio_uart.c to fix a bug in that driver (as shown on the previous post). If you use this code in your project please let me know if you find any bugs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample way to use the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define FLEXIO_UART_TX_PIN 6U // FLEXIO_D06&lt;BR /&gt;#define FLEXIO_UART_RX_PIN 7U // FLEXIO_D07&lt;BR /&gt;#define FLEXIO_CLOCK_FREQUENCY 4000000U // 4MHz to allow timer_div &amp;lt; 255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static flexio_uart_rtos_handle_t g_handle;&lt;BR /&gt;static flexio_uart_handle_t g_t_handle;&lt;/P&gt;&lt;P&gt;static uint8_t g_background_buffer[32]; // used by g_rtos_config struct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static struct _flexio_uart_rtos_config g_rtos_config = {&lt;BR /&gt; .flexio_uart.flexioBase = FLEXIO, /*!&amp;lt; FLEXIO UART base address */&lt;BR /&gt; .flexio_uart.TxPinIndex = FLEXIO_UART_TX_PIN,&lt;BR /&gt; .flexio_uart.RxPinIndex = FLEXIO_UART_RX_PIN,&lt;BR /&gt; .srcclk = FLEXIO_CLOCK_FREQUENCY, /*!&amp;lt; UART source clock in Hz*/&lt;BR /&gt; .baudrate = 9600U, /*!&amp;lt; Desired communication speed */&lt;BR /&gt; .bitCountPerChar = kFLEXIO_UART_8BitsPerChar, /*!&amp;lt; number of bits, 7/8/9 -bit */&lt;BR /&gt; .buffer = g_background_buffer, /*!&amp;lt; Buffer for background reception */&lt;BR /&gt; .buffer_size = sizeof(g_background_buffer) /*!&amp;lt; Size of buffer for background reception */&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void task(void *pvParameters)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;status_t result;&lt;/P&gt;&lt;P&gt;size_t size_not_used;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( (result=FLEXIO_UART_RTOS_Init(&amp;amp;g_handle, &amp;amp;g_t_handle, &amp;amp;g_rtos_config)) != kStatus_Success)&lt;BR /&gt; {&lt;BR /&gt; SEGGER_RTT_WriteString(0,"Task init failed.\n");&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vTaskSuspend(NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((result=FLEXIO_UART_RTOS_Send(&amp;amp;g_handle, g_tx_cmd_read_result, sizeof(g_tx_cmd_read_result))) != kStatus_Success)&lt;BR /&gt; {&lt;BR /&gt;SEGGER_RTT_WriteString(0, "Write cmd failed (send error %d).\r\n", result);&lt;BR /&gt;vTaskSuspend(NULL);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if ((result = FLEXIO_UART_RTOS_Receive(&amp;amp;g_handle, g_buffer, 2, &amp;amp;not_used)) != kStatus_Success) // get two bytes&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;SEGGER_RTT_WriteString(0, "Read cmd failed (receive error %d).\r\n", result);&lt;BR /&gt;vTaskSuspend(NULL);&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 21:56:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flexio-uart-driver-for-freertos/m-p/791871#M48178</guid>
      <dc:creator>michals</dc:creator>
      <dc:date>2018-07-26T21:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: flexio uart  driver for freertos</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/flexio-uart-driver-for-freertos/m-p/791872#M48179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michals:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your sharing, it is very helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 22:55:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/flexio-uart-driver-for-freertos/m-p/791872#M48179</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-08-23T22:55:15Z</dc:date>
    </item>
  </channel>
</rss>

