Define & control UART Signals (RTS / CTS / DTR / DTS)

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

Define & control UART Signals (RTS / CTS / DTR / DTS)

ソリューションへジャンプ
3,043件の閲覧回数
panpwr
Contributor IV

Hello,

I need to use HW flow control signals, but I've noticed they are not defined in my reference design (TWR-K60D100M).

I've read in the "MQX I/O User Guide" that the using ioctl() commands "IO_IOCTL_SERIAL_SET_HW_SIGNAL" (also similar Clear & Get commands), and the signal defines (IO_SERIAL_CTS, IO_SERIAL_RTS, etc.) - can be used to control the relevant signals.

How do I define & make use if these signals in MQX? How do I define some gpios as signals?

Thanks,

Lior.

0 件の賞賛
1 解決策
736件の閲覧回数
Luis_Garabo
NXP TechSupport
NXP TechSupport

Hi Panpwr,

The polling driver has configured to handle the CTS and RTS automatically. Please add this code lines after you open (fopen) the driver:

   SetFlags &= IO_SERIAL_HW_FLOW_CONTROL;
   ioctl(dbgport_ptr, IO_IOCTL_SERIAL_SET_FLAGS, &SetFlags);


Test and monitor the activity in CTS and RTS to see that it should work.

I hope this helps,

Best Regards,

-Garabo


元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
737件の閲覧回数
Luis_Garabo
NXP TechSupport
NXP TechSupport

Hi Panpwr,

The polling driver has configured to handle the CTS and RTS automatically. Please add this code lines after you open (fopen) the driver:

   SetFlags &= IO_SERIAL_HW_FLOW_CONTROL;
   ioctl(dbgport_ptr, IO_IOCTL_SERIAL_SET_FLAGS, &SetFlags);


Test and monitor the activity in CTS and RTS to see that it should work.

I hope this helps,

Best Regards,

-Garabo


0 件の賞賛
736件の閲覧回数
panpwr
Contributor IV

Thank you for the response.

How about the extended flow control lines (as defined in RS232 protocol = (DTR, DSR, DCD, RI)? How can I use it in the UART driver? I haven't seen any of these lines in the PIN scheme, so I guess I need to define GPIO's for that purpose.

0 件の賞賛