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.
Solved! Go to Solution.
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
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
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.