<?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: debug console non blocking configuration in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/debug-console-non-blocking-configuration/m-p/862270#M1371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Glenn Kosteva&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TryGetchar API will go and check to verify if there is a new data and continue (in non blocking way), if it exists data, it will be saved. One way to use it could be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;  &lt;SPAN class="keyword token"&gt;while&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;//ch = GETCHAR();&lt;/SPAN&gt;
       &lt;SPAN class="token function"&gt;DbgConsole_TryGetchar&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;ch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
         &lt;SPAN class="token function"&gt;PUTCHAR&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
         ch&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the GETCHAR function which in low-level driver uses nonblocking functions. Another option could be implementing the UART nonblocking transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;BR /&gt;Regards,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2019 00:20:43 GMT</pubDate>
    <dc:creator>jorge_a_vazquez</dc:creator>
    <dc:date>2019-01-31T00:20:43Z</dc:date>
    <item>
      <title>debug console non blocking configuration</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/debug-console-non-blocking-configuration/m-p/862269#M1370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using MCUXpresso. I have the debug console working with the shell application. This uses getchar which is a blocking function. I want to convert the console to non-blocking. I added the project setting&amp;nbsp; "DEBUG_CONSOLE_TRANSFER_NON_BLOCKING" to my project. I call&amp;nbsp; &amp;nbsp;"DbgConsole_Init(BOARD_DEBUG_UART_BASEADDR, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq)"&amp;nbsp; &amp;nbsp;and I am now calling the non-blocking function:&amp;nbsp;IO_TryReceiveCharacter().&amp;nbsp; This function never returns any characters because&amp;nbsp; UART_TransferGetRxRingBufferLength() never returns a size greater than zero.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;DbgConsole_Init calls&amp;nbsp;UART_TransferCreateHandle() which sets&amp;nbsp;UART_TransferHandleIRQ() but I do not get this interrupt which would place data in the ring buffer. Am I missing a initialization somewhere?&amp;nbsp; Is there example code for a non-blocking console? Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2019 02:20:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/debug-console-non-blocking-configuration/m-p/862269#M1370</guid>
      <dc:creator>gkosteva</dc:creator>
      <dc:date>2019-01-25T02:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: debug console non blocking configuration</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/debug-console-non-blocking-configuration/m-p/862270#M1371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Glenn Kosteva&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TryGetchar API will go and check to verify if there is a new data and continue (in non blocking way), if it exists data, it will be saved. One way to use it could be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;  &lt;SPAN class="keyword token"&gt;while&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;//ch = GETCHAR();&lt;/SPAN&gt;
       &lt;SPAN class="token function"&gt;DbgConsole_TryGetchar&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;ch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
         &lt;SPAN class="token function"&gt;PUTCHAR&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
         ch&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the GETCHAR function which in low-level driver uses nonblocking functions. Another option could be implementing the UART nonblocking transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;BR /&gt;Regards,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2019 00:20:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/debug-console-non-blocking-configuration/m-p/862270#M1371</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2019-01-31T00:20:43Z</dc:date>
    </item>
  </channel>
</rss>

