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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
3,983 次查看
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 解答
1,676 次查看
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 回复数
1,677 次查看
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 项奖励
回复
1,676 次查看
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 项奖励
回复