How to configure KL46Z UART1 to support 9-bit character length ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to configure KL46Z UART1 to support 9-bit character length ?

685件の閲覧回数
jeromebrillant
Contributor I

Hello NXP,

I am developing an application using FRDM-KL46Z HW, MCUXPresso v10.0.0 and SDK_2.2_FRDM-KL46Z.

In my use case, the UART1 is used to receive a 9-bit length data, 1 stop bit, no parity, 4800bps.

KL46Z reference manual mentions that this "9-bit character lenght" is supported by the UART1 HW. Nonetheless, it seems the SDK APIs do not offer that feature.

Do you have any driver example showing how to enable that "9-bit length" functionality ?

Best regards,

Jérôme

ラベル(1)
0 件の賞賛
3 返答(返信)

579件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Jerome Brillant,

     Actually, the 9 bit is very simple, you can find the according information in the KL46 reference manual:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

About the configuration, you can use the register to control it directly.

 UART1_C1 |= UART_C1_M_MASK;

Wish it helps you!

If you still have question, please let me know!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

579件の閲覧回数
jeromebrillant
Contributor I

Hello Kerry,

Thank you for pointing the relevant information. Based on your feedback, I have the 9-bit mode working now.

Best regards,

Jérôme

0 件の賞賛

579件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Jerome Brillant,

    Thank you very much for your updated information, and that's very good to hear you make it working.

    If you have the new questions in the future, welcome to create the question post in our community!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛