Applicable to EM35XX and EFR32 platforms.
Low-power devices are divided into several modes. In normal development, the EM2 mode of sleep is generally selected, so here we will mainly talk about the problems in EM2 mode.
The selection of low-power device type means selecting low-power device in the configuration file. The
necessary configuration selection for low power consumption can be seen from the plug-in selection. In fact, the plug-in selection in the configuration file is also the switch of code on the AFV2 framework. Therefore, in the low-power device, to truly understand its essence, in fact, it is just calling a sleep function in the end. It is just that the selection of various plug-ins on AFV2 has already arranged under what conditions you can enter the sleep function and under what conditions you cannot enter (halSleepForMilliseconds(&sleepDuration);).
Scheduled wake-up actually just passes in a parameter, that is, the parameter of how long it takes to wake up in order to achieve the scheduled wake-up effect.
External interrupt wakeup requires setting the pin to the external middle terminal. In particular, there may be power-on and power-off issues when entering sleep mode, which may cause the IO state to change. Therefore, it is best to configure the desired state before entering low power consumption, and configure the desired state again when waking up. So where should it be configured? Before entering low power consumption, it is enough to configure before these two functions emberStackPowerDown(); halPowerDown();, and after halPowerUp(); emberStackPowerUp(); when coming out.
Serial port wakeup, especially when waking up a low power door lock, has two situations. Generally, the door lock is either woken up by IO or woken up by the serial port data preamble. In the end, it is still IO wakeup.
The power consumption of low-power devices and how to reduce power consumption are actually closely related to the hardware. In particular, if LDO is used in the hardware, you should pay attention to it. This type of LDO is divided into low-power and non-low-power, or in other words, replacing this device can reduce more than 100ua; and sometimes when measuring power consumption, when the difference ranges from a few hours to hundreds of UA, each pin needs to be configured with an appropriate mode. The appropriate mode can be analyzed according to the circuit diagram in which mode the pin will not leak electricity. If you don’t know how to analyze it, measure each mode and select the one with the lowest power consumption. In the case of
low-power long poll and short poll,
when long poll is needed and when short poll is used, this can actually be set by the application code, including the length of time, which can be modified and set. However, if there is no special requirement, the default is fine. The main purpose of long poll is to save power, that is to say, poll only once in a long time. In many cases, this poll is not only to see whether the parent node has data, but more to tell the parent node that it is still alive. Some devices have not polled data for a long time, so the parent node does not know whether it is still online. In this case, it needs to be modified according to demand; short poll is mainly used to find that some things have not been processed before entering sleep. For example, poll to data, but it is not so fast to poll complete data to meet the sleep situation. At this time, you must not sleep, and there is still data waiting to be obtained, so continue to short poll until the data is read. Here, short poll is not only performed when polling data, this is also completely controlled by the application code.
|