{
unsigned short WDTCTL; /* Watchdog Timer Control */
struct
{
unsigned short WDTIS0 : 1; /* */
unsigned short WDTIS1 : 1; /* */
unsigned short WDTSSEL : 1; /* */
unsigned short WDTCNTCL : 1; /* */
unsigned short WDTTMSEL : 1; /* */
unsigned short WDTNMI : 1; /* */
unsigned short WDTNMIES : 1; /* */
unsigned short WDTHOLD : 1; /* */
}WDTCTL_bit;
} @0x0120;
enum {
WDTIS0 = 0x0001,
WDTIS1 = 0x0002,
WDTSSEL = 0x0004,
WDTCNTCL = 0x0008,
WDTTMSEL = 0x0010,
WDTNMI = 0x0020,
WDTNMIES = 0x0040,
WDTHOLD = 0x0080
};
The address unit of WDTCTL is 0x0120. What does the following paragraph mean? Commonwealth?
unsigned short WDTIS0 : 1; // 1 represents the field width (binary), which means WDTISO is either 1 or 0
The latter 8 bits share the memory unit with WDTCTL. Looking at the user guide, WDTCTL is a 16-bit register, WDTIS0 is located at bit0, and so on, WDTHOLD is bit7, and these bits are all 0 after reset. In MSP's C language, bit variables are not supported. In the IO header file of 430, bit variable access to registers is implemented in this way of definition.
WDTCTL=WDTPW+WDTHOLD; // Stop watchdog. How to explain this operation of stopping watchdog?
WDTCTL is obviously a watchdog control register, and WDTPW is a macro definition. The header file looks like this, #define WDTPW (0x5A00u). In the user guide, WDTCTL is a 16-bit register, and the names of bit15-bit8 are WDTPW, must be written as 0x5a, these 8 bits must be initialized to 0x5a. This sentence completes the initialization of WDTPW and sets WDTHOLD. The result of setting WDTHOLD is that the watchdog timer stops.
unsigned short WDTNMIES : 1; // Watchdog timer non-maskable interrupt edge selection bit.
unsigned short WDTNMI : 1; // Watchdog timer non-maskable interrupt selection
unsigned short WDTTMSEL : 1; //Watchdog timer mode selection
unsigned short WDTCNTCL : 1; // Watchdog timer counter clear selection bit
unsigned short WDTSSEL : 1; //Watchdog timer clock source selection
unsigned short WDTIS0 : 1; // Watchdog time interval selection
unsigned short WDTIS1 : 1; // time interval selection
PUC power up clear
Previous article:The problem of debugging 430 routines not being able to be burned in is solved
Next article:What programmers should do every day
Recommended ReadingLatest update time:2024-11-23 12:38
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- S3C44BOX Chinese Data Sheet Contents
- Apple phone wireless connection error
- Freescale's MC9S12XET256 chip, please help me with the problem of multiplexing function mapping
- Design of Several Telephone Line Feeder Circuits
- Extreme point test
- Research on Simulation Source of Spaceborne Synthetic Aperture Radar Echo Signal
- R16-Startup Manual
- Design of vhdl digital clock
- Introduction to RS485
- dsp 28335 ConfigCpuTimer() detailed introduction