Nuvoton Technology's NUC1xx includes NUC101, NUC100, NUC120, NUC130 and NUC140, which are 32-bit microcontrollers (MCUs) based on the ARM Cortex-M0 core. Through different clock settings, the operating frequency can reach up to 50MHz. However, in general simple control or when the system load is low, the CPU does not need to run at the highest operating clock to cope with the required calculations. At this time, the system clock control can be used to reduce the clock to achieve the purpose of power saving.
Another situation is that when the CPU is waiting for the next task or only needs to work once in a long time, the CPU can be put into Idle or Power Down mode first, and will be awakened to process related events after a certain period of time or when a specific event occurs. At the same time, if the system module is not used in the system, it can also be turned off to save unnecessary power consumption. This article introduces the principles of various power saving methods and provides relevant examples.
Switching system module
In Nuvoton Technology's NUC1xx, in order to save power, when a system module is not in use, its input clock can be turned off to put it into shutdown mode, thereby achieving power saving. In NUC1xx, almost all system modules can be turned off individually, including: Watch Dog Timer, RTC, Timer0"3, I2C0"1, SPI0"3, UART0"2, PWM0"7, CAN, USB, ADC, ACMP, PS2, PDMA, Flash ISP. However, not every chip includes all module functions. For example, the CAN module only has this function in NUC130 and NUC140. For detailed instructions, please refer to the relevant documents of each chip.
The relevant power consumption of each module is shown in Table 1.
Nuvoton Technology NUC1xx turns off each module by turning off the clock of each module, so to turn off the module, you must set the relevant clock control register. NUC1xx provides AHBCLK Register and APBCLK Register to control the switches of the modules listed above.
System clock settings
The power consumption of Nuvoton NUC1xx is closely related to its operating clock. If the operating clock is high, the power consumption is high, and vice versa, it is more power-saving, but at the same time the CPU may not be able to handle a large amount of calculations. Therefore, if you want to take into account both large-scale calculations and power saving, you must be able to adjust the CPU's operating clock according to actual needs in order to achieve the best operating efficiency.
NUC1xx has built-in PLL, which can use an external 12MHz crystal or an internal 22MHz oscillator to generate the clock required by the system. The clock generated by the PLL can be used as the CPU operating frequency after appropriate frequency division. In addition, NUC1xx also provides a way to directly supply the CPU operating frequency via an external 32KHz crystal or an internal 10KHz oscillator. Therefore, NUC1xx provides great flexibility in setting the operating clock.
IDLE power saving mode
In addition to setting the most suitable working clock to achieve the purpose of power saving, Nuvoton Technology NUC1xx can also shut down the CPU and most of the hardware when the system does not need to work at all to achieve the maximum power saving effect. This mode of shutting down the CPU and most of the hardware is called power saving mode, which includes Idle power saving mode and Power Down power saving mode. The following is an explanation of Idle power saving mode.
There are two main modes that achieve maximum power saving efficiency by shutting down most hardware clocks, one is Idle power saving mode and the other is Power Down power saving mode. The biggest difference between these two modes is that when the system enters Idle power saving mode, any interrupt event can re-awaken the CPU so that the system can process new events. But if the system is in Power Down power saving mode, only a few specific interrupt events can wake up the system.
The so-called Idle mode actually turns off the CPU clock, so that the CPU is in the most power-saving mode when it is not working. Because in this mode, only the CPU clock is turned off. Once any interrupt event occurs, the CPU clock can be turned on immediately to handle related events, so there will be no delay in processing events, and at the same time, power saving can be achieved. It is a mode that takes into account both speed and power saving.
NUC1xx can use the WFI/WFE instructions provided by ARM Cortex-M0 to enter Idle mode. Once in Idle mode, the CPU will immediately enter Sleep mode and stop operating. Therefore, the program after the WFI/WFE instruction must wait until the CPU is awakened before it can be executed. At this time, the power consumption of NUC1xx will drop to about 16mA@3.3V-48MHz.
After entering the Idle power saving mode, if you want to wake up the CPU and return to the normal working mode, you must first generate an interrupt signal. The interrupt signal can be an interrupt generated by any module in the NUC1xx, or it can be used to wake up the CPU through an external interrupt. It should be noted that when deciding that the CPU is to be woken up by a certain interrupt, the interrupt must be set before entering the Idle power saving mode so that it can generate an interrupt event to wake up the CPU.
Power Down mode
Power Down is the most power-saving mode of Nuvoton Technology's NUC1xx. Once in Power Down mode, the crystal oscillator clock will be turned off, and the entire NUC1xx will be in a static state, and the power consumption will be reduced to a minimum. In this mode, only a few specific interrupt events can wake up the NUC1xx and restore it to working state. In Power Down mode, NUC1xx provides interrupt wake-up methods for GPIO, USB, UART, RTC, ACMP and CAN.
To enter the Power Down mode, in addition to calling the WFI/WFE instruction, the PD_WAIT_CPU and PWR_DOWN_EN functions must be turned on in sequence before calling the WFI/WFE instruction. This ensures that the CPU enters the Sleep mode first, and then the system enters the Power Down mode. At this time, NUc1xx is in the most power-saving state, and the power consumption will drop to about 15uA.
Once NUC1xx enters Power Down mode, most of the logic circuits are stopped, so to wake up the CPU, it must be woken up by a specially defined interrupt source. In Idle mode, any interrupt can wake up the CPU. However, the same thing is that both must set up the module to wake up the CPU in the future before entering the power saving mode, including the interrupt or wake-up function. Only after these preparations for waking up the CPU are completed can the power saving mode be entered, otherwise there is no way to wake up the CPU.
The so-called Power Down mode actually turns off the crystal oscillator clock, making the entire NUC1xx static. Because the crystal oscillator is also turned off, once a wake-up interrupt event occurs, the CPU can only continue to operate after the crystal oscillator stabilizes. Therefore, entering the normal working mode from Power Down will require a delay of some time, and the delay time provided by the NUC1xx series is preset to 4096 clock cycles. Calculated at 12MHz, the delay time is (1/12MHz)*4096=341.12us (T2 in Figure 2), and the time required for the crystal oscillator to start (T1 in Figure 2) will vary slightly with the crystal oscillator frequency, brand, PCB wiring, etc. Generally speaking, it takes about 1"2ms for a 12MHz crystal oscillator to start. The actual measurement example data is shown in Figure 2.
Conclusion
This article introduces the various power saving methods provided by Nuvoton Technology NUC1xx, including shutting down unused modules, adjusting the CPU clock, Idle power saving mode and Power Down power saving mode. In actual application, users can choose the appropriate method according to their own needs, or even combine different power saving methods to achieve the best power saving efficiency.
Previous article:Design of wireless logging winch signal detection circuit based on XC2C64A chip
Next article:Design of Boot-Loader for AT91SAM7Sxx Series MCU
- Popular Resources
- Popular amplifiers
- Offline AC-DC Power Supply Design Guide Using BCDPWM Controller AP3103
- SD6276 built-in 15mΩ, 10A, 14V built-in P-MOS DC-DC asynchronous boost
- USB Complete The Developer\'s Guide 5ed (USB Development Complete 5th Edition)
- Classic English version switching power supply MOS tube control chip R7731A technical data
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications