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: Steps to initialize GPIO for MSP432

Part Number: MSP432P401R

Hi,

I have taken previous course of Jon Valvano using Tiva C series of microcontroller. In that initializing GPIO as input/output there are several steps that needs to be followed like

1) Activate clock for the port

2) Unlock the port

3) Disable the analog function of the pin

4) Clear the bits in the PCTL to select the regular digital function

5) Set direction register

6) clear bits in alternative function register

7) Enable the digital port

While working on MSP432 above steps are not been followed (as both belong to Cortex -M4 family)

For MSP432 only

1) SEL0 & SEL1

2) DIR (Data direction register)

3) Enable pull up resistor

4) OUT

Is there any abstraction which is happening in the background / or previous steps are being followed automatically. Why the steps for configuration GPIO in MSP432 reduced.

Regards,

Tapas

 

  • Hello Tapas,

    Even though the TM4C and the MSP432P4 devices use Cortex-M4F core, the peripherals, as well as the the blocks that control them are different. This difference in hardware design results in different steps to enable a peripheral.

    As an example, in TM4C the System Control block controls the power to the peripherals where as in MSP432P4 the Power Control block controls the power to the peripherals.

    Thanks,
    Sai
  • Hi Sai,

    I have learnt that all Cortex-M4 devices uses same ARM architecture which is fixed, only minor thing like RAM, ROM, no of timers can be changed by the manufacturer.
    For example in TM4C123, we have to enable the clock for every port, but in MSP432 it is not done.
    How is the clock for ports in MSP432 are enabled.
    Can you point of the details that can be read in technical reference manual.

    Regards,

    Tapas
  • Hello,
    The section in the TRM that Sai is referring to can be found here:

    www.ti.com/.../slau356h.pdf

    A description of the Cortex-M4F peripherals found in the msp432 can be found here:

    www.ti.com/.../slau356h.pdf

    Regards,
    Chris

**Attention** This is a public forum