STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

Post here first, or if you can't find a relevant section!
Post Reply
myksj1105
Posts: 64
Joined: Sun Jun 18, 2023 11:35 am
Answers: 1

STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

Post by myksj1105 »

STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

[Status]
1. MCU: STM32F103CB
2. CORE1: https://github.com/rogerclarkmelbourne/Arduino_STM32
3. CORE2: https://github.com/stm32duino/Arduino_Core_STM32


hello.

We want to configure it with low power.
1. Enter ‘Sleepy Mode’ through firmware.
2. In terms of hardware, the ‘3.3V’ or ‘GND’ signal enables the ‘Wake up’ function.
3. The firmware re-enters ‘Sleepy mode’ after a certain period of time.

Are there any examples or libraries? help me.
by ag123 » Tue May 14, 2024 6:12 am
library is here
https://github.com/stm32duino/STM32LowPower
you need to use stm core for that

low power is not for novices, to do low power, the simplest way is to consult the reference manual and figure out how to do that from there.
in some low power modes, you need to trigger a reset after wake up from low power.

the simplest way to reduce power is to use

Code: Select all

asm("wfi");
when your code is not doing anything. you can put that in loop(), and that is good as delay(1)

for a properly designed app, stm32 can run for days on reusable AA or Lipo batteries without special low power modes.
and you can re-charge and use again.
normally, things like your leds etc can take more power than a stm32
Go to full post
myksj1105
Posts: 64
Joined: Sun Jun 18, 2023 11:35 am
Answers: 1

Re: STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

Post by myksj1105 »

#include "STM32LowPower.h"

Can I use the above library? 'STM32LowPower' ?
ag123
Posts: 1683
Joined: Thu Dec 19, 2019 5:30 am
Answers: 26

Re: STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

Post by ag123 »

library is here
https://github.com/stm32duino/STM32LowPower
you need to use stm core for that

low power is not for novices, to do low power, the simplest way is to consult the reference manual and figure out how to do that from there.
in some low power modes, you need to trigger a reset after wake up from low power.

the simplest way to reduce power is to use

Code: Select all

asm("wfi");
when your code is not doing anything. you can put that in loop(), and that is good as delay(1)

for a properly designed app, stm32 can run for days on reusable AA or Lipo batteries without special low power modes.
and you can re-charge and use again.
normally, things like your leds etc can take more power than a stm32
myksj1105
Posts: 64
Joined: Sun Jun 18, 2023 11:35 am
Answers: 1

Re: STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

Post by myksj1105 »

@ag123


Thank you for answer.

How to use the 'STM32LowPower' library?
CORE2: https://github.com/stm32duino/Arduino_Core_STM32

Is it possible to implement it through ‘CORE’ above?
ag123
Posts: 1683
Joined: Thu Dec 19, 2019 5:30 am
Answers: 26

Re: STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

Post by ag123 »

that is designed for Arduino_Core_STM32
I've not used it prior, hence you would need to review the examples, codes yourself.

beyond the library, review the reference manual for your soc
https://www.st.com/resource/en/referenc ... ronics.pdf
Post Reply

Return to “General discussion”