Skip to main content
Visitor II
January 22, 2020
Question

How to enter stop mode and how to wake up ?

  • January 22, 2020
  • 2 replies
  • 1533 views

Hi list,

I'm using stm32f103 and stm32cude ide. And I'm also using FreeRTOS.

This is my stop mode code.

This code is called in TimerCallback which is created from FreeRTOS.

HAL_SuspendTick();
__HAL_RCC_PWR_CLK_ENABLE();
//HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);
HAL_ResumeTick();
SystemClock_Config();

I need multi wakeup sources from stop mode. So I've set some pins of PortC to interrupt source. Those are EXTI0,1,2,3 and EXTI15_10.

I could wake up through touch interrupt (EXTI15_10) but I couldn't wake up from other pins.

Let me know how to fix it, please.

    This topic has been closed for replies.

    2 replies

    Super User
    January 23, 2020

    > So I've set some pins of PortC to interrupt source. Those are EXTI0,1,2,3 and EXTI15_10.

     > I could wake up through touch interrupt (EXTI15_10) but I couldn't wake up from other pins.

    Without going to stop mode, do those "other interrupts" work?

    JW

    Clee.4Author
    Visitor II
    January 23, 2020

    Yep. It works well before entering stop mode. When stm32f103 is waken up from stop mode by other pins but touch Int., it's stuck.

    There is update.

    If I remove LCD sleep code, it works. It's very weird.

    And I've encountered incomprehensible situations which SPI2 returns HAL_BUSY at Touch Int.

    CM