what is the real meaning for the first parameter in DbgConsole_Init()

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

what is the real meaning for the first parameter in DbgConsole_Init()

325件の閲覧回数
ygao
Contributor I

Hi,

To enable debug logging message to console, DbgConsole_Init() need to be called to enable debug console logging. What is the real meaning of the first parameter of the function? For example, if I want to debug message to be output to Flexconn 3, which is set to be a UART, should I call DbgConsole_Init() with first parameter to be 3?

SDK document says: 

uint8_t instance
Instance (0 - UART0, 1 - UART1, ...), detail information please refer to the SOC corresponding R

What is UART0, 1...?

Regards,

Winston

 

0 件の賞賛
返信
1 返信

308件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose that you use FRDM-MCXN947 board, from the hardware perspective, the UART4 of MCXN947 is used to communicate between the MCXN947 and debug probe chip LPC55S69.

xiangjun_rong_0-1716949254570.png

The P1_9/FC4_P1_UART_TXD_MCULINK of MCXN947 is connected to Uart_RX of LPC55S69, P1_8/FC4_P0_UART_RXD_MCULINK of MCXN947 is connected to UART_TX of LPC55S69.

When you connect the MCU-LINK port of FRDM-MCXN947 board to PC USB, the UART of LPC55S69 is enumerated as a virtual COM port, so you can communicate with the uart 4 of FRDM-MCXN947 board and PC.

If you want to use UART3 of FRDM-MCXN947 board, I suppose it is okay.

P1_12 is FC3_P0, connected to pin28 of J9

P1_13 is FC3_P1, connected to pin27 of J9

You can use a SCI-USB board, connect the P1_12/P1_13/GND to the SCI-USB board.

From software,

You have to change the

#define #BOARD_DEBUG_UART_INSTANC 3

 

DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq);

 

You have to change the pin_mux.c to assign the P1_12/13 to FC3 function.

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信