The MCU Control and Status Register provides information about the reset source that caused the MCU to reset.
In ATmega103 compatibility mode only EXTRF and PORF exist.
• Bit 4 – JTRF: JTAG reset flag The
JTAG reset register can be set by the JTAG instruction AVR_RESET, which causes the MCU to reset and sets JTRF. A power-on reset will clear it to 0, and it can also be cleared by writing “0”.
• Bit 3 – WDRF: Watchdog Reset Flag
This bit is set when a watchdog reset occurs. A power-on reset will clear it to 0 and it can also be cleared by writing a “0” to it.
• Bit 2 – BORF: Brownout Detect Reset Flag
This bit is set when a Brownout Detect Reset occurs. It is cleared by a Power-On Reset and can be cleared by writing a “0” to it.
• Bit 1 – EXTRF: External Reset Flag.
Set when an external reset occurs. A power-on reset will clear it to 0 and it can also be cleared by writing a “0” to it.
• Bit 0 – PORF: Power-on reset flag
Set when a power-on reset occurs. Can only be cleared by writing "0".
To use these reset flags to identify a reset condition, the user should read the data of this register as early as possible and then reset it. If this register is reset before other resets occur, the source of subsequent resets can be known by checking the reset flags.
Previous article:ATmega128 reference voltage enable signal and startup time
Next article:ATmega128 Watchdog Reset
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- What to do if the LCD screen is unstable and sometimes displays and sometimes does not display during use?
- Share the timer program of TMS320C6747
- [Good memory is not as good as bad writing] 1. F1 MDK transplantation FreeRTOS practice record 1-dynamic multitasking
- EEWORLD University ----TI DLP? Labs - Light control
- [Experience sharing] [Voice and vision module based on ESP32S3] Software development progress - using openmvIDE to light a lamp
- Recently, my boss has paid special attention to the program protection of laser equipment. Do you have any good methods?
- SensorTile.box firmware update
- CC2640 CC1310 high and low temperature test
- Wanted STM32F103 series chips
- Is it true that without a diode there is no way to oscillate?