CN105204953A - Method for using IWDG (independent watchdog) in low-power-consumption application of STM32 single chip microcomputer - Google Patents
Method for using IWDG (independent watchdog) in low-power-consumption application of STM32 single chip microcomputer Download PDFInfo
- Publication number
- CN105204953A CN105204953A CN201510544820.1A CN201510544820A CN105204953A CN 105204953 A CN105204953 A CN 105204953A CN 201510544820 A CN201510544820 A CN 201510544820A CN 105204953 A CN105204953 A CN 105204953A
- Authority
- CN
- China
- Prior art keywords
- low
- chip microcomputer
- dormancy
- power consumption
- reset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Microcomputers (AREA)
- Power Sources (AREA)
Abstract
The invention relates to the technical field of embedded development, in particular to a method for using an IWDG (independent watchdog) in the low-power-consumption application of an STM32 single chip microcomputer. According to the method for using the IWDG in the low-power-consumption application of the STM32 single chip microcomputer, , the IWDG can be closed through resetting in the STM32 single chip microcomputer, that is, system reset is performed before the single chip microcomputer enters a low-power-consumption mode, and accordingly, the IWDG is closed; then, a system enters a low-power-consumption mode, and the IWDG of the STM32 can be used, and normal work of the low-power-consumption mode can be guaranteed.
Description
Technical field
The present invention relates to embedded development technical field, particularly in a kind of STM32 single-chip microcomputer low-power consumption application, use the method for independent house dog.
Background technology
Independent house dog (IWDG) and low-power consumption mode often can be used in STM32 exploitation; house dog is to detect and solve the fault caused by software error, and low-power consumption mode continues to enter into park mode in order to save electric energy when running to not need at CPU.Wherein the clock of independent house dog is provided by independently RC oscillator (STM32F10x is generally 40kHz), even if when major clock breaks down, also still effective, therefore can work under stopping and park mode.And independent house dog is once start, and except system reset, can not be stopped by software.A problem of such initiation cannot feed dog because CPU is out of service after MCU enters into low-power consumption mode, can cause system frequent recovery.How in low-power consumption application, independent house dog is used to become in STM32 microcomputer development the problem faced by needing.
Summary of the invention
In order to solve the problem of prior art, the invention provides the method using independent house dog in a kind of STM32 single-chip microcomputer low-power consumption application, method make use of STM32 single-chip microcomputer and (namely before single-chip microcomputer enters low-power consumption mode, carries out system reset by the method for closing independent house dog that resets, thus close independent house dog), make system enter low-power consumption mode afterwards, thus reach the object of the normal work not only using the independent house dog of STM32 but also low-power consumption mode can be ensured.
The technical solution adopted in the present invention is as follows:
Use a method for independent house dog in STM32 single-chip microcomputer low-power consumption application, comprise the following steps:
After A, STM32 Single Chip Microcomputer (SCM) system powers on, carry out system initialization, because dormancy mark original state is reset mode, so house dog is activated and enters task work status;
After B, system task are disposed, dormancy mark is set, and expression system is about to enter low power consumpting state and carries out software reset;
After C, system reset, detect that dormancy is masked as SM set mode, then reset this dormancy mark, then enters the low power consumpting state of dormancy.
Method also comprises step D: after the low-power consumption mode of dormancy is waken up, and again detects dormancy zone bit, because this zone bit before entering low-power consumption mode is reset, so system opens house dog, enters duty.
Dormancy mark in step B is stored in STM32 back-up registers, can not lose after system reset.
Method of the present invention has following three features:
1, in this method, the unlatching of STM32 single-chip microcomputer independence house dog adopts software control;
2, for dormancy flag data after guarantee STM32 monolithic processor resetting is not lost, this flag data is stored in single-chip microcomputer back-up registers;
3, before system enters low-power consumption mode, carry out software reset STM32 single-chip microcomputer, object is resetted by STM32 Single Chip Microcomputer (SCM) system to close house dog.
To sum up, method of the present invention make use of STM32 single-chip microcomputer and (namely before single-chip microcomputer enters low-power consumption mode, carries out system reset by the method for closing independent house dog that resets, thus close independent house dog), make system enter low-power consumption mode afterwards, thus reach the object of the normal work not only using the independent house dog of STM32 but also low-power consumption mode can be ensured.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram using the method for independent house dog in a kind of STM32 single-chip microcomputer low-power consumption application of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment one
As shown in Figure 1, use the method for independent house dog in a kind of STM32 single-chip microcomputer low-power consumption application of the present embodiment, comprise the following steps:
After A, STM32 Single Chip Microcomputer (SCM) system powers on, carry out system initialization, because dormancy mark original state is reset mode, so house dog is activated and enters task work status;
After B, system task are disposed, dormancy mark is set, and expression system is about to enter low power consumpting state and carries out software reset; Dormancy mark is stored in STM32 back-up registers, can not lose after system reset;
After C, system reset, detect that dormancy is masked as SM set mode, then reset this dormancy mark, then enters the low power consumpting state of dormancy;
After the low-power consumption mode of D, dormancy is waken up, again detect dormancy zone bit, because this zone bit before entering low-power consumption mode is reset, so system opens house dog, enter duty.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (3)
1. use a method for independent house dog in STM32 single-chip microcomputer low-power consumption application, comprise the following steps:
After A, STM32 Single Chip Microcomputer (SCM) system powers on, carry out system initialization, because dormancy mark original state is reset mode, so house dog is activated and enters task work status;
After B, system task are disposed, dormancy mark is set, and expression system is about to enter low power consumpting state and carries out software reset;
After C, system reset, detect that dormancy is masked as SM set mode, then reset this dormancy mark, then enters the low power consumpting state of dormancy.
2. in a kind of STM32 single-chip microcomputer low-power consumption application according to claim 1, use the method for independent house dog, it is characterized in that, described method also comprises step D: after the low-power consumption mode of dormancy is waken up, again detect dormancy zone bit, because this zone bit before entering low-power consumption mode is reset, so system opens house dog, enter duty.
3. use the method for independent house dog in a kind of STM32 single-chip microcomputer low-power consumption application according to claim 1, it is characterized in that, the dormancy mark in described step B is stored in STM32 back-up registers, can not lose after system reset.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510544820.1A CN105204953A (en) | 2015-08-31 | 2015-08-31 | Method for using IWDG (independent watchdog) in low-power-consumption application of STM32 single chip microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510544820.1A CN105204953A (en) | 2015-08-31 | 2015-08-31 | Method for using IWDG (independent watchdog) in low-power-consumption application of STM32 single chip microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105204953A true CN105204953A (en) | 2015-12-30 |
Family
ID=54952648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510544820.1A Pending CN105204953A (en) | 2015-08-31 | 2015-08-31 | Method for using IWDG (independent watchdog) in low-power-consumption application of STM32 single chip microcomputer |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105204953A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108621A (en) * | 2016-11-25 | 2018-06-01 | 联想(上海)信息技术有限公司 | Indicate that control card realizes the method, apparatus and electronic equipment of self-protection |
CN113778724A (en) * | 2021-05-17 | 2021-12-10 | 北京科益虹源光电技术有限公司 | Method and device for shielding watchdog |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101261134A (en) * | 2008-01-04 | 2008-09-10 | 北京航空航天大学 | Vehicle mounted positioning navigation terminal facing emergent rescuing |
US20110119420A1 (en) * | 2009-11-13 | 2011-05-19 | Canon Kabushiki Kaisha | Electronic device |
CN103885563A (en) * | 2014-03-31 | 2014-06-25 | 浙江知祺电力自动化有限公司 | Management circuit for self-powered microprocessor protection device microprocessor |
CN104679601A (en) * | 2013-11-28 | 2015-06-03 | 中国航空工业集团公司第六三一研究所 | Watchdog starting method of interference preventing system |
CN104750567A (en) * | 2015-03-26 | 2015-07-01 | 南京大全自动化科技有限公司 | Watchdog reset method based on FPGA |
-
2015
- 2015-08-31 CN CN201510544820.1A patent/CN105204953A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101261134A (en) * | 2008-01-04 | 2008-09-10 | 北京航空航天大学 | Vehicle mounted positioning navigation terminal facing emergent rescuing |
US20110119420A1 (en) * | 2009-11-13 | 2011-05-19 | Canon Kabushiki Kaisha | Electronic device |
CN104679601A (en) * | 2013-11-28 | 2015-06-03 | 中国航空工业集团公司第六三一研究所 | Watchdog starting method of interference preventing system |
CN103885563A (en) * | 2014-03-31 | 2014-06-25 | 浙江知祺电力自动化有限公司 | Management circuit for self-powered microprocessor protection device microprocessor |
CN104750567A (en) * | 2015-03-26 | 2015-07-01 | 南京大全自动化科技有限公司 | Watchdog reset method based on FPGA |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108621A (en) * | 2016-11-25 | 2018-06-01 | 联想(上海)信息技术有限公司 | Indicate that control card realizes the method, apparatus and electronic equipment of self-protection |
CN113778724A (en) * | 2021-05-17 | 2021-12-10 | 北京科益虹源光电技术有限公司 | Method and device for shielding watchdog |
CN113778724B (en) * | 2021-05-17 | 2024-03-22 | 北京科益虹源光电技术有限公司 | Method and device for shielding watchdog |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI475368B (en) | Power control system and method thereof | |
CN101578563B (en) | Reducing idle leakage power in an IC | |
CN101859172A (en) | Integrated circuit SoC chip circuit structure capable of realizing power reduction and method thereof | |
CN104281465B (en) | Computer and awakening method thereof | |
CN103105915A (en) | Intelligent terminal reset method and intelligent terminal reset system | |
CN105446916B (en) | USB bus state switching method and device | |
CN105468470A (en) | D-triggering watchdog MCU monitoring circuit and use method thereof | |
CN100561405C (en) | Method for managing power supply under the computer system electricity-saving state | |
CN105204953A (en) | Method for using IWDG (independent watchdog) in low-power-consumption application of STM32 single chip microcomputer | |
US20140059372A1 (en) | Method and apparatus to save power upon resume in multi-core system | |
WO2020151263A1 (en) | Power supply control device for chip, chip, and power supply control method therefor | |
CN104267796A (en) | Design method of intelligent redundant framework of server power supply | |
CN202522610U (en) | Direct current power supply power failure monitoring device | |
CN103617475A (en) | A system and a method of energy efficiency management used for a micro remote tracker | |
CN111176408B (en) | SoC low-power-consumption processing method and device | |
CN104076892A (en) | Power supply management method and power supply management system | |
CN104484008A (en) | Handling method and handling device for low power consumption of chip | |
CN105630567A (en) | Online debugging circuit of singlechip system | |
CN1858676B (en) | Method for setting equipment power management state and equipment power consumption saving method | |
CN103376877A (en) | Multi core processor clock control device and method | |
CN103984543A (en) | Method for implementing standby, hibernation and wake-up on domestic FeiTeng processor | |
CN205566656U (en) | Low power consumption control system | |
CN204480169U (en) | A kind of network state Intellectual reset circuit | |
CN207067727U (en) | Wireless awakening SCM system | |
TWI460595B (en) | Power management method for external electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20151230 |