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.

I2C/GPIO pin configuration



We are using an MSP430F471x6 processor.  I am doing a board redesign and we now need to use I2C on the MSP.  I will be using UCB1SDA and UCB1SCL (pins 81 and 82).  If we are using UCB1 for I2C, are the other UCB1 pins that are used when it is configured as SPI (pins 80 and 83 in our case) still able to be configured and used as GPIO.  I am 99% sure they can be, but just want to double check.

Thanks!

  • With the exception of the SD16 module and the JTAG pins, ALL MSP hardware modules require you to switch between module use and GPIO use by the PxSEL registers.
    If you use UCB1 for I2C, it does only need the SDA and SCL line. If you don't switch the other two lines to module use, they are free for GPIO.
    In fact, the modules will not notice if you do not switch ANY pin from GPIO to module usage. They will just output and input to/from the void.
    Only the SD16 can deactivate GPIO by itself through its register settings, overriding the PxSEL bits.

    The USCI can, however, control the input/output direction (required for 4-pin-SPI and I2C), overriding PxDIR. But only if the pin has already switched to module use. Other modules require PxDIR to be set properly.

    don't forget that the other two lines are shared with UCA1 and required (one or both) if you use it for SPI. (at least the USCIs on the 54xx chips do so)  If not, however, they are free for you to use as GPIO

**Attention** This is a public forum