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

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

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

Jump to solution
3,029 Views
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 Kudos
1 Solution
722 Views
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


View solution in original post

0 Kudos
2 Replies
723 Views
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 Kudos
722 Views
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 Kudos