MCUXpresso SDK 2.11.1 RT1050 issue with PRINTF

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCUXpresso SDK 2.11.1 RT1050 issue with PRINTF

1,236件の閲覧回数
jrnTransAct
Contributor III

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?

------
Jim Norton
Sr. Firmware Engineer - TransAct Technologies, Inc.
ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,222件の閲覧回数
jrnTransAct
Contributor III

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.

------
Jim Norton
Sr. Firmware Engineer - TransAct Technologies, Inc.
0 件の賞賛
返信

1,210件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

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.
-------------------------------------------------------------------------------

0 件の賞賛
返信

1,208件の閲覧回数
jrnTransAct
Contributor III

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

------
Jim Norton
Sr. Firmware Engineer - TransAct Technologies, Inc.
0 件の賞賛
返信

1,203件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee
Hi, Thanks for your reply. 1)In other words the example code expects LPUART1 to be used so it gets more/different initialization than LPUART8? -- No, I'm afraid not, I'd like to know which board you used for testing. 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. -------------------------------------------------------------------------------
0 件の賞賛
返信

1,227件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

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.
-------------------------------------------------------------------------------

0 件の賞賛
返信