STM32F0XX_PWR Low power configuration detail Process

Source: Internet
Author: User

, overview

To summarize the knowledge of PWR today, see "stm32f0x128 Reference Manual V8" in the sixth chapter. Software engineering is about the power management of the shutdown mode, engineering is more common, but also a relatively simple example, depending on the project also need to modify or add some code.

The event that handles the project in the instance is only the LED change and the serial port prints the data, mainly is the prompt function, after the actual project wakes up will have more event waits for processing.

based on the principle of free sharing, convenient for everyone to learn knowledge on mobile phones, sharing technical knowledge every day. If you feel that the content you share is useful to you, and if you want to learn more about it, please use the search "embedddeveloper" or scan the QR code below and follow There will be more exciting content waiting for you.

Ⅱ, download

The article provides the "Software engineering" are on the hardware board to conduct multiple tests, and ensure that no problem before uploading to 360 cloud disk, please feel free to download the test, if there is a problem, please check your board if there is a problem.

St Standard Peripheral Library and reference manuals, data sheets, etc. can be downloaded from the St official website , you can also go to my 360 cloud disk download. There are several versions of the reference manual for the F0 series of chips (for F0 different chips), but there is a generic version, which is "stm32f0x128 reference manual V8 (English) 2015-07" recommended reference to this manual, later if you switch to a type of chip is also easy to understand.

Today's Software engineering (360 cloud disk):

https://yunpan.cn/cRwMZ83qJzHeg access password 21AF

STM32F0XX information can be downloaded from my 360 cloud disk:

https://yunpan.cn/cS2PVuHn6X2Bj access password 8c37

Ⅲ, preparatory work

For PWR Low-power programming, we recommend that you prepare The F0 Reference manual tenth chapter and data sheet, easy to access the relevant knowledge, do not go to St official website or to me 360 Cloud Disk download.

Today's summary of software engineering is based on the "TIM Basic Delay configuration Detailed process" modified, so you need to prepare the software engineering download. I always provide a good software engineering for everyone to download, but if you are a learner, it is recommended that you step-by-step operation.

Description of Ⅳ and related knowledge

① Power Supply Overview

STM32 power supply basically divided into three categories: Digital power VDD, Analog power vdda, backup power VBAT.

Each part provides the appropriate power supply.

② about power consumption

For specific information on the power consumption of the chip, refer to the data sheet for the chip, which describes the power consumption of the stm32f05x standby. Today's example code is the shutdown mode, turn off the regulator, IDD (digital Power) on the current, according to the voltage of VDD, IDD values are different, the normal vdd is 3.3V. As a result, the software engineering provided today is theoretically 3.7uA in IDD current.

With respect to low power consumption, the circuit design requirements are relatively high, and each pin can affect the size of your entire board current.

Ⅴ, code description

Please download the Software Engineering View source code, combined with source code to understand each point summarized.

①RCC Clock

The function is located above the BSP. c file;

I'm personally accustomed to the first step of configuring the clock, ST 's officially provided routines also put the configuration clock in front. The configuration of the RCC clock is important, several times I just forgot to configure the corresponding RCC clock, let me find a long time problem, finally found that the RCC The clock is not configured.

Attention:

Peripheral clocks should not be arbitrarily added, such as:RCC_APB1 Peripherals are not configured in the rcc_apb2 Clock " such as:rcc_ Apb2periphclockcmd (RCC_AHBPERIPH_DMA1, ENABLE); This can be compiled, but the wrong "

I warn the RCC clock every time because many people are having trouble with the software because of the clock, so remind more people to be careful about configuring RCC.

② Low Power configuration

The function is located under the main. c file;

Configuring low power Consumption is approximately 3 steps: Before entering low power, entering low power and exiting low power.

1. Before entering low power consumption: some modules or peripheral circuits that affect power consumption need to be closed;

2. The preparation is ready to enter the low power, then the system is in the shutdown mode, need an event to wake up (the project provided is the external interrupt button wake);

3. After an event wakes up the system, the system needs to be initialized (some modules shut down before the outage).

Attention:

This function is more critical, need to be combined with hardware design software, if there is a problem with the hardware, there is no software.

Ⅵ, description

Perhaps your hardware chip is not to provide the chip inside the project, but stm32f0 chip software compatibility is very good, can be applied to F0 many other models of chips, even F2, F4 and other chips (see the manual, or personally test).

The software engineering provided in this article is based on the St standard Peripheral Library, rather than using STM32CUBEMX to establish the project. Personally feel that using ST's standard Peripheral library suitable for learners, STM32CUBEMX building engineering structure complex, for learners, especially beginners are estimated to be headache.

Today's project is based on the project "stm32f0xx_tim Basic Delay configuration Detailed process" modified, the above examples are summarized for reference only, if there is wrong, please understand.

Ⅶ, last

Attention, reply to "more content", will get more content (such as:UCOS instances, etc., constantly updated in ...) )。

If you like what I share, and you want to know more about it, please follow the public number at the beginning of the article, the new content continues to be updated, and more exciting content will appear later.

Read the original

STM32F0XX_PWR Low power configuration detail Process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.