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.

MSPM0G3519: MSPM0G3519 - Low Power mode Implementation with GPIO wake up

Part Number: MSPM0G3519

Hi,

I am working on MSPM0G3519 Low power mode implementation with GPIO wake up. I took the TIMER ISR example code and added the GPIO with enabled wake up feature.

image.png

#include "ti_msp_dl_config.h"

uint32_t switchInput =0;

int main(void)
{
    SYSCFG_DL_init();

    // NVIC_EnableIRQ(TIMER_0_INST_INT_IRQN);
    /* Calling WFI after calling DL_SYSCTL_enableSleepOnExit will result in
     * only ISR code to be executed. This is done to showcase the device's
     * low power consumption when sleeping.
     */
        DL_SYSCTL_setPowerPolicySTOP0();


    while (1) {

        DL_GPIO_togglePins(GPIO_LEDS_PORT,
                           GPIO_LEDS_USER_LED_1_PIN);

        /*
         * Enter STOP0
         */
        // __WFI();

        switchInput =
            DL_GPIO_readPins(GPIO_SWITCH_PORT,
                             GPIO_SWITCH_FastWakeup_PA12_PIN);

        delay_cycles(6000000);

        DL_GPIO_togglePins(GPIO_LEDS_PORT,
                           GPIO_LEDS_USER_LED_2_PIN);
    }
}

 

Please guide me to implement the GPIO wake up from Low Power mode.

Regards,

SaKhan