2. The clock sources that can be selected in the latter two modes are: SMCLK and ACLK.
3. When using the last two modes, pay attention to whether the watchdog can work under the state of the MCU. For example, when the MCU is in LPM3, there is only ACLK clock, and in LPM4, there is no clock available.
4. How to use the watchdog mode
When the watchdog count overflows, the program is reset. Enable the watchdog in the program, clear the watchdog before the count overflows, or reset the watchdog to make it count again. If the program runs away, the watchdog may not be cleared or reset, and it will overflow, causing the program to reset.
5. In MSP430F2274, the maximum timing in watchdog mode is 1s. If you need to reset it with a longer time, you can use other counters and execute ((void(*)())RESET_VECTOR)(); after the count is full, or write an error value to the watchdog control register or execute an invalid command after the count is full: such as ((void(*)())0x170)(); 0x170 is an address of a peripheral module and cannot be a function address, so executing this sentence will reset the program.
6. Specific use of watchdog
6.1. Stop mode: turn off the watchdog
C language implementation: WDTCTL = WDTPW + WDTHOLD
6.2. Timer mode: used as a timer, the watchdog interrupt function is executed when the counter is full and an interrupt is generated.
C language implementation:
Start the watchdog timer in the main program, such as: WDTCTL = WDT_MDLY_8;
The watchdog interrupt function is:
#pragmavector=WDT_VECTOR
__interruptvoid wATchdog_timer(void)
{
}
6.3. Watchdog mode: When the count overflows, the reset interrupt function is executed.
C language implementation:
Clear watchdog: WDTCTL = WDTPW+WDTCNTCL;
Set watchdog: WDTCTL = WDT_MRST_0_5;
or WDTCTL = WDT_ARST_1000;
Previous article:Design and Analysis of Data Acquisition System Based on CAN Bus Technology
Next article:MSP430 MCU Hardware IIC
Recommended ReadingLatest update time:2024-11-16 16:47
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- Goodbye 2019, hello 2020. Let’s just say goodbye to 2019 and roll up our sleeves to work on the days we hope to live in 2020~
- Ask about high power DCDC step-down circuit
- Using an oscilloscope to measure the waveform of the automobile knock sensor and analyze it
- Disassembly of Japan Riken RP-GX-86 portable composite gas detector
- Using a single chip microcomputer to read out segment code LCD
- dsp28335 SCI Summary (Serial One-Step Communication)
- How to read and decode the PPM signal of the RC remote control
- 【TouchGFX Design】graph waveform drawing
- C5000 compiles SUBC instruction to implement division
- [Project source code] Verilog language routine "Wang Jinming: "Verilog HDL Programming Tutorial""