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.

MSP430FR5969 PxSEL Module functions order

Other Parts Discussed in Thread: MSP430FR5969

Hi.

I am currently developing a firmware for MCU MSP430FR5969 Using SPI interface for communication.

On User Guide Page 339 I found a small section on Function Select Registers(10.2.5) with a chart outlining bitwise operations to select primary/secondary/ternary module function for each pin.

http://www.ti.com/lit/ug/slau367e/slau367e.pdf

I was able to find which GPIO/primary/secondary/ternary (and even more than 4) module function are available for each pin on this MCU by reading page 11 of MSP430FR59XX Mixed-Signal Microcontrollers (Rev.D)

http://www.ti.com/lit/ds/symlink/msp430fr5969.pdf

However, I am having a hard time discerning each module function's ORDER (i.e. which of them is primary or secondary. etc...)  within their corresponding pin.

Any reference/chart or clues are all welcome.

Thank you folks!

  • I do not think the ORDER matters. As long as you can select a pin for the role you want it to play, why do you care its ORDER? See Tables 6-47 through 6-60 in that data-sheet for exactly how to select.
  • Thank you for a quick response.

    I just wanted to clarify a little bit more of my problem

    I looked through a pin diagram on page 6 of following document.

    http://www.ti.com/lit/ds/symlink/msp430fr5969.pdf

    I was interested in P2.5 and P2.6 (Pin 20 & 21).

    I am trying to use SPI Communication. At Pin 20 of the diagram, I read P2.5/TB0.0 /UCA1TXD/UCA1SIMO.

    To my current understanding, each sections separated by slashes represent following:

    GPIO FIRST SECONDARY
    P2.5 TB0.0 UCA1TXD/UCA1SIMO
    P2.6 TB0.1 UCA1RXD/UCA1SOMI

    If I am understanding correctly, UCA1TXD/UCA1SIMO is SECONDARY module function, not UCA1TXD and UCA1SIMO listed as secondary and ternary module functions respectively. Here is why I think so.

    This is an example code from IAR Workbench for 430.

    /*
    * Select Port 2
    * Set Pin 5, 6 to input Secondary Module Function, (UCA1TXD/UCA1SIMO, UCA1RXD/UCA1SOMI).
    */
    GPIO_setAsPeripheralModuleFunctionInputPin(
    GPIO_PORT_P2,
    GPIO_PIN5 + GPIO_PIN6,
    GPIO_SECONDARY_MODULE_FUNCTION
    );

    I successfully used this function to run SPI communication using block A1 which uses pin 2.5 and 2.6.

    I will attach this wrapper function's definition at the end of my question

    Here, UCA1TXD/UCA1SIMO seems to be a single secondary module function even though separated by a slash. I do understand that by selecting other mode (UART) than SPI would mean that instead of UCA1SIMO, UCA1TXD would be used.

    However, there are many cases where the role/meaning of slashes become difficult to understand.

    For example,

    EX1)

    P2.0/    TB0.6/    UCA0TXD/UCA0SIMO/    TB0CLK/ACLK 

    Here, UCA0TXD/UCA0SIMO/ seems to be the secondary module function and TB0CLK/ACLK a ternary one.

    EX2)

    P3.3/        A15/    C15 

    Here, A15 seems to be the secondary module function and C15 a ternary one.

    EX3)

    P1.0/      TA0.1/      DMAE0/    RTCCLK/A0/C0/VREF-/VeREF- 

    Here, I have no idea which of which are secondary or ternary.

    Are there any reference/data sheet where these are clearly outlined/explained?

    Any further help would be highly appreciated. Thank you!

    *Definition of example function outlined above.

    //*****************************************************************************
    //
    //! \brief This function configures the peripheral module function in the input
    //! direction for the selected pin for either primary, secondary or ternary
    //! module function modes.
    //!
    //! This function configures the peripheral module function in the input
    //! direction for the selected pin for either primary, secondary or ternary
    //! module function modes. Accepted values for mode are
    //! GPIO_PRIMARY_MODULE_FUNCTION, GPIO_SECONDARY_MODULE_FUNCTION, and
    //! GPIO_TERNARY_MODULE_FUNCTION
    //!
    //! \param selectedPort is the selected port.
    //! Valid values are:
    //! - \b GPIO_PORT_P1
    //! - \b GPIO_PORT_P2
    //! - \b GPIO_PORT_P3
    //! - \b GPIO_PORT_P4
    //! - \b GPIO_PORT_P5
    //! - \b GPIO_PORT_P6
    //! - \b GPIO_PORT_P7
    //! - \b GPIO_PORT_P8
    //! - \b GPIO_PORT_P9
    //! - \b GPIO_PORT_P10
    //! - \b GPIO_PORT_P11
    //! - \b GPIO_PORT_PA
    //! - \b GPIO_PORT_PB
    //! - \b GPIO_PORT_PC
    //! - \b GPIO_PORT_PD
    //! - \b GPIO_PORT_PE
    //! - \b GPIO_PORT_PF
    //! - \b GPIO_PORT_PJ
    //! \param selectedPins is the specified pin in the selected port.
    //! Mask value is the logical OR of any of the following:
    //! - \b GPIO_PIN0
    //! - \b GPIO_PIN1
    //! - \b GPIO_PIN2
    //! - \b GPIO_PIN3
    //! - \b GPIO_PIN4
    //! - \b GPIO_PIN5
    //! - \b GPIO_PIN6
    //! - \b GPIO_PIN7
    //! - \b GPIO_PIN8
    //! - \b GPIO_PIN9
    //! - \b GPIO_PIN10
    //! - \b GPIO_PIN11
    //! - \b GPIO_PIN12
    //! - \b GPIO_PIN13
    //! - \b GPIO_PIN14
    //! - \b GPIO_PIN15
    //! \param mode is the specified mode that the pin should be configured for the
    //! module function.
    //! Valid values are:
    //! - \b GPIO_PRIMARY_MODULE_FUNCTION
    //! - \b GPIO_SECONDARY_MODULE_FUNCTION
    //! - \b GPIO_TERNARY_MODULE_FUNCTION
    //!
    //! Modified bits of \b PxDIR register and bits of \b PxSEL register.
    //!
    //! \return None
    //
    //*****************************************************************************
    void GPIO_setAsPeripheralModuleFunctionInputPin(uint8_t selectedPort,
    uint16_t selectedPins
    , uint8_t mode)
    {
    uint16_t baseAddress = GPIO_PORT_TO_BASE[selectedPort];
    
    #ifndef NDEBUG
    if (baseAddress == 0xFFFF)
    return;
    
    #endif
    
    // Shift by 8 if port is even (upper 8-bits)
    if ((selectedPort & 1) ^ 1)
    selectedPins <<= 8;
    
    HWREG16(baseAddress + OFS_PADIR) &= ~selectedPins;
    switch (mode) {
    case GPIO_PRIMARY_MODULE_FUNCTION:
    HWREG16(baseAddress + OFS_PASEL0) |= selectedPins;
    HWREG16(baseAddress + OFS_PASEL1) &= ~selectedPins;
    break;
    case GPIO_SECONDARY_MODULE_FUNCTION:
    HWREG16(baseAddress + OFS_PASEL0) &= ~selectedPins;
    HWREG16(baseAddress + OFS_PASEL1) |= selectedPins;
    break;
    case GPIO_TERNARY_MODULE_FUNCTION:
    HWREG16(baseAddress + OFS_PASEL0) |= selectedPins;
    HWREG16(baseAddress + OFS_PASEL1) |= selectedPins;
    break;
    }
    }

  • I do not know the answer to your question.

    However, I do recommend that:

    For P2.5 and P2.6, see Table 6-52 on page 88.
    For P2.0, see Table 6-55 on page 85.
    For P3.3, see Table 6-54 on page 91.
    For P1.0, see Table 6-47 on page 81.

    I think the terms primary, secondary, and ternary are very subjective. If you can make a pin to function as you intended, it does not matter if doing so is trendy, fashionable, popular, or whether that is the primary usage or not.
  • At the end of the datasheet is a list of the port pin schematics. Along with the schematics is a truth table. It tells you which pin function required what combination of PxSEL, PxDir or probably other configuration settings. (e.g. on some MSPs, comparator or ADC controls affect the port pin functionality)
    And you're right, whether TxD or SIMO depends on the configuration of the USCI module. However, writing "USCI module I/O signal 1" wouldn't have been really helpful. :)

**Attention** This is a public forum