<?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: GETCHAR() func. Quick-Hack for Non-Blocking input. in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/GETCHAR-func-Quick-Hack-for-Non-Blocking-input/m-p/2032516#M33276</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/232681"&gt;@hi-ro&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for reporting this, I'm sure it will be useful for other users as well. I will pass on these findings to the SDK team so they can evaluate whether or not they add this to a next revision of the SDKs.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2025 17:24:41 GMT</pubDate>
    <dc:creator>EdwinHz</dc:creator>
    <dc:date>2025-01-22T17:24:41Z</dc:date>
    <item>
      <title>GETCHAR() func. Quick-Hack for Non-Blocking input.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/GETCHAR-func-Quick-Hack-for-Non-Blocking-input/m-p/2032162#M33266</link>
      <description>&lt;P&gt;Hi, forks,&lt;/P&gt;&lt;P&gt;Recentry, DebugConsole do not supports NON-BLOCKING input.&lt;/P&gt;&lt;P&gt;(&lt;SPAN&gt;&lt;EM&gt;DbgConsole_TryGetchar&lt;/EM&gt;&amp;nbsp; is gone...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, I've tried some quick hack &lt;EM&gt;DbgConsole_Getchar() to adapt Non-blocking operation.&lt;/EM&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;2 files are modified.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;(fsl_debug_console.h) :&lt;BR /&gt;&amp;nbsp;GETCHAR_NB()&amp;nbsp; DbgConsole_Getchar_NB()&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;(fsl_debug_console.c) :&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;Add struct entry, like below:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;hal_uart_status_t (*getChar_NB)(hal_uart_handle_t handle,&lt;BR /&gt;uint8_t *data,&lt;BR /&gt;size_t length);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;and, init it same manner, like below&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;s_debugConsole.getChar_NB = HAL_UartReceiveNonBlocking;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;add new func.&amp;nbsp; DbgConsole_Getchar_NB(void)&amp;nbsp; like&amp;nbsp; DbgConsole_Getchar() but modification like below :&lt;BR /&gt;int DbgConsole_Getchar_NB(void)&lt;BR /&gt;&amp;nbsp;s_debugConsole.getChar_NB((hal_uart_handle_t)&amp;amp;s_debugConsole.uartHandleBuffer[0], (uint8_t *)(&amp;amp;dbgConsoleCh), 1))&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;This is quick hack, it seems working in my test env. &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;it not have well test.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;please use and report hidden?&amp;nbsp; problem.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 08:30:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/GETCHAR-func-Quick-Hack-for-Non-Blocking-input/m-p/2032162#M33266</guid>
      <dc:creator>hi-ro</dc:creator>
      <dc:date>2025-01-22T08:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: GETCHAR() func. Quick-Hack for Non-Blocking input.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/GETCHAR-func-Quick-Hack-for-Non-Blocking-input/m-p/2032516#M33276</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/232681"&gt;@hi-ro&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for reporting this, I'm sure it will be useful for other users as well. I will pass on these findings to the SDK team so they can evaluate whether or not they add this to a next revision of the SDKs.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 17:24:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/GETCHAR-func-Quick-Hack-for-Non-Blocking-input/m-p/2032516#M33276</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2025-01-22T17:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: GETCHAR() func. Quick-Hack for Non-Blocking input.</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/GETCHAR-func-Quick-Hack-for-Non-Blocking-input/m-p/2036874#M33349</link>
      <description>&lt;P&gt;Dear EdwinHz,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;After that, I noticed potential bad code.&lt;/P&gt;&lt;P&gt;In the DbgConsole_Getchar(void) function, it passes dbgConsoleCh variable as pointer,&lt;/P&gt;&lt;P&gt;and ISR writes this variable, so, this variable must be static.&lt;/P&gt;&lt;P&gt;or, leaving function then this variable released to stack.&amp;nbsp; I troubled about it several hours.&lt;/P&gt;&lt;P&gt;Change "char dbgConsoleCh;" with "static char dbgConsoleCh = 0;"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; It will help your peace of mind !&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2025 07:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/GETCHAR-func-Quick-Hack-for-Non-Blocking-input/m-p/2036874#M33349</guid>
      <dc:creator>hi-ro</dc:creator>
      <dc:date>2025-02-01T07:58:14Z</dc:date>
    </item>
  </channel>
</rss>

