<?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 Re: LPUART_RTOS_Receive Error Question in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-RTOS-Receive-Error-Question/m-p/1748051#M27347</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance for contacting NXP support.&lt;/P&gt;
&lt;P&gt;In this case can you please help me with some extra details.&lt;/P&gt;
&lt;UL type="disc"&gt;
&lt;LI&gt;Q1: In the meantime is not necessary to modify the configTICK_RATE_HZ.&lt;/LI&gt;
&lt;LI&gt;Q2: For this it would be really helpful if you can send me the task creation for the LPUART_RTOS_Receive task. This in order to understand how is this been configured and the current priority.&lt;/LI&gt;
&lt;LI&gt;Q3: For this first approach it is not necessary to implement a change on the FreeRTOS.&lt;/LI&gt;
&lt;LI&gt;Q4: Its is important to have an interrupt handler to manage and clean the reception flags. Also I will appreciate if you can send me the configuration of this interruption.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also I will recommend for this case to give a look into our RT1020 SDK examples we have an LPUART_freeRTOS included that can be useful as a reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know this information.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2023 23:16:59 GMT</pubDate>
    <dc:creator>nxf77486</dc:creator>
    <dc:date>2023-10-27T23:16:59Z</dc:date>
    <item>
      <title>LPUART_RTOS_Receive Error Question</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-RTOS-Receive-Error-Question/m-p/1745591#M27311</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While I am using&amp;nbsp;LPUART_RTOS_Receive, I`ve got&amp;nbsp; Error code 1309 (kStatus_LPUART_RxHardwareOverrun), It means that ev value from&amp;nbsp;xEventGroupWaitBits is&amp;nbsp;RTOS_LPUART_HARDWARE_BUFFER_OVERRUN&lt;/P&gt;&lt;P&gt;Of cource, It is very rare case,&amp;nbsp; &amp;nbsp;4~6 times in 12hours test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Saying the circumstance,&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I.MX RT 1020 EVK board&lt;/P&gt;&lt;P&gt;1. Baudrate, 19200 bps&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;lpuart_rtos_config_t lp2_rt_config = {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.base = LPUART2,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.srcclk = 80000000UL,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .baudrate&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 19200,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .parity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= kLPUART_ParityDisabled,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .stopbits&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= kLPUART_OneStopBit,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .buffer&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= g_UART2rxRingBuffer,&amp;nbsp; &amp;nbsp; // RingBuffer size 512.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .buffer_size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = sizeof(g_UART2rxRingBuffer),&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .rx_timeout_constant_ms&amp;nbsp; &amp;nbsp;= 1,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .rx_timeout_multiplier_ms = 1,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .tx_timeout_constant_ms&amp;nbsp; &amp;nbsp;= 20,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; .tx_timeout_multiplier_ms = 1,&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;2. FreeRTOSConfig.h&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;#define configUSE_PREEMPTION 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;#define configCPU_CLOCK_HZ (SystemCoreClock)&amp;nbsp; &amp;nbsp; // maybe 500Mhz ??&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;#define configTICK_RATE_HZ ((TickType_t)1000)&amp;nbsp; &amp;nbsp; // 1 tick, 1ms&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; #define configUSE_TIME_SLICING 1&amp;nbsp; //&amp;nbsp; &amp;nbsp; Around 10 tasks having&amp;nbsp;same priority, exist.&lt;/P&gt;&lt;P&gt;3. When I&amp;nbsp; call this function,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// timeout value&amp;nbsp; first byte100ms, next byte 3ms&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LPUART_RTOS_SetRxTimeout(m_hSerial, timeout, 1);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// I receive data by one Byte , Byte by Byte, using&amp;nbsp; while (~~),&amp;nbsp; &amp;nbsp;about 30~ 40byte&amp;nbsp; variant Length.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;int lpuart_result = LPUART_RTOS_Receive(m_hSerial, (unsigned char*)buffer, 1, &amp;amp;n);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For solving this overrun Error,&amp;nbsp; &amp;nbsp;What am I supposed to do ?&lt;/P&gt;&lt;P&gt;As I think, Is this problem from&amp;nbsp; the Speed&amp;nbsp; of&amp;nbsp; moving&amp;nbsp; data&amp;nbsp; from UART buffer&amp;nbsp; to Ring buffer ?&lt;/P&gt;&lt;P&gt;So.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Do I need to change configTICK_RATE_HZ&amp;nbsp; value ??&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Before calling LPUART_RTOS_Receive,&amp;nbsp; &amp;nbsp;Do I have to set priority of&amp;nbsp; This Task, Higher ?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; OfCourse,&amp;nbsp; when Exit&amp;nbsp;LPUART_RTOS_Receive,&amp;nbsp; &amp;nbsp;restore priority value of that task.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; or... change something arguement from FreeRTOS ??&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; change code?? RX interrupt handler code ?&amp;nbsp; LPUART interrupt priority ?(using NVIC set priority)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advice&amp;nbsp; to me&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 04:47:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-RTOS-Receive-Error-Question/m-p/1745591#M27311</guid>
      <dc:creator>Seongyon_Jeong</dc:creator>
      <dc:date>2023-10-25T04:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART_RTOS_Receive Error Question</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-RTOS-Receive-Error-Question/m-p/1748051#M27347</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance for contacting NXP support.&lt;/P&gt;
&lt;P&gt;In this case can you please help me with some extra details.&lt;/P&gt;
&lt;UL type="disc"&gt;
&lt;LI&gt;Q1: In the meantime is not necessary to modify the configTICK_RATE_HZ.&lt;/LI&gt;
&lt;LI&gt;Q2: For this it would be really helpful if you can send me the task creation for the LPUART_RTOS_Receive task. This in order to understand how is this been configured and the current priority.&lt;/LI&gt;
&lt;LI&gt;Q3: For this first approach it is not necessary to implement a change on the FreeRTOS.&lt;/LI&gt;
&lt;LI&gt;Q4: Its is important to have an interrupt handler to manage and clean the reception flags. Also I will appreciate if you can send me the configuration of this interruption.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Also I will recommend for this case to give a look into our RT1020 SDK examples we have an LPUART_freeRTOS included that can be useful as a reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know this information.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 23:16:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-RTOS-Receive-Error-Question/m-p/1748051#M27347</guid>
      <dc:creator>nxf77486</dc:creator>
      <dc:date>2023-10-27T23:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART_RTOS_Receive Error Question</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-RTOS-Receive-Error-Question/m-p/1750073#M27382</link>
      <description>&lt;P&gt;I am sorry ,&amp;nbsp; I can not send the code.&amp;nbsp; right now. I don`t have authority,&amp;nbsp;&lt;/P&gt;&lt;P&gt;From, answer of Q2,&amp;nbsp; &amp;nbsp;I found&amp;nbsp; improvement point,&amp;nbsp; so&amp;nbsp; I am doing&amp;nbsp; this&amp;nbsp; job , test.&lt;/P&gt;&lt;P&gt;thank you for the answer,&amp;nbsp; If I need more help,&amp;nbsp; I will upload question&amp;nbsp; more detaily&amp;nbsp; , as&amp;nbsp; new topic&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 07:29:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-RTOS-Receive-Error-Question/m-p/1750073#M27382</guid>
      <dc:creator>Seongyon_Jeong</dc:creator>
      <dc:date>2023-11-01T07:29:57Z</dc:date>
    </item>
  </channel>
</rss>

