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.

MSP430F2471: Digital I/O status after Reset

Guru 24520 points
Other Parts Discussed in Thread: MSP430F2471, MSP430F249, MSP430F2252

Hi Community member,

Please let me confirm the following question.

[Question]

 Would you please teach me all digital I/Os status on MSP430F2471 after reset?

It seems that the all pins status are set as GPIO and set as input pin.

Is my understanding correct?

Regarding to user's guide for MSPx2xx family, it is described about device initial conditions as below.

> 2.1.2 Device Initial Conditions After System Reset
> I/O pins are switched to input mode as described in the Digital I/O chapter.

But I could not find the description about the I/O pins status after reset in the Digital I/O chapter.

If you have any questions, please let me know.

Best regards.

Kaka 

  • Hi Kato,

    This would be my normal answer to your question:

    it is given in the user's guide.

    Digital I/O is chapter 8 (page 327). Go to the end of the chapter - there the registers are described (8.3) - and you can also see the initial state of each registers.

    But you're absolutely correct - it is missing in this document. I'm using this user's guide for several years now and I never noticed that. , could you have a look at it?

    But to answer your question: The registers are 0x00 after startup (except from PxIN, of course - these are random and can change their state as long as the pin is floating and set to input), so you're correct, they are set to inputs with high impedance.

    Dennis

  • Hi Dennis,

    Thank you for your response.
    Please let me confirm the following question.

    [Question]
    Would you please teach me the all pins status during reset (i.e. the nRST/NMI pin is held low)?

    If you have any question, please let me know.
    Best regards.
    Kaka
  • Hi Dennis,

    I'm looking at the latest SLAU144 rev J (www.ti.com/.../slau144) and I see section 8.3 (now on p. 333). This lists in the right-most column the "initial state" of each register.

    The pins will be set as inputs. Please note one thing different than your answer - the PxOUT registers are marked "unchanged" - basically, this register is not cleared by a reset, so if you had something in it before and do a PUC reset, the value will still be there. If you are coming up from an un-powered device I believe this register will be undefined (if you check our 5xx user's guide, it is marked undefined). One other note is Port 2, the P2SEL register will come up as 0x0C0 - I believe this selects XT1IN and XT1OUT function for the crystal pins.

    Regards,
    Katie
  • OK, so this column is all? If I compare it to other user's guides, there is missing this overview:

    (This is from FR6989 user's guide)

    But I had a look in my printed SLAU144 from 2008 (revision E) and it does not have this overview as well, so it has obviously never been there. Good to know - I was always thinking that PxOUT is 0x00 after startup, since I have never seen anything different to that in the register overview in CCS immediately after flashing the program (before running it). Anyway, first thing I always do is configuring every register of the digital I/O. Thanks for clearing things up!

    Dennis

  • Hi Dennis,

    Yes, essentially the same data is there, it is just presented differently. I will file an enhancement on the F2xx user's guide SLAU144 though, because it would be nice if it were shown in a style more consistent with the other guides. It currently may be different simply because it is an older device family and we probably changed the format on later parts (like with 5xx).
     
    -Katie

  • Hi Katie,
    Please let me confirm about your comments.
    >One other note is Port 2, the P2SEL register will come up as 0x0C0 - I believe this selects XT1IN and XT1OUT function for the crystal pins.
    Can we confirm this behavior for MSP430F2471?
    MSP430F2xxx family does not share the crystal pins with Port2.

    Also please provide your comments for my question....
    [Question]
    Would you please teach me the all pins status during reset (i.e. the nRST/NMI pin is held low)?

    If you have any questions, please let me know.
    Best regards.
    Kaka
  • Hi Kaka,

    I just tested this on a couple of devices - one that has the muxed XIN/XOUT pins (MSP430F2252) and one that does not (MSP430F249, which is on the same datasheet as your MSP430F2471 device). On the device with the muxed XIN/XOUT pins, P2SEL came up as 0xC0 as shown in the user's guide. On the device without the dedicated XIN/XOUT pins, P2SEL came up as 0x00 so the pins start still as inputs. So it looks like P2SEL is only set for 0xC0 if there are XIN/XOUT muxed with those pins, but if XIN/XOUT aren't muxed (like On F2471) then P2SEL is 0 like all the other PxSEL registers. I will note this as well for getting improved in the documentation to make this distinction.

    Kaka said:
    Also please provide your comments for my question....
    [Question]
    Would you please teach me the all pins status during reset (i.e. the nRST/NMI pin is held low)?

    I could not seem to find this in the datasheet spec, but I think that the pins will be in their default state (inputs). Because of this, there could be extra current consumption because the pins are floating, so it is probably best not to hold the part in reset all the time but rather reset and then have code to put it in a low power state or something: http://processors.wiki.ti.com/index.php/MSP430_FAQ#What_is_the_state_of_GPIO_when_the_device_is_in_reset_state.3F http://processors.wiki.ti.com/index.php/MSP430_FAQ#Power_consumption_in_RESET_state

    Can you please let me know a little about why you are asking this question about the pins while held in RST?

    Regards,

    Katie

  • Hi Kaite,

    Thank you for your kindly response.
    I explain to you about background of this question in simply as below.
    My customer would like to know whether it need to take measures the latch-up by setting the pin in case of taking a long reset time.

    If you have any questions, please let me know.
    Best regards,
    Kaka
  • Kaka said:
    My customer would like to know whether it need to take measures the latch-up by setting the pin in case of taking a long reset time.

    I was a little unclear on what you meant by this. They just want to know the state of the pin during reset, or are they thinking about having to hold the part in reset for some time?

    Just as a note, I don't know if this is the case, but please make sure that if any voltage is applied to the device pins, it must not go beyond 0.3V + Vcc. So if the device is unpowered (Vcc = 0) it is not recommended to have any voltage >0.3V applied on any of the device pins, even if you are holding reset low, because this is out-of-spec (see the recommended operating conditions and absolute max ratings of the part) - you would want to have a voltage on Vcc. Just a note - not sure if your customer is doing that, but something to be aware of.

    Regards,

    Katie

  • Hi Katie,

    Thank you for your comments. And I apologize for confusing you.
    They just want to know the state of the pin during reset.

    They would like to use some pins as output direction but MSP430 will be "input" direction during reset state and until setting the pin direction them. So, they would like to know the timing of changing the state of pins.

    Best regards.
    Kaka
  • Kaka,

    if the pins of the microcontroller are used as outputs to control a FET, for example, then you should always use pull-up/down resistors to provide a defined voltage level until the microcontroller's pins are switched from inputs to outputs and drive the connected part.

    Dennis

**Attention** This is a public forum