AnsweredAssumed Answered

LPUART 9 bits data mode

Question asked by Ming Jiang on Oct 20, 2015
Latest reply on Oct 29, 2015 by Hui_Ma

Under Component Inspector window, I had lpuart1 configured with 9 bits data, and parity mode disabled. The 9th bit is utilized as address wake up. I was unable to  set the 9th bit to high for the first byte in my data packet. The API LPUART_DRV_SendData() only allows me to send 8-bits data byte. I was trying to use LPUART_BWR_CTRL_R9T8() to set T8 bit to "1" but it didn't work, the 9th bit is still read as "0". How do I set the initial byte's 9th bit to "1" and clear it to "0" for the subsequent bytes? The following is the start of my transmission and obviously it doesn't work.

 

                LPUART_BWR_CTRL_R9T8(base, 1); // set 9th bit to 1, that's my intention

 

                LPUART_DRV_SendData(FSL_LPUARTCOM1, &txBuff1, 1U);  // Send first byte

                lpuartState->isTxBusy = true;

 

               // Tx interrupt enabled

                LPUART_HAL_SetIntMode(base, kLpuartIntTxDataRegEmpty, true);

                LPUART_HAL_SetIntMode(base, kLpuartTxComplete, true);

Outcomes