Will the config tools and LPUART_Init function support inverting the UART polarity?

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

Will the config tools and LPUART_Init function support inverting the UART polarity?

Jump to solution
256 Views
rj_engineer
Contributor III

Hi,

The CTRL register of the MCXA UART contains the TXINV (28) bit which control the polarity of the UART.

txinv_capture.png

However, the config tools doesn't expose this functionnality and the "LPUART_Init" function automatically unset this bit. The only solution found was to disable the RX and TX output (after the "LPUART_Init") to set the TXINV.

LPUART1_PERIPHERAL->CTRL &= ~LPUART_CTRL_TE_MASK;
LPUART1_PERIPHERAL->CTRL &= ~LPUART_CTRL_RE_MASK;
LPUART1_PERIPHERAL->CTRL |= LPUART_CTRL_TXINV_MASK;
LPUART1_PERIPHERAL->CTRL |= LPUART_CTRL_TE_MASK;
LPUART1_PERIPHERAL->CTRL |= LPUART_CTRL_RE_MASK;

 

This solution cause unnecessary rising edge on the UART lines.

Writing a custom UART init function is overkill and error prone.

 

The question is :

Is there any other "proper" way to invert the UART polarity and are the config tools scheduled to support this functionnality.

 

Sincerely,

Labels (1)
0 Kudos
Reply
1 Solution
196 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi @rj_engineer 

I'm sorry for replying to you late.

1. I have checked the config tool, and it indeed doesn't support this feature. I will submit a feature request to the config tool development team. Thank you
 
2. We can add this configuration through code, such as
 

LPUART_CTRL_TXINV(1); // Enable Transmit Data Inversion

 

Please contact me if still have any question. 

 

BR

Alice

View solution in original post

0 Kudos
Reply
2 Replies
197 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi @rj_engineer 

I'm sorry for replying to you late.

1. I have checked the config tool, and it indeed doesn't support this feature. I will submit a feature request to the config tool development team. Thank you
 
2. We can add this configuration through code, such as
 

LPUART_CTRL_TXINV(1); // Enable Transmit Data Inversion

 

Please contact me if still have any question. 

 

BR

Alice

0 Kudos
Reply
104 Views
rj_engineer
Contributor III
Thank you for the answer
0 Kudos
Reply