I am using lm4f232 for gprs data transmission. we use UART 1 for transmission and I don't know how to setup hardware flow control in UART1.Any one give advice to me.
Thanks in advance.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using lm4f232 for gprs data transmission. we use UART 1 for transmission and I don't know how to setup hardware flow control in UART1.Any one give advice to me.
Thanks in advance.
This request could mean almost anything...
Do you mean "how do I set up the pins on the processor?" See section 14 of the LM4F manuals.... They explain the pin usage (somewhat) and location.
Do you mean what is the software protocol for controlling the DSR/DTR RTS/CTS lines plus DCD etc? I checked -- they actually have the lines on the LM4F series -- at least for UART 1 -- so it should be easier to control a MODEM.
The real issue is "What is the protocol for the particular GPRS device?" -- because it will have a particular way of interpreting the control lines.
I am further assuming that one can control or read or ignore the lines on the LM4F device as one wishes. So the real issue is the GPRS device -- and you have said nothing about it.
Presumably there is documentation for the device that explains how the device interprets the Control/Handshaking lines -- that will tell you what you want the LM4F to do. (Or it should.)
Poster Dave has well defined/detailed. Assuming that you've "mastered" the "non" Flow Control aspect of Uart operation - it should be relatively simple to employ either a spare MCU GPIO pin (configured properly to "drive" or receive the MCU's standard flow control pins) or a simple dip switch to drive these flow control pins.
Again - devil always in the detail - the operation of your MCU and your accessory Uart Controlled device both must be "investigated." Simple dip switch idea I've included is a quick/easy means for you to confirm your MCU's handling of these flow-control pins...
Dave Robinson said:The real issue is "What is the protocol for the particular GPRS device?" -- because it will have a particular way of interpreting the control lines.
Well, it should be standard; after all, the 16550-style UARTS (as used in PCs) just do this in hardware - with no option of configuration.
(I haven't investigated the Stellaris 'M4s yet - don't know the extent/lack of flow control capability in the UART hardware)
cb1_mobile said:devil always in the detail
Too true!
cb1_mobile said:operation of your MCU and your accessory Uart Controlled device both must be "investigated." Simple dip switch idea I've included is a quick/easy means for you to confirm your MCU's handling of these flow-control pins...
Good idea.
This little utility allows you to manually control the PC's RTS & DTR lines, easily adjust baud rates, and see the states of the CTS & DSR lines from the modem:
@Andy-
We won't see yet "more" of Prince Harry if we vector to such UK site - you so solemnly swear...
While we appreciate your PC Utility - should we not "Caution" OP that PC levels are too high for MCU - and must be "level converted" prior to such MCU introduction?
cb1_mobile said:PC levels are too high for MCU - and must be "level converted" prior to such MCU introduction?
Absolutely!
These days, rather than a traditional "level Converter" (aka RS232 Transceiver) I would use a direct USB-to-UART logic-level cable such as this:
http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
(in fact TI include them with some of the Stellaris kits)
I've just got one of these:
http://www.ftdichip.com/Products/Modules/DevelopmentModules.htm
But yet to try it out...
Andy:
That utility could be useful. I usually just "roll my own" since I use Delphi and a decent comm lib.
However, my comments stand that one must line up RS232/Serial devices and see what the claims are for these signals. I was designing RS232 equipment in the day (since late 1960's) when 99.9% of equipment hooked to a modem or a "serial" printer. Even then I laughingly referred to it as "RS232 -- the Standard that isn't.". It is much worse since then -- it seems that everyone re-interprets that "standard" to mean whatever they think it means -- see the words of Humpty Dumpty in "Alice in Wonderland/Through The Looking Glass" -- "Words will mean whatever I want them to mean" -- that Humpty Dumpty...
I continue to suggest that people always "line up" the standards of the devices chosen and proceed accordingly.
As for moderation -- maybe that site influenced you to "Speak English" -- instead of proper American (huh?) and the automatic Spam filters went into a tizzy!
Dave Robinson said:That utility could be useful. I usually just "roll my own" since I use Delphi and a decent comm lib.
Thanks. It's in Borland C++ Builder - so the GUI framework is the same as Delphi - and uses AsyncPro as the comm lib.
Hi,
I very much Thanks about this valuable information.Sorry for late reply. My GPRS module is SIMCOM900B.And I transmit data through TCP/IP protocol.And interface between MCU and Module through rs232(UART1)..In SIMCOM has 6 pin related to hardware flow control(RTS/CTS/DTR/DCD/DSR/RI). And interface those pin with UART1.
And I saw API function related to flow control in peripheral driver library(in LM4F232).
that is ...1) void UARTFlowControlSet(unsigned long ulBase,unsigned long ulMode) and ..2) void UARTModemControlSet(unsigned long ulBase, unsigned long ulControl)
first one is to set in hardware flow control mode.
and in my doubt is in the control signal...Does MCU itself control its(RTS/CTS/DTR/DCD/DSR/RI) state?..or ..Are we going to set or clear these pins according to the flow control setup?..reply me ....Thanks in advance..
sathishkumar sekar said:SIMCOM has 6 pin related to hardware flow control(RTS/CTS/DTR/DCD/DSR/RI).
They are not all related to hardware flow control; eg, RI is Ring Indicator - nothing to do with Flow Control!
sathishkumar sekar said:Does MCU itself control its(RTS/CTS/DTR/DCD/DSR/RI) state?
The Datasheet will tell you that.
Five minutes basic experimentation w/dip switch, pull-up R will "unlock" secrets of MCU's Flow Control.
You don't acknowledge multiple precautionary advice re: mismatch of levels between PC or Serial source and your MCU. Mistake here will likely prove fatal to your MCU...