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.

MSPM0L1106: Question on GPIO interrupt

Part Number: MSPM0L1106


Tool/software:

Hi Team,

I want to ask the following question about GPIO interrupt :

1. According to datasheet and technical reference, GPIO should be worked on different power save mode except shutdown mode.

    After I tested the GPIO interrupt on sleep0, stop0 and standby0, the interrupt can wakeup the MCU. However, MCU cannot be wakeup from other mode 1 or 2.

    Is it true? I am expecting MCU can wakeup from sleepX, stopX and standbyX mode. If it is not, what are the setting that need to be set in order for GPIO interrupt to wakeup in all mode?

2. As I tested the functions :

    - DL_SYSCTL_enableSleepOnExit() : After executed this function, MCU will go to sleep mode again after ISR is served.

    - DL_SYSCTL_disableSleepOnExit() : After executed this function, MCU will return to main loop after ISR is served. So normally this will be called.

    If I have want some interrupt to go back sleep directly after ISR is served and some are not. Can you tell me how to implement this?

  • 2) You can call the SleepOnExit functions from within an ISR, based on whether you want main to wake up or not. They're pretty cheap -- they just set/clear a bit in the SCR.

  • Hi Bruce,

    Thank you for your reply and info.

    About 1), I had more testing on it and found that when interrupt was triggered :
    - In Sleep0, Stop0-2 and Standby0-1 mode, ISR will be served and main "while" loop will be executed.
    - In Sleep1-2, ISR will be served without "while" loop executed.
    In my testing, only DL_SYSCTL_disableSleepOnExit() is executed in front. How to explain this phenomenon?

    Furthermore, I tested the PWM driver with zero interrupt enabled, it has the same behaviour as the GPIO interrupt.

    There is another strange behaviour that the clock source of the PWM is BUSCLK, it should not work in Sleep1-2, Stop1-2 and Standby. But it can work for all mode now.

    I wonder, is there any way to avoid the system to enter different power save mode? Hope some one can help me on this.

  • Hi,

        Is it true? I am expecting MCU can wakeup from sleepX, stopX and standbyX mode. If it is not, what are the setting that need to be set in order for GPIO interrupt to wakeup in all mode?

    I have done the test that all low power mode can be waken up from GPIO interrupt.

        If I have want some interrupt to go back sleep directly after ISR is served and some are not. Can you tell me how to implement this?

    You can use  DL_SYSCTL_disableSleepOnExit(). And use __WFI(); in main code. this code will make CPU in low power mode and wait for interrupt to trigger.

    Regards,

    Zoey