a) Watchdog Timer: Basic timing, performs a controlled system restart when a program error occurs
b) Basic timer: basic timing, supporting software and various peripheral modules to work under low frequency and low power consumption conditions
c) Real-time clock: basic timing, calendar function
d) Timer A: Basic timing, supports multiple timing controls, multiple capture/compare functions and multiple output waveforms (PWM) at the same time, and can support serial communication in hardware
e) Timer B: basic timing, the functions are basically the same as Timer A, but more flexible and powerful than Timer A
2. Watchdog timer:
a) WDT register
a) Counting unit WDTCNT: 16-bit up-counting, the fixed-period pulse signal generated by the clock circuit selected by the MSP430 adds to the counter from the beginning until the count overflows. WDTCNT cannot be accessed directly by software, but must be controlled by the control register WDTCTL of the watchdog timer.
b) Control register WDTCL
WDTCTL consists of two parts: the upper 8 bits are used as a password, and the lower 8 bits are the control commands for WDT operations.
To write the control command to operate WDT, you must first write the correct password. The password is 5AH. Errors will cause
The system is reset. No password is required to read WDTCTL, and it can be read directly. The low byte of the read data is the value of WDTCTL, and the high byte is always 69H.
i. WDTHOLD: stop the watchdog, 1 stop
ii. WDTNMIES: Watchdog NMI (non-maskable interrupt) trigger edge selection. When WDTNMI is 1, modifying this bit generates an interrupt, and when it is 0, it does not generate an interrupt. If this bit is 0, NMI is triggered on the rising edge, and if it is 1, NMI is triggered on the falling edge.
iii. WDTNMI: Watchdog NMI selection, select the function of the RST/NMI pin. When it is 0, it is the reset function, and when it is 1, it is the NMI function.
iv. WDTTMSEL: Watchdog working mode selection, 0 is watchdog mode, 1 is timer mode.
v. WDTCNTCL: When it is 1, the watchdog counter is cleared.
vi. WDTSSEL: Watchdog clock source selection, select SMCLK when it is 0, and select ACLK when it is 1.
vii. WDTISx: Timing output of the watchdog timer, 00 counts 32768, 01 counts 8192, 10 counts 512, 11 counts 64.
c) Interrupt enable register IE1:
i. NMIE: interrupt enable when 1
ii. WDTIE: Watchdog timer enable. This bit is set to 1 when working in timer mode. It is not necessary to set this bit to 1 when working in watchdog mode because other interrupts may occupy this bit.
d) Interrupt flag register IFG1:
i. NMIFG: 1 indicates an interrupt has occurred, 0 indicates no interrupt has occurred. This bit must be cleared by software.
ii. WDTIFG: Watchdog timer interrupt bit. In watchdog mode, it needs to be cleared by software. In timer mode, it will be automatically cleared when an interrupt is processed. When it is 1, there is an interrupt, and when it is 0, there is no interrupt.
Previous article:MSP430 Learning Notes (2) Timer A
Next article:12864 control forMSP430
Recommended ReadingLatest update time:2024-11-16 22:40
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
- How to migrate FreeRTOS applications to secure SAFERTOS
- LED Timer Keychain
- RF2051 chip
- MSP430G2 LaunchPad, how to play music with buzzer
- Disassemble a WSN node device and see how to select materials?
- Allwinner V853 heterogeneous multi-core AI intelligent vision development board review - V853 YOLO V3 test
- TMS320F28335 Study Notes——DMA
- RISC-V MCU Development (Part 2): Project Creation and Management
- What is this DC to AC circuit called a power supply circuit?
- MSP430 analog-to-digital conversion module--ADC12