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.

MSP432P401R: GPIO 5.5 GPIO_TERTIARY_MODULE_FUNCTION for ADC0

Part Number: MSP432P401R


Hi! Looking the TI examples I saw this line of code:

/* Configuring GPIOs (5.5 A0) */
    MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P5, GPIO_PIN5,
    GPIO_TERTIARY_MODULE_FUNCTION);

I saw other posts on TI forums that talk about the pin functions, but I can't understand why I should set a TERTIARY FUNCTION to a pin with only one extra function (highlighted).

Did I understand well the GPIO functions?

Thank you in advance,

Regards,

Mattia Ducci

  • Good question!

    The terms primary, secondary and tertiary refer to the value assigned to the P5SEL1, P5SEL0 bits that select the appropriate function for multiplexed pins in Port 5.

    If you look at the device datasheet for the MSP432P401R, page 153, P5.5 requires setting P5SEL0 =1 and P5SEL1 =1  in order to obtain the ADC function.

    This value of "11" is hard-coded in our driver files as the term "tertiary"...

    01 = primary

    10 = secondary

    11 = tertiary

    So when the other combinations such as "0x01" and "0x10" are not available, you still need to use the "tertiary assignment" if the PxSELx bits require 1/1

    Hope this makes sense!

    -Priya

  • Absolutely yes!! I haven't seen that page before. Thank you very much!

    Regards,
    Mattia Ducci

**Attention** This is a public forum