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.

MSP430F5438A UCA3 SPI

Other Parts Discussed in Thread: MSP430F5438A

Hello: (TI Support Personnel)

I have a hardware question that I was trying to confirm.

I am trying to use the MSP430F5438A  UCA3 SPI.

If I select the UCA3CLK, UCA3SIMO and UCA3SOMI (P10SEL.3,4 and 5 = 1) can I use P10.3/UCB3CLK/UCA3STE  as GPIO P10.3 (P10SEL.3=0)?

Please refer to Note (3) on P. 87 of the MSP430F5438A Specification:

(3) UCA3CLK function takes precedence over UCB3STE function. If the pin is required as UCA3CLK input or output, USCI A3/B3 is forced

to 3-wire SPI mode if 4-wire SPI mode is selected.

Does this mean that UCA3STE is disabled and UCA3CTL0 (UCMODEx) reverts to 00 no matter what  is set for UCMODEx?

I just want to make sure it functions exactly as I am reading these notes.

Thank you in advance.

jdp

  • Hi JDP,

    I can't speak for TI support personnel, but yes you can use P10.3 as GPIO if P10SEL.3 = 0, no matter what configuration you have in the USCI.

    The notes in the data sheet mean that the CLK function takes precedence over the STE function if you configure the USCI to use the one pin for both functions.

    If you configure USCI A for 4-wire SPI, you will only get 3-wire SPI if USCI B is trying to use that pin for UCBnCLK.

    If you configure USCI B for 4-wire SPI, you will only get 3-wire SPI if USCI A is trying to use that pin for UCAnCLK.

    Essentially the documentation is trying to tell you what will happen if you configure the MCU in a way that doesn't make sense.  Telling the USCI to use the same pin for two different functions doesn't make sense.

    Jeff

  • Jeff is right.

    The somewhat complicated description basically means that you cannot have 4-wire SPI on USCIA when you want to use USCIB and you can only use 4-wire SPI on USCIB together with UART on USCIA. In every other combination, 3-wire mode is used.

    The assignment of port pins for GPIO or module use has preference in any case, so if you do not set the PxSEL.y bit, the port pin is GPIO, even if the UART wants to use it. (depending on the input circuitry, the UART may be able to still listen to the pin, ot it will jsu tget the latched value form when the pin was the last time selected for module use)

    There are some exceptions: analog inputs and even outputs (D/A, Vref) can be active even if the port is in GPIO mode. Then conflicts may occur. Also, in some (few) cases, there are control bits in a module which interfere with the port pin control (e.g. deactivate the output driver even if in GPIO mode etc.) But that's a very rare case, I think some variants of the SD16 or ADC10 do this, to reduce the influence of input leakage currents etc.

**Attention** This is a public forum