This content is originally created by EEWORLD forum user tiankai001. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source MSP430 MCU Development Record (25) Phenomenon: After the product development is completed and after rigorous and detailed testing, it has begun mass production. However, everyone raised a question: Can the power consumption be reduced? The current power consumption of the product is a bit high (over 50uA). If it is powered by dry batteries, the battery must be replaced within 1 year. Test: Because our products have always been battery-powered, the power consumption of the products has always been very low. This is also the reason why we have always used TI's MSP430 series of microcontrollers, because its ultra-low power consumption is really good. However, this product has too many functions and a good point: serial communication is required every 1s (each communication is dozens of bytes, the baud rate is 9600). During the initial design and product verification, all participants believed that the current power consumption has been the best and there is no room for further reduction. And the power consumption of this product is basically the same as that of similar products from other manufacturers. So it is felt that the power consumption cannot be reduced. But today I suddenly thought of a problem: the msp430 microcontroller data sheet says that in the low power state, after the microcontroller detects an interrupt, it automatically exits the low power state when processing the interrupt. After processing the interrupt, it automatically enters the low power state when exiting the interrupt. If you manually add a statement to exit the low power state when exiting the interrupt, it will not enter the low power state after exiting the interrupt. Since our program needs to process a complete frame of data in time after receiving it, we add a statement to exit the low power state when exiting the interrupt. It will enter the low power state again after processing the data in the main loop. Because the interrupt mode used by the serial port accepts one byte each time, it will not be processed until all the data is received. Therefore, can the serial port interrupt exit directly into the low power state when not receiving all the data? So the program was optimized: it will only exit the low power state after receiving a frame of data, otherwise it will not exit the low power state. Verification: According to this idea, when the serial port interrupt function in the program exits, it exits or does not exit the low power state according to the conditions. After testing, the current is reduced by about 20uA, and the effect is obvious . Remarks: The ultra-low power consumption of the msp430 microcontroller is indeed very powerful, but its realization requires continuous in-depth research and practice, and finally lower power consumption can be achieved.
|