External reset generated by NRST pin
Power-on reset (POR)
Power-down reset (BOR)
Independent watchdog reset
Window watchdog reset
Software reset
SWIM reset
Illegal opcode reset
EMS reset: reset generated when some key registers are corrupted or loaded incorrectly
All reset sources ultimately act on the NRST pin and remain low during the reset process. The reset entry vector is located at a fixed address 6000h in the memory map.
Reset Circuit
The reset pin NRST has an internal weak pull-up resistor RPU, which can be used as an input or an open-drain output.
A low-level pulse with a minimum width of 500ns on the reset pin can generate an external reset. The reset detection is asynchronous, so it is possible to enter the reset state even if the MCU is in Halt mode. The
reset pin can also be used as an open-drain output to reset external devices.
Regardless of the internal reset source, once reset, the internal reset circuit will generate a reset pulse with a pulse width of at least 20us.
When no external reset occurs, the internal weak pull-up resistor ensures that the reset pin is at a high level.
Please refer to Figure 11 and the electrical characteristics parameter section in the data sheet for more details.
Internal reset source
In addition to the power-on reset (POR) and power-down reset (BOR), each internal reset source has a flag bit corresponding to it in the reset status register. At reset, these flag bits are set separately according to the reset source that caused the reset. Therefore, these flag bits can be used to indicate the reset source that caused the last reset. The flag bit can be cleared by software writing '1'.
Power-on reset (POR) and power-down reset (BOR)
During power-on of the STM8, the POR keeps the device in reset until the supply voltage (VDD and VDDIO) reaches the start voltage of the BOR. At this point, the BOR reset replaces the POR and the POR is automatically turned off.
The BOR reset continues until the supply voltage reaches the operating voltage. For details, please refer to the electrical characteristics section of the data sheet.
When the operating voltage drops below the threshold VIT-, the BOR will also generate a reset, after which the POR module will be ready to respond to the next power-on reset.
Voltage hysteresis is used to ensure clear detection of voltage rise and fall.
Even if the MCU is in low power mode, the BOR always remains active.
Watchdog reset
For details, see 14 Independent Watchdog (IWDG) and 15 Window Watchdog (WWDG).
Software reset
The application can trigger a reset by clearing the T6 bit in the register WWDG_CR, see 15 Window Watchdog (WWDG).
SWIM reset
An external device connected to the SWIM interface can generate an MCU reset through the SWIM module.
Illegal opcode reset
In order to improve the reliability of STM8 devices and prevent unexpected behavior, an illegal opcode detection system is used. If the executed code does not match any opcode or preset byte, a reset is generated. This function, in conjunction with the watchdog, allows the device to recover from an unexpected error or interference.
Note: An illegal combination of a valid preset byte and a valid opcode will not generate a reset.
EMS reset
In order to avoid accidental write operations or system hangs caused by electromagnetic interference to the application, most key registers have a complementary register corresponding to them. The system will automatically detect whether these key registers match their complementary registers. If they do not match, an EMS reset is generated to restore the application to normal operation.
Previous article:STM8 clock
Next article:STM8 power supply
Recommended ReadingLatest update time:2024-11-23 10:36
- 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
- Energy-saving lamps, ten empirical laws of electronic ballasts continued
- IIC protocol based on STM8--Example--Clock module (DS3231) reading
- RTL Diagram
- STC MCU Selection Guide
- A Implementation of Serial Interface Based on PCI Bus
- MSP430F149 MCU implements uart data receiving interrupt
- How to quickly design an infrared thermometer? Texas Instruments gives you tips!
- 【McQueen Trial】Blink
- Mainstream wireless charging technology
- Business Intelligent Virtual Host is officially launched, the first in the country!