standby or deepsleep mode for stm32f103

Fully featured ARM compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
zezo2060
Posts: 5
Joined: 23 Sep 2022 16:52

standby or deepsleep mode for stm32f103

#1 Post by zezo2060 » 29 Sep 2023 14:26

hi
can you plz support to provide a working example for standby or deepsleep mode for stm32f103 with wakeup??

thank you

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: standby or deepsleep mode for stm32f103

#2 Post by IvanJeremic » 06 Oct 2023 11:19

Hi,

I will see if i can find the same MCU and write an example, since we don't have that.

But basically you need to use ASM mode:
https://download.mikroe.com/documents/c ... ration.htm

Below is a manual that will help you with the coding:
https://www.st.com/resource/en/programm ... ronics.pdf

Regards,

Ivan.

Thomas.Pahl@t-online.de
Posts: 158
Joined: 24 May 2008 15:55
Location: Germany

Re: standby or deepsleep mode for stm32f103

#3 Post by Thomas.Pahl@t-online.de » 06 Oct 2023 17:55

with stm32f407 i do the following:

Code: Select all

SLEEPDEEP_Bit = 1
asm
       wfi
end asm
if your chip has a similar mechanism i do not know.

recovery from standby is not so simple since the 407 starts with internal RC-oscillator and a call to the startup sequence is necessary.

Post Reply

Return to “ARM AI Compilers”