MKL15Z32VFM4 :uart1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKL15Z32VFM4 :uart1

436 Views
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);

Labels (1)
0 Kudos
Reply
1 Reply

422 Views
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 Kudos
Reply