cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter stop mode and how to wake up ?

Clee.4
Associate II

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.

2 REPLIES 2

> 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.4
Associate II

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