Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 7 months ago.
Hardware handshake of port UART1
I am a little confused with the pinout of mbed pin P0_1722, the official pinout and a user-generated pinout seem different on those pins: https://mbed.org/platforms/mbed-LPC1768/#schematics-and-data-sheets https://mbed.org/users/synvox/notebook/lpc1768-pinout-with-labelled-mbed-pins/
According to datasheet, P0_1722 are associated with UART1, as CTS DCD, DTR, RTS, while official Pinout doesn't label those pins this way.
Essentially my question is, is hardware hand shake implemented on mbed? Or I will need to implement hand share in software?
Another related question is, if I don't use DCD, DSR, RI, DTR pins of UART port 1, can I configure for other use while using UART1. I assume I can, but want to make it sure.
Thanks a lot in advance.
ZL
1 Answer
10 years, 7 months ago.
Hardware Flow Control has been implemented with RTC/CTS, see - SerialBase::set_flow_control(Flow type, PinName flow1, PinName flow2). If not used you can use those pins for the other functions as defined in the datasheet.
Hi Pramod Joglekar,
Thanks for answering my question. Could you provide some reference to SerialBase? I couldn't find it underneath Serial class. A simply search for SerialBase in mbed.org also didn't give me many hits.
Per the following discussion, RTS/CTS can be enabled by accessing registers: http://mbed.org/forum/mbed/topic/1306/
Edit: I found SerialBase in source library.
posted by 18 May 2014Probably a silly question: how exactly do I call that set_flow_control function?
I tried the following:
Serial Modem (P0_15, P0_16); This is the port on LPC1768/Mbed that supports hardware handshaking
Modem.set_flow_control(RTSCTS, P0_22, P0_17);
I got the following error message: Error: Class "mbed::Serial" has no member "set_flow_control" in "main.cpp"
According to another thread regarding hardware handshaking, this could be caused by no hardware support. But I am quite sure this particular port on LPC1768 does support handshaking. So I am a bit lost.
posted by 26 Aug 2014