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.

MSPM0L2228: after LPM enetring no interrput generated

Part Number: MSPM0L2228

Tool/software:

Hi 

we are using MSPm0l2228 , in RTC one sec  ready interrupt , and some GPIO interrupts used. MSPM0 runs in RUN0 mode, we tried to get into RUN2SLEEP2, STANDBY1 mode with __WFI(), everytime succesfully we enter LPM but whenever we give external  GPIO interrupt, its not exiting from LPM,   in debug if pause the debug and run then it automatically exits and runs the core. need proper exmaple code for this LPM, when only RTC should run and upon GPIO interrupt or RTC alarm interrupt device should wakeup and serve. 

Regards

nandish 

  • Hi Nandish,

    It sounds like you are asking for an example where a GPIO interrupt will cause the device to exit LPM where only the RTC was running.

    Would this assumption be correct?

    -Matthew

  • HI Matthew,

    we have tried example codes and based on that we have wrote code like below 

    void main(){

    init();

    enable_all_interrupst();

    while(1)

    {

    low_powermode_en();

    }

    }

    void low_powermode_en() 

    {

     DL_SYSCTL_disableSleepOnExit();
      __enable_irq();
      DL_SYSCTL_setPowerPolicyRUN2SLEEP2();
      __WFI(); // Wait For Interrupty

    }

    void GROUP1_IRQHandler(void) {
      uint32_t pending_interrupt_ext_ina = DL_GPIO_getPendingInterrupt(GPIOA);
      uint32_t pending_interrupt_ext_inb = DL_GPIO_getPendingInterrupt(GPIOB);
      uint32_t pending_interrupt_ext_inc = DL_GPIO_getPendingInterrupt(GPIOC);

      if (pending_interrupt_ext_ina == EXT_IN_CAP_TOUCH_IIDX) {
       
     DL_SYSCTL_setPowerPolicyRUN0SLEEP0();

    }

    }  after debugging we found we are entering low power mode , and get the GPIO interrupt but we wre not executing __wfi. so please provide example code for this kind of application

    Regards

    Nandish 

  • Hi Nandish,

    What behavior are you seeing that suggests WFI() is not executing?

    If a debugger is connected, then the device will not truly go into the lowest power mode.

    -Matthew