How to recognize 8-bit and 9-bit mode on serial line

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

How to recognize 8-bit and 9-bit mode on serial line

184 Views
masterboy
Contributor III

Hi, I am working on a project that uses the NXP imx 1060 processor. I am connecting the device to a serial line that can run in 8-bit or 9-bit mode. I am currently troubleshooting how to detect which mode is being used on the serial line and set the processor to read the data correctly accordingly. I have tried searching but have found nothing. So I wanted to ask if anyone could advise me how to do this. Thank you.

P.S.: I use NXP SDK.

0 Kudos
1 Reply

167 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The C3 register that contains the 9 bit is contiguous to the data register, so you could set the DMA transmission for two bytes width and filter the C3 register to only take the R8 or T8 bit depending on if you are receiving or transmitting. With this bit you can know which serial output is working.

I will suggest checking how the LPUART_ReceiveEDMA/LPUART_TransmitEDMA configure the DMA and modify the byte width and change the Date address for the C3 address.

Regards

0 Kudos