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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

655 次查看
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 项奖励
回复
1 回复

638 次查看
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 项奖励
回复