STM32F103CB ‘Sleepy mode’ and ‘Wake up’ function

Post here first, or if you can't find a relevant section!
Post Reply
myksj1105
Posts: 63
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.
myksj1105
Posts: 63
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: 1682
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

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
Post Reply

Return to “General discussion”