Hi all,
Taking as a starting point the example "Hello_World" example from SDK_2.9.0_MIMX8QX5xxxFZ which uses debug console to print through UART, I modified it to use the log component.
For this I added these instructions:
#include "fsl_component_log.h"
#include "fsl_component_log_backend_debugconsole.h"
#include "fsl_component_log.h"
//
LOG_Init();
LOG_SetTimestamp(log_get_timestamp);
LOG_InitBackendDebugconsole();
And defined LOG_ENABLE in my project.
Then, I'm able to print messages to terminal with LOG_INF(" ") fine;
In other hand using only debug console, adding interrupt activation for UART, I'm been able to work in non-blocking mode by defining DEBUG_CONSOLE_TRANSFER_NON_BLOCKING in my project.
PRINTF(" "); works correctly both in blocking and non blocking mode, however, LOG_INF(" "); prints nothing in non blocking mode.
By debugging I can trace that "DbgConsole_SerialManagerTxCallback" is being called, but message info does not contain the string I passed to LOG_INF(" "), SerialManager_WriteNonBlocking is not reached.
Is there any way to use DEBUG_CONSOLE_TRANSFER_NON_BLOCKING in log component? If so, what I need to correct in order to work fine?
-- EDIT --
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 vTaskStartScheduler(); I can view messages in terminal.
Any idea why this happens and how to fix it?
-- EDIT (02/22) --
I've have found the issue. The problem was I mixed up things and another task re-initialized IRQ STEER after scheduler start.