How to reduce power consumption by ultra-low power MCU

Low power consumption is a very important indicator of MCUs. For example, some wearable devices carry limited power. If the power consumed by the entire circuit is particularly large, there will often be insufficient power.

Usually when we are making products, the basic function realization is very simple, but as long as it involves low power consumption, it is more difficult. For example, some MCU microcontrollers that can be as low as microampere level, and our own design low The power consumption is measured at the milliampere level, and the current can be hundreds to thousands of times higher than the standard. Don't be afraid of this situation, as long as you are serious, you will win. Then carefully analyze the reasons for this.

(1) Cut off the peripheral lifeline and turn off the peripheral clock.
Let me talk about the most intuitive aspect, and the aspect that engineers pay more attention to, is to turn off the peripheral clock of the MCU microcontroller. For most MCU microcontrollers on the market, their peripheral modules correspond to a clock switch. You only need to turn on the clock of this peripheral to use this peripheral normally. Of course, this peripheral will also generate corresponding power consumption; if you want to prevent this peripheral from generating power, you only need to turn off its clock That's it.

(2) Let the working rhythm slow down, and the clock should not be multiplied. In addition to the power consumption of peripheral modules, there is also a large consumer who needs to pay attention to it, which is the PLL and FLL modules. PLL and FLL are mainly used to multiply the frequency of the original clock signal, thereby increasing the overall clock of the system, and its power consumption will also be raised. Therefore, before entering low power consumption, it is necessary to switch the time mode, bypass the PLL and FLL modules, so as to reduce the power consumption of the MCU as much as possible, and then switch the clock back after the MCU wakes up.

(3) Contain the trickle, pay attention to the level status of the IO port. If you think that just turning off the peripheral clock can ensure that the peripheral will no longer consume power, then you are too naive. If the IO port is not handled properly, it will steal the power consumption secretly, but you don't know it. The specific reason is this, the general IO will have pull-up and pull-down resistors inside or outside. If a certain IO port has a 10K pull-up resistor, pull the pin to 3.3 V, but when the MCU enters the low-power mode , This IO port is set to output low level. According to Ohm’s law, this pin will consume 3.3 V/10 K = 0.33 mA. If there are four or five such IO ports, then a few mA will be posted Go in. So before entering low power consumption, please check the status of the IO ports one by one.
If this IO port has a pull-down, please set it as low-level output or high-impedance input. Don't waste the best current on functions that generate heat.

(4) For good-neighborly and friendly cooperation, attention should be paid to the coordination of 1O and peripheral ICs.
The current consumption factor of the pull-up and pull-down resistors of the IO port is relatively obvious. Let's talk about an unobvious factor below: the current consumption when the IO port is connected to an external IC. If a certain IO port has its own pull-up, and the IC pin connected to the IO has its own pull-down, then no matter what level the pin is at, it will inevitably produce a certain current consumption. So whenever you encounter this type of situation, you first need to read the manual of the peripheral IC, determine the state of this pin, and be aware of it; then, before controlling the MCU sleep, set the MCU's IO port up and down mode And input and output status, to ensure that a trace of current is not consumed by it.

(5) Disconnect the debugger and don't be confused by illusions. There is another kind of peculiar type, the current consumption detected is very large, but the actual result is that I am unreasonable, because the MCU is still connected to the debugger when testing the power consumption. At this time, most of the current will be taken away by the debugger, leaving the engineer extremely depressed for no reason. So when measuring low power consumption, you must not connect a debugger, let alone measure current while debugging.

MCU's low-power design is a meticulous work. It is necessary to develop a good habit, so that every time a function is added, it is necessary to re-verify whether the low-power consumption meets the requirements, so that the power loss factor can be reduced anytime and anywhere. If all the functions are designed to consider the issue of low power consumption, one may change the architecture of the program if one is not careful. Even so, the power consumption may not be completely reduced.

Guess you like

Origin blog.csdn.net/NETSOL/article/details/109643095