MSPM0G1107: Cannot make PA0 work as a GPIO output

Part Number: MSPM0G1107
Other Parts Discussed in Thread: SYSCONFIG

Hi, 

I have very simple test project setup in CCS20.5.1. The main function has the following loop:

   while (1) {
        // Toggle the pin
        DL_GPIO_togglePins(GPIO_PORTA_PORT, GPIO_PORTA_PIN_1_PIN);
        DL_GPIO_togglePins(GPIO_PORTA_PORT, GPIO_PORTA_PIN_17_PIN);
        delay_cycles(8000000);    
        }
 
I have exactly the same configuration in .syscfg file for pin 1 (PA0) and pin 17 (PA13). However pin 17 toggles correctly but I do not see the proper outpu ton pin 1. I used the scope and saw the output is always 0V. 
 
What could I have missed? This is my first project with such MCU.
 
Thanks,
Tianlei 
  • #include "ti_msp_dl_config.h"

    /*
     *  ======== SYSCFG_DL_init ========
     *  Perform any initialization needed before using any board APIs
     */
    This is the auto-generated configuration code:
    SYSCONFIG_WEAK void SYSCFG_DL_init(void)
    {
        SYSCFG_DL_initPower();
        SYSCFG_DL_GPIO_init();
        /* Module-Specific Initializations*/
        SYSCFG_DL_SYSCTL_init();
    }

    SYSCONFIG_WEAK void SYSCFG_DL_initPower(void)
    {
        DL_GPIO_reset(GPIOA);

        DL_GPIO_enablePower(GPIOA);
        delay_cycles(POWER_STARTUP_DELAY);
    }

    SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void)
    {

        DL_GPIO_initDigitalOutput(GPIO_PORTA_PIN_1_IOMUX);

        DL_GPIO_initDigitalOutput(GPIO_PORTA_PIN_17_IOMUX);

        DL_GPIO_initDigitalOutput(GPIO_PORTA_PIN_12_IOMUX);

        DL_GPIO_clearPins(GPIO_PORTA_PORT, GPIO_PORTA_PIN_1_PIN |
            GPIO_PORTA_PIN_17_PIN |
            GPIO_PORTA_PIN_12_PIN);
        DL_GPIO_enableOutput(GPIO_PORTA_PORT, GPIO_PORTA_PIN_1_PIN |
            GPIO_PORTA_PIN_17_PIN |
            GPIO_PORTA_PIN_12_PIN);

    }


    SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void)
    {

        //Low Power Mode is configured to be SLEEP0
        DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0);

        DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE);
        DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_1);
        DL_SYSCTL_setMCLKDivider(DL_SYSCTL_MCLK_DIVIDER_DISABLE);

    }


  • Is this on a Launchpad?

    Do you have a pull up on the pin? It is required for PA0 and PA1.

  • No, this could be the reason!

    Thanks!

  • Confirmed. Thanks a lot!.