AnsweredAssumed Answered

Source Clock for LPUART on imxrt1062

Question asked by Ryan Cusack on Jan 8, 2020
Latest reply on Jan 8, 2020 by Mark Butcher

Hello,

 

I am working on setting up a UART configuration on a imxrt1062. 

The configurations I have used are as follows:

 

LPUART_GetDefaultConfig(&user_config);
user_config.baudRate_Bps = 115200U;
user_config.enableTx = true;
user_config.enableRx = true;
user_config.parityMode = kLPUART_ParityDisabled;
user_config.dataBitsCount = kLPUART_EightDataBits;
user_config.isMsb = false;
user_config.stopBitCount = kLPUART_OneStopBit;
user_config.txFifoWatermark = 0;
user_config.rxFifoWatermark = 1;
status =LPUART_Init(LPUART6,&user_config, 20000000U); //fsl_lpuart.c example configuration

 

 

I am testing with a simple echo.

 

while (true) {
   LPUART_ReadBlocking(LPUART6, test, 1);
   LPUART_WriteBlocking(LPUART6, test, 1);

}

 

I need to send and receive data through the Rx and Tx pins.
I have verified that I have the correct data on the Rx pin, but the data is not received in the correct format. I think this has to do something with the source clock. 

 

If anyone can point me in the right direction that would be appreciated. Hopefully a correct source clock will solve my issues.

Outcomes