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

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

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

1,073 Views
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

Labels (1)
0 Kudos
Reply
3 Replies

967 Views
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!
-----------------------------------------------------------------------------------------------------------------------

967 Views
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 Kudos
Reply

967 Views
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 Kudos
Reply