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.

UART without flow control

Other Parts Discussed in Thread: TM4C1294NCZAD

With regard to the TM4C1294NCZAD microcontroller:

What are the rules about leaving some of the pins of an interface unassigned? For example, if I use the UART interface, but don’t need flow control, can I just leave CTS (clear to send) unassigned? If we don’t have a physical pin assigned to CTS, do we have to do anything in code to simulate CTS in the TRUE state to allow data transfer to proceed? We don’t want the interface to wait forever for the non-existent CTS signal to go to the true state.

  • Kai Johnson said:
    If we don’t have a physical pin assigned to CTS, do we have to do anything in code to simulate CTS in the TRUE state to allow data transfer to proceed?

    UART hardware flow-control can be enabled by the CTSEN and RTSEN bits. See section 16.3.6.2 Flow Control in the TM4C1294NCZAD datasheet. i.e. if the CTSEN bit in clear hardware flow control is disabled and data can be transmitted regardless of the state of the CTS input.

  • Kai,
    Did this answer your question?
  • Indeed it did. Thank you for your prompt response!

  • May I add that such, "Flow Control" must be "equalized" on (both) ends of the UART link. Disabling flow control on one end will not succeed if the (other) end expects it.

    Those pins which are removed from UART HW control (still) must be configured/managed so that they do not float. Usually configuring them as "Inputs w/weak pull-up resistors" proves effective. Even though - excess to needs (now) - my firm routes each/every such MCU GPIO to a board header. (in the recognition that "one day" need for such a pin will dawn!)

  • This brings up a more general question: Is it acceptable to leave unused I/O pins unconnected, with the firmware setting them up as inputs with weak internal pull-ups? Or is it better to connect external pull-up resistors to unused I/O pins?

  • Opinions vary somewhat on this. I am of the opinion that you need to add pull-ups (or dn). The additional benefit of doing so is it gives you a place to put probes. In fact I prefer, when it has no bad side effects, to also add a header for easier probing and for making it easy to add circuitry to test later. Include Vcc and Gnd and you have something vice for probing or add-ons.

    Robert
  • If I may - for how long do you expect those I/O pins to (remain) unconnected/unused? I will bet you (and win) that in time - you'll find use for most all pins (now) characterized as unused.

    Believe that - beyond your pull-up R issue - one of greater impact is the, "routing of those (unused) pins to your board's edge headers!" You do not want to, "tack solder" to the MCU pins - to harvest them for future use.

    To your pull-up treatment - cannot you design your layout such that those "pulling Rs" may be, "Up or Down" - w/the result dictated by selective placement of the R. (i.e. you may pull-up or pull-down - different resistors or one R - w/path to VDD or VSS - proves far more flexible...