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.

msp430f6733: Setting the P1.4 as UART_RxD, and the same time enabling the pull-up

Other Parts Discussed in Thread: MSP430F2416

Hello,

Is it possible to set the P1.4 as UART_RxD, and the same time pull-up enabled ?

Updated question:   Is it possible to set the P1.4 as UART_RxD, and the same time enable the pull-up ?

Best regards,

-n

  • Hi,

    First, let me ask: why are you trying to enable a pin as UART with a pullup resistor? UART is a directly driven line from the transmitter, which means the pullup doesn't do anything for you.

    Mike
  • If you believe the schematic on page 84 of the datasheet, the P1SEL bit inhibits the pull-up resistor.

    Just use a separate resistor. If you want to save components, connect the signal to both UART_RxD and some other pin that is configured as GPIO input.
  • Yes, it is "possible" to do that. But at best you end up wasting your effort, and at worst the UART might not work.

    The internal pull-up/down is intended for GPIO pin used as input only.
  • Sirs,
    I appreciate your responses. Very clear. My DS reading was not sufficient.
    -n

    I resumed.

  • I was asking this question myself some time ago as well, but somehow forgot about further investigation. The reason why I wanted to do it was a floating RX line if a connector to other hardware was not connected, so I wanted to pull it high when not in use. I decided to use an external resistor, but I still don't know if the internal one would work.
  • From what I've heard, it works, but only on some MCU models. And I'm not sure if the I/O schematics in the datasheet are always correct in this regard.

    In other words: it might work, but you should not rely on it.

  • Clemens,

    >> If you believe the schematic on page 84 of the datasheet, the P1SEL bit inhibits the pull-up resistor.

    I'm trying to study your words but my conclusion doesn't match. Can I have your advice again ?

  • Sirs, I'm sorry for my race condition,

    Then, could you please say the latest comment again ?
    Is that the one from Clemens ?

    c >>
    From what I've heard, it works, but only on some MCU models. And I'm not sure if the I/O schematics in the datasheet are always correct in this regard.
    In other words: it might work, but you should not rely on it.
    << c

    Honesty speaking, I'm not sure if my customer will understand your words.
  • It is not allowed to set PxREN.y when the pin is not in GPIO mode, i.e., when PxSEL.y = 0.
    On most MCUs, this does not work anyway. But if it works, then only by accident, and this might change in the next chip revision.

    To the question "is it possible?", the answer is "maybe, but don't do it".

  • I never saw anything saying "YES, YOU CAN" or "NO, DON'T DO THAT" - is there a statement about that somewhere in the User's Guide? Anyway, since I never saw it mentioned, I would go for the external one, just to be sure it definitely works as expected.

  • Okay, I looked through a big pile of User's Guides, and none of them say anything about this. The only exception is the 2xx Family User's Guide, section 8.2.5:

    NOTE: Setting PxREN = 1 When PxSEL = 1

    On some I/O ports on the MSP430F261x and MSP430F2416/7/8/9, enabling the pullup/pulldown resistor (PxREN = 1) while the module function is selected (PxSEL = 1) does not disable the logic output driver. This combination is not recommended and may result in unwanted current flow through the internal resistor. See the device-specific data sheet pin schematics for more information.

    The output driver is not what we're talking about here, but this note seems to imply that enabling PxREN when PxSEL=1 might actually be possible.

    Anyway, the note mentions the device-specific data sheet pin schematics, so I guess they are meant to be correct. (Which implies that on the F6733, PxSEL = 1 does not disable the pull-up resistor unless PxMAP is also set to PMAP_ANALOG.)

  • Yes, might be the case, but even here I would go for the external one since the statement still does not say YES or NO. So as you say, it might "work" somehow, but I wouldn't feel comfortable with it.
  • Do you agree to my summary? : "Don't believe the DS schematics. Just put an external pull-up/down."   ~ I'm afraid it would be short-sighted.

    Anyway if everyone agrees, I'm a disty FAE, therefore I would ask your datasheet team to correct the schematics before closure.

  • In my opinion I would add the external one to be on the safe side.
    And I agree that there should be a clear statement in the User's Guide about using the resistors with a special function enabled. It is not only the UART - a pulse counting timer module could have a floating input with an external sensor currently not connected as well, for example, so using the internal resistor could be useful for every digital input configured as special function.

    To go one step further: It would be great if there would be selectable internal pull-up resistor values for the I²C line, let's say three values for a different number of slaves and / or transmission speeds. Or even three resistor values that can be used at the same time by setting their resistor bit to achieve values in between by having them in parallel.

  • Sorry, I misread the datasheet; I overlooked the PMAP_ANALOG AND gate.

    As far as I can see, on the F6733, the pull-up resistor of pin P1.4 can be enabled, even for UART_RxD.
  • Sirs,

    I would try again to wrap-up. Please correct if any:

    Q.  Is it possible to set the P1.4 as UART_RxD, and the same time enable the pull-up ?

    Ans. YES. On the F6733, the pull-up resistor of pin P1.4 can be enabled, even for UART_RxD.    ~~(From Clemens' post)

    (Dennis, please forgive me too specific to UART.)

  • No replies, therefore I think my wrap-up was accepted.

  • My two cents: if port schematics show that pull-up can be enabled and it will be active while I/O connected to peripheral, then you shall rely on it. Otherwise it would mean datasheet error that must be corrected by TI immediately.
  • Hideaki Nambu said:

    No replies, therefore I think my wrap-up was accepted.

    You, the originator of this thread, is the only only one that should decide whether this your question is "answered". Others can only try to suggest" an answer.

  • It is not me, I think. I'm glad if you could request TIers to put a conclusion here. Then I can push the green button.

**Attention** This is a public forum