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

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

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

ソリューションへジャンプ
397件の閲覧回数
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,

ラベル(1)
0 件の賞賛
返信
1 解決策
337件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
338件の閲覧回数
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 件の賞賛
返信
245件の閲覧回数
rj_engineer
Contributor III
Thank you for the answer
0 件の賞賛
返信