The latest SDK 2.11.1 for i.MX RT1050 seems to have an issue with PRINTF.
No PRINTF output is sent to the LPUART8 until a call to GETCHAR() is made.
I tested this with the hello world example project, configured LPUART8 and updated the DEBUG UART to be LPUART8.
The "Hello world" PRINTF doesn't get printed however, characters can be read and echoed back to the terminal.
In previous SDK versions, this was NOT an issue.
Any thoughts?
See attached file.
I imported the "hello world" SDK example. Modified as needed to use LPUART8 instead of LPUART1.
To use LPUART8 I went into the peripheral config tool and configured LPUART8 and selected the RX/TX pins.
Then in order to hook up PRINTF/GETCHAR/PUTCHAR (Debug Functions) to LPUART8 I modified board/board.h starting at line 23 as follows:
/*******************************************************************************
* Definitions
******************************************************************************/
/*! @brief The board name */
#define BOARD_NAME "IMXRT1050-EVKB"
/* The UART to use for debug messages. */
#define BOARD_DEBUG_UART_TYPE kSerialPort_Uart
#define BOARD_DEBUG_UART_BASEADDR (uint32_t) LPUART8
#define BOARD_DEBUG_UART_INSTANCE 8U
#define BOARD_DEBUG_UART_CLK_FREQ BOARD_DebugConsoleSrcFreq()
#define BOARD_UART_IRQ LPUART8_IRQn
#define BOARD_UART_IRQ_HANDLER LPUART8_IRQHandler
The printf() on line 42 doesn't output anything. However, the code does read characters and echo them back to the terminal as expected.
The only way I've been able to get PRINTF() to work is by adding a call to GETCHAR() on line 40.
Hi,
Thanks for your reply.
Actually, the code modification is right, I have no idea why the printf doesn't work, which platform did you test on?
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Jeremy,
It's the RT1050 which I mentioned in the subject of the issue.
Could it be that the startup/init code isn't fully initializing all LPUARTS?
In other words the example code expects LPUART1 to be used so it gets more/different initialization than LPUART8?
Regards,
Jim
Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Before answering your question, I was wondering if you can illustrate the code modification you did.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------