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 — 具有 GPIO 唤醒功能的低功耗模式实现

Guru**** 2908210 points

Other Parts Discussed in Thread: MSPM0G3519

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1648587/mspm0g3519-mspm0g3519---low-power-mode-implementation-with-gpio-wake-up

器件型号: MSPM0G3519

您好、

我正在处理具有 GPIO 唤醒功能的 MSPM0G3519 低功耗模式实施。 我获取了计时器 ISR 示例代码、并添加了启用了唤醒功能的 GPIO。

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);
    }
}

 

请指导我实现从低功耗模式唤醒 GPIO。

此致、

SaKhan