MKL15Z32VFM4 :uart1

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

MKL15Z32VFM4 :uart1

740件の閲覧回数
chenxikean
Contributor I

Hello, when I use the MKL15Z32VFM4 chip, uart1 cannot output normally. Below is my initialization code. The initialization process is the same as the routine, but the data cannot be output normally.

 

code: 

    

uart_config_t config;

BOARD_InitPins();
BOARD_BootClockRUN();

/*
* config.baudRate_Bps = 115200U;
* config.parityMode = kUART_ParityDisabled;
* config.stopBitCount = kUART_OneStopBit;
* config.txFifoWatermark = 0;
* config.rxFifoWatermark = 1;
* config.enableTx = false;
* config.enableRx = false;
*/
UART_GetDefaultConfig(&config);
config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE;
config.enableTx = true;
config.enableRx = true;

UART_Init(DEMO_UART, &config, DEMO_UART_CLK_FREQ);

ラベル(1)
0 件の賞賛
返信
1 返信

726件の閲覧回数
diego_charles
NXP TechSupport
NXP TechSupport

Hi @chenxikean 

 

By “uart1 cannot output normally” , do you mean that the TX pin it is not encoding the transfer as expected, or simply does not have any output?

The routine that you shared seems ok to initialize UART in polling mode. However, your code does not show how the initialization of the TX and RX pins is done (probably you are doing this inside BOARD_InitPins ()  ). It could be the case that you will need to review that also.

Diego.

0 件の賞賛
返信