iMax RT1176 UART Hardware Flow control CTS RTS

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

iMax RT1176 UART Hardware Flow control CTS RTS

2,337件の閲覧回数
MN19000
Contributor III

Hi, 

I have requested to enable RTS/CTS for UART. I have received two different response from NXP TechSupport.

I am not sure which one is to use. Please review the following responses 

----------------------

NXP TechSupport

kerryzhou

I highly recommend you to read this application note:

https://www.nxp.com/docs/en/application-note/AN12679.pdf

This is the related software:

https://www.nxp.com/docs/en/application-note-software/AN12679SW.zip

======================

NXP TechSupport

 diego_charles

Currently we  have lpuart_hardware_flow_control demos for the RT10xx series. You can use as reference  lpuart_hardware_flow_control of the the RT1060 SDK. This demo simple enables the RTS/CTS pins and uses an config structure. The demo is intended to work on a self loopback mode. 

1060_lpuart_hardware_flow_control 

 

==========

I am using UART only (not Rs485) ,

Please guide me , do I need to manually control the RTS/CTS lines, or does NXP RT1176 does take care of RTS/ CTS lines?

 

Thanks

 

タグ(1)
0 件の賞賛
返信
6 返答(返信)

2,304件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @MN19000 ,

  Thanks for your question!

  In fact, no matter the 485 AN or the 1060_lpuart_hardware_flow_control, all use the hardware control, all can do the hardware control CTS,RTS.

  If you use the UART only, you can refer to the 1060_lpuart_hardware_flow_control, it's OK.

  To the AN which mentioned 485, in fact, still the UART control, just external connect the 485 chip.

  More details about the hardware control, the best document is the RT1176 RM UART chapter. Just control some register bit is OK.

Wish it helps you!

If you still have question about it, please kindly let me know.

If your question is solved, please help to mark the correct answer, just to close this case, thanks.

Any new issues, welcome to create the new question post.

Best Regards,

kerry

 

0 件の賞賛
返信

2,255件の閲覧回数
MN19000
Contributor III

Hi Kerry,

Thank you for reply. In 1060_lpuart_hardware_flow_control example, how do I check if RTS pin is Low or High?

 

In the example it just waits, but it does not check

 /* Delay for some time to let the RTS pin dessart. */
for (i = 0U; i < DELAY_TIME; i++)
{
__NOP();
}

 

Thanks

 

タグ(1)
0 件の賞賛
返信

2,241件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @MN19000 ,

  If you not believe the hardware control result, you can read the RTS signal level to judge it in the software.

 

Wish it helps you!

Best Regards,

kerry

0 件の賞賛
返信

2,225件の閲覧回数
MN19000
Contributor III

Hi Kerry,

The following command sets the RTS to active low: 
LPUART0->MODIR |= LPUART_MODIR_TXRTSPOL(0)

What command do I use to check the RTS signal level in software?

Thanks,

0 件の賞賛
返信

2,215件の閲覧回数
MN19000
Contributor III

Hi Kerry,

Any update on this case?  Thanks

====

The following command sets the RTS to active low: 
LPUART0->MODIR |= LPUART_MODIR_TXRTSPOL(0)

What command do I use to check the RTS signal level in software?

======

 

 

 

 

0 件の賞賛
返信

2,183件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @MN19000 ,

   Sorry for my later reply, as these days are our China May day holiday, we will back to work from 5.6.

What command do I use to check the RTS signal level in software?

=>Answer: As I told you, you just need to read the LPUART0->MODIR bit is really configured or not, if it is configured, then the hardware will control it, no other signal feedback.

If you must need to know it, you may readout the GPIO input data, whether it is really your configured value, you even can use hardware connect to another GPIO pin to read that signal.

Why you still need to know it in the software after the

LPUART0->MODIR |= LPUART_MODIR_TXRTSPOL(0)

?

Normally, when you control it, it will be pull the related signal in the pin directly.

 

Wish it helps you!

If you still  have question about it, please kindly let me know.

Best Regards,

Kerry

0 件の賞賛
返信