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.

Unsed pins ins f2802x microcontrollers

Which one of the following is better to do with unused GPIO pins keeping in mind that i cannot connect them to Vcc or GND externally?

1. Set them as Inputs with Internal Pull-up enabled

2. Set them as Outputs with Internal Pull-up enabled

3. Set them as Outputs with Internal Pull-up disabled

Thanks!

  • Jaspreet,

    We've had a long debate on this before at TI.  General consensus is that configuring them as outputs is best for noise immunity.  Also, drive the pin low (no sense having voltage on the pin).  I don't think the internal pull matters.  You certainly would NOT want to pull the pin in the opposite direction that you are driving it.  I'd say drive low, and leave the internal pull disabled.

    Regards,

    - David

  • Thanks for your reply David M. Alter.

    Actually we have PCB tracks running from some of the unused pins which are opened at the end. The pins were connected through 0R resistors initially which are now opened. Will it still be advisable to drive the pins as output, setting it low?

    Also, "Hardware Design Guidelines for TMS320F28xx and TMS320F28xxx DSCs" mentions the following,

    "Theoretically, non-critical inputs could be defined as output and left floating in the interests of not wasting power; however, it is generally a good idea to keep them in default input mode and tie them off."

    Thanks!

  • Hi Jaspreet,

    Adding to David suggestions, we personally keep the GPIOs open. Thus leaving to its default output state. Generally in mcu's it is recommended to assign the GPIO with some state (high or low) and not leave it in high impedance state.

    Regards,
    Gautam

  • Jaspreet,

    Jaspreet Singh said:

    Actually we have PCB tracks running from some of the unused pins which are opened at the end. The pins were connected through 0R resistors initially which are now opened. Will it still be advisable to drive the pins as output, setting it low?

    I'm not following you.  You have PCB tracks from some unused pins that are not connected to anything (other than the pins).  You also had 0 Ohm resistors connecting these unused pins, but now you've depopulated these resistors?

    You generally don't want to connect unused pins directly together.  If the SW developer makes a mistake you could get contention at two or more pins and get *POOF* (e.g., the coder accidentally sets one pin high, the other low).

    My recommendation is still to set unused GPIO pins as outputs and drive them low.

    Jaspreet Singh said:

    Also, "Hardware Design Guidelines for TMS320F28xx and TMS320F28xxx DSCs" mentions the following,

    "Theoretically, non-critical inputs could be defined as output and left floating in the interests of not wasting power; however, it is generally a good idea to keep them in default input mode and tie them off."

    There has historically been a lot of debate on whether one should tie off unused inputs, or configure them as outputs.  Different people will give you different answers.  From a noise immunity perspective, I think configuring them as outputs is better.  I figure if they are outputs, noise is not going to get input to the device as easily.  The pin is actively being driven as an output.  If you leave the pin as an input, the internal pull resistors are generally weak so you need to do something external.  Adding external pullups/downs adds cost and a needless complexity to the board layout.  Also, you don't want to just connect the unused pin to GND or VCC for the *POOF* reason I gave previously (i.e., coder makes a mistake and sets the pins as an output with opposite level to the tie off).

    Regards,

    David

  • Thanks David & Gautam. I will follow your suggestions.