cancel
Showing results for 
Search instead for 
Did you mean: 

How to save power with Cube?

LMI2
Lead
Posted on August 27, 2016 at 18:31

I think we must build a system where CPUs are mainly asleep. When they get an serial data or something, they'll wake up.Then do something and go to sleep again.

How to put a 407 or something in low power mode?
4 REPLIES 4
Posted on August 27, 2016 at 19:03

You'll want to review the HAL within the context of the lower power modes described in the Reference Manual. Are there not examples in the Cube directories?

You'll likely want to use the WFI instruction to get it to sleep while it is waiting for interrupts from your serial device, or whatever.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LMI2
Lead
Posted on August 28, 2016 at 17:26

There are some examples for 2xx series. For 4xx there is an current consumption example. Not very exciting.

I hope a function to put the CPU into some low power mode.

Abouit WIFI. Yeah. The rest of the circuit is important too. Wifi and such take too much current, I think. I am thinking something very simple.

LMI2
Lead
Posted on August 29, 2016 at 19:14

I found a file called stm32f1xx_hal_pwr in my project. There are functions for putting the CPU in a low power mode.

Amel NASRI
ST Employee
Posted on August 30, 2016 at 12:42

Hi mich.lei,

In the package STM32CubeF4, you should find a similar driver (like F1) for PWR.

Several examples showing how to entre low power modes and how to wake-up may be found in following folders:

- STM32Cube_FW_F4_V1.13.0\Projects\STM324xG_EVAL\Examples\PWR

- STM32Cube_FW_F4_V1.13.0\Projects\STM32F4-Discovery\Examples\PWR

You may also refer to

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries-expansions/stsw-stm32142.html

that provides tips on how to reduce power consumption on STM32F4 devices  (based on standard library).

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.