MSP430 low power event driven working mode

Publisher:andyliow1980Latest update time:2013-01-16 Source: 21IC Keywords:MSP430 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

MSP430 low power event driven working mode

Each module of the MSP430 series microcontroller can run independently, such as timer, input/output port, A/D conversion, watchdog, LCD display, etc. can work independently when the CPU is in sleep state. If the main CPU needs to work, any module can wake up the CPU through an interrupt, so that the system can run with the lowest power consumption.

Allowing the CPU to work in a burst state can fully utilize the low power consumption of the CPU. Usually, the CPU is set to a low power mode using software, and an interrupt is used to wake up the CPU from the sleep state when needed. After completing the work, it can enter the corresponding sleep state again. For example, let the CPU work in the LPM3 state, and switch to the AM active mode through an interrupt event. According to the operation needs, it can enter the corresponding low power mode from the AM state: LPM0/LPM3 or LPM4.

These low power consumption characteristics of the system are achieved by the system's response to interrupts. The process of the system responding to interrupts: (1) Hardware automatic interrupt service. Including PC stacking, SR stacking; interrupt vector assigned to PC; GIE, CPUOFF, OSCOFF and SCG1 cleared; and IFG flag cleared (single source interrupt flag). (2) Execute the interrupt handling subroutine. (3) Execute the RETI instruction (interrupt return), including SR stacking and PC stacking.

For example: after the system is initialized, it works in low power mode 0, an interrupt event triggers the active mode, and after the interrupt processing is completed, it enters low power mode 3.

;Main program

......; Initialization operation starts

……;

......; Initialization completed

BIS #GIE+CPUOFF, SR ; Set low power mode 0, LPM0 in the main program

;……;The program stops here

;Interrupt subroutine

……; Interrupt processing ends

BIS #GIE+CPUOFF+SCG1+SCG0, 0(SP) ; Set SR to low power mode 3, LPM3

RETI; interrupt return

;The system enters low power mode 3

If the main program expects to continue to perform certain operations after the interrupt returns, the SR value can be changed to AM mode in the interrupt handling subroutine. After the system interrupt exits, certain set operations can be performed according to the restored SR and PC values.

;Main program

......; Initialization operation starts

……;

......; Initialization completed

BIS #GIE+CPUOFF, SR ; Set low power mode 0, LPM0 in the main program

L1 Operation 1

L2 Operation 2

……;

;Interrupt subroutine

...; Interrupt processing starts

……; Interrupt processing ends

BIS #GIE+CPUOFF, 0(SP) ; Set SR to active mode, AM

RETI; interrupt return, the system enters active mode

The main program stops executing at LPM0, and L1, L2 and other statements are not executed. After that, the interrupt event saves PC (L1 instruction address) and SR (low power mode 0), the interrupt wakes up the CPU, and executes the interrupt handler; because SR is set to active mode in the interrupt handler, the CPU is in active state after the interrupt returns, and continues to execute from the L1 instruction pointed to by PC...

Keywords:MSP430 Reference address:MSP430 low power event driven working mode

Previous article:MSP430 Timer Detailed Explanation
Next article:MSP430 MCU Timer A Structure and Application Examples

Recommended ReadingLatest update time:2024-11-16 14:52

Bit Operation of MSP430 MCU
  MSP430 microcontroller is a RISC (Reduced Instruction Set Computer) processor. It is different from the complex instruction set of ordinary 51 microcontrollers. Ordinary 51 microcontrollers need at least 12 clock cycles to execute an instruction, while RISC microcontrollers only need at least 1 clock cycle. The bigge
[Microcontroller]
MSP430 implements cyclic redundancy algorithm
/****************************************************************************** ; Code for application report slaa221 - "CRC Implementation with MSP430" ; ; E.Lenchak ; Texas Instruments, Inc ; March 2004 ; Built with IAR Embedded Workbench Version: 3.20A ;********************************************************
[Microcontroller]
MSP430 Keyboard Program
// This sample program uses interrupt mode to get the keyboard key value and store it in the queue keybuff // This sample program does not display, // Pressing a key on the keyboard triggers the interrupt service routine of port P1, gets the key value of the keyboard, and saves it to the key value queue. // In othe
[Microcontroller]
MSP430 Tutorial 16: MSP430 MCU Development Summary
1.#i nclude<> means to go to the editor setting directory, #i nclude "" means to go to the current project directory. 2. To call a function in another file, put the function file in the current project directory and add it to the project. 3. There cannot be a - in the name, for example: byq-ee will be considered wron
[Microcontroller]
Simple transplantation of printf function of msp430
I am working on a project based on TCS34725 RGB color sensor. The main control I use is MSP430. When debugging, I use 485 bus to send to the upper computer (computer or upper host computer). At first, I used the serial port sending function to send directly, but it was super inconvenient to display a lot of data, such
[Microcontroller]
Design of Audio Spectrum Analyzer Using MSP430 Processor
1 Introduction In actual radio and television transmission work, the entry test of new transmitters and the daily indicator test of transmitters all involve audio testing. The audio spectrum analyzer designed in this article measures the spectrum of audio signals from the perspective of signal source, thereby determin
[Test Measurement]
Design of Audio Spectrum Analyzer Using MSP430 Processor
MSP430 timer interrupt usage summary
I have been studying the timer of MSP430 for the past two days and found it quite troublesome. Here I record my learning experience: There is only TIMER A interrupt on MSP430G2211, so here we discuss TIMER A, TIMER B should be similar to TIMER A. For each timer, it has two interrupts, TIMERA0_VECTOR and TIMERA1_VECTOR.
[Microcontroller]
Implementation of motor protection algorithm based on MSP430F149
目前,我国高压电动机的保护主要有机电式和集成电路两种,但都存在着诸多弊病,不能很好地保护电动机。其中,异步电动机的机电式保护,主要以电流增大作为判据,保护原理粗略,对断相等严重不对称故障,由于一般不出现显著的电流增大,从而使保护装置难以及时动作,造成事故扩大;集成电路式保护虽在保护原理上有所改善,但其保护特性一般无法与电动机热曲线实现较好配合,常发生拒动或误动,严重的甚至烧毁电动机。因此,研究电机保护算法具有重要的意义。 1 电动机故障分析 电动机的故障形式可分为对称和不对称两类。 对称故障包括过载、堵转和三相短路等,这类故障对电动机的损坏主要是热效应和机械应力,使绕组发热甚至损坏。其主要特征是三相仍基本
[Microcontroller]
Implementation of motor protection algorithm based on MSP430F149
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号