Hi, i want to use LPUART2, on Tx(Port3_15) and Rx(Port3_14) pins in my mcxa153 frdm development board, and interfaced to a usb-to-uart converter, but I am not able to see any bytes if I send some string every one sec.
i have enabled the clock for port3 as given below,
CLOCK_EnableClock(kCLOCK_GatePORT3);
//release peripherals from reset.
RESET_ReleasePeripheralReset(kLPUART2_RST_SHIFT_RSTn);
RESET_ReleasePeripheralReset(kPORT3_RST_SHIFT_RSTn);
below is the settings i assigned to LPUART2 Rx (port3_14) port pin configuration,
port_pin_config_t port3_14_config = { kPORT_PullUp, kPORT_LowPullResistor, kPORT_FastSlewRate,
kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength,
kPORT_NormalDriveStrength, kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal,
kPORT_UnlockRegister};
PORT_SetPinConfig(PORT3, 14U, &port3_14_config);
below is the settings i assigned to LPUART2 Tx (port3_15) port pin configuration,
port_pin_config_t port3_14_config = { kPORT_PullUp, kPORT_LowPullResistor, kPORT_FastSlewRate,
kPORT_PassiveFilterDisable, kPORT_OpenDrainDisable, kPORT_LowDriveStrength,
kPORT_NormalDriveStrength, kPORT_MuxAlt2, kPORT_InputBufferEnable, kPORT_InputNormal,
kPORT_UnlockRegister};
PORT_SetPinConfig(PORT3, 15U, &port3_14_config);
//uart configuration settings
lpuart_config_t config;
LPUART_GetDefaultConfig(&config);
config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE; //115200
config.enableTx = true;
config.enableRx = true;
//initializes LPUART2
LPUART_Init(LPUART2, &config, DEMO_LPUART_CLK_FREQ); // clock freq is 12000000
uint8_t txbuff[] = "Lpuart polling example\r\n"; // message to be transmitted
//the below uart tx function is not working for LPUART2
I am calling it in while loop after after calling, I have given a delay also of around 50mSec.
LPUART_WriteBlocking(LPUART2, txbuff, sizeof(txbuff) - 1);
Please let me know what is wrong or am i missing something?