<?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 Log component using transfer non blocking on debug console in MCUXpresso SDK</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Log-component-using-transfer-non-blocking-on-debug-console/m-p/1416684#M3597</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Taking as a starting point the example "Hello_World" example from&amp;nbsp;&lt;STRONG&gt;SDK_2.9.0_MIMX8QX5xxxFZ&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;which uses debug console to print through UART, I modified it to use the log component.&lt;/P&gt;&lt;P&gt;For this I added these instructions:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#include "fsl_component_log.h"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#include "fsl_component_log_backend_debugconsole.h"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#include "fsl_component_log.h"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;//&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOG_Init();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOG_SetTimestamp(log_get_timestamp);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LOG_InitBackendDebugconsole();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And defined&amp;nbsp;&lt;STRONG&gt;LOG_ENABLE&lt;/STRONG&gt; in my project.&lt;/P&gt;&lt;P&gt;Then, I'm able to print messages to terminal with&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;LOG_INF(" ") &lt;/STRONG&gt;fine;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other hand using only debug console, adding interrupt activation for UART, I'm been able to work in non-blocking mode by defining&amp;nbsp;&lt;STRONG&gt;DEBUG_CONSOLE_TRANSFER_NON_BLOCKING&lt;/STRONG&gt; in my project.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PRINTF(" ")&lt;/STRONG&gt;; works correctly both in blocking and non blocking mode, however,&amp;nbsp;&lt;STRONG&gt;LOG_INF(" ")&lt;/STRONG&gt;; prints nothing in non blocking mode.&lt;/P&gt;&lt;P&gt;By debugging I can trace that "DbgConsole_SerialManagerTxCallback" is being called, but message info does not contain the string I passed to&amp;nbsp;LOG_INF(" "),&amp;nbsp;SerialManager_WriteNonBlocking is not reached.&lt;/P&gt;&lt;P&gt;Is there any way to use&amp;nbsp;&lt;STRONG&gt;DEBUG_CONSOLE_TRANSFER_NON_BLOCKING &lt;/STRONG&gt;in log component? If so, what I need to correct in order to work fine?&lt;/P&gt;&lt;P&gt;-- EDIT --&lt;/P&gt;&lt;P&gt;I've found that problem isn't that there is no print at first, in both LOG and DEBUG CONSOLE methods. It has to be with a conflict with Free-RTOS since scheduler starts, output fails. If I let enough time to write a message before&amp;nbsp;vTaskStartScheduler(); I can view messages in terminal.&lt;/P&gt;&lt;P&gt;Any idea why this happens and how to fix it?&lt;/P&gt;&lt;P&gt;-- EDIT (02/22) --&lt;/P&gt;&lt;P&gt;I've have found the issue. The problem was I mixed up things and another task re-initialized IRQ STEER after scheduler start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Feb 2022 08:18:19 GMT</pubDate>
    <dc:creator>emolina-ebers</dc:creator>
    <dc:date>2022-02-22T08:18:19Z</dc:date>
    <item>
      <title>Log component using transfer non blocking on debug console</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Log-component-using-transfer-non-blocking-on-debug-console/m-p/1416684#M3597</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Taking as a starting point the example "Hello_World" example from&amp;nbsp;&lt;STRONG&gt;SDK_2.9.0_MIMX8QX5xxxFZ&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;which uses debug console to print through UART, I modified it to use the log component.&lt;/P&gt;&lt;P&gt;For this I added these instructions:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#include "fsl_component_log.h"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#include "fsl_component_log_backend_debugconsole.h"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;#include "fsl_component_log.h"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;//&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOG_Init();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOG_SetTimestamp(log_get_timestamp);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LOG_InitBackendDebugconsole();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;And defined&amp;nbsp;&lt;STRONG&gt;LOG_ENABLE&lt;/STRONG&gt; in my project.&lt;/P&gt;&lt;P&gt;Then, I'm able to print messages to terminal with&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;LOG_INF(" ") &lt;/STRONG&gt;fine;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other hand using only debug console, adding interrupt activation for UART, I'm been able to work in non-blocking mode by defining&amp;nbsp;&lt;STRONG&gt;DEBUG_CONSOLE_TRANSFER_NON_BLOCKING&lt;/STRONG&gt; in my project.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PRINTF(" ")&lt;/STRONG&gt;; works correctly both in blocking and non blocking mode, however,&amp;nbsp;&lt;STRONG&gt;LOG_INF(" ")&lt;/STRONG&gt;; prints nothing in non blocking mode.&lt;/P&gt;&lt;P&gt;By debugging I can trace that "DbgConsole_SerialManagerTxCallback" is being called, but message info does not contain the string I passed to&amp;nbsp;LOG_INF(" "),&amp;nbsp;SerialManager_WriteNonBlocking is not reached.&lt;/P&gt;&lt;P&gt;Is there any way to use&amp;nbsp;&lt;STRONG&gt;DEBUG_CONSOLE_TRANSFER_NON_BLOCKING &lt;/STRONG&gt;in log component? If so, what I need to correct in order to work fine?&lt;/P&gt;&lt;P&gt;-- EDIT --&lt;/P&gt;&lt;P&gt;I've found that problem isn't that there is no print at first, in both LOG and DEBUG CONSOLE methods. It has to be with a conflict with Free-RTOS since scheduler starts, output fails. If I let enough time to write a message before&amp;nbsp;vTaskStartScheduler(); I can view messages in terminal.&lt;/P&gt;&lt;P&gt;Any idea why this happens and how to fix it?&lt;/P&gt;&lt;P&gt;-- EDIT (02/22) --&lt;/P&gt;&lt;P&gt;I've have found the issue. The problem was I mixed up things and another task re-initialized IRQ STEER after scheduler start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 08:18:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Log-component-using-transfer-non-blocking-on-debug-console/m-p/1416684#M3597</guid>
      <dc:creator>emolina-ebers</dc:creator>
      <dc:date>2022-02-22T08:18:19Z</dc:date>
    </item>
  </channel>
</rss>

