CN1329793C - Method for distinguishing system power-on reset and live-line reset - Google Patents

Method for distinguishing system power-on reset and live-line reset Download PDF

Info

Publication number
CN1329793C
CN1329793C CNB2005101241025A CN200510124102A CN1329793C CN 1329793 C CN1329793 C CN 1329793C CN B2005101241025 A CNB2005101241025 A CN B2005101241025A CN 200510124102 A CN200510124102 A CN 200510124102A CN 1329793 C CN1329793 C CN 1329793C
Authority
CN
China
Prior art keywords
reset
resetting
register
programmable logic
logic device
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.)
Expired - Fee Related
Application number
CNB2005101241025A
Other languages
Chinese (zh)
Other versions
CN1776566A (en
Inventor
李刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing property right Bats Exchange Inc
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2005101241025A priority Critical patent/CN1329793C/en
Publication of CN1776566A publication Critical patent/CN1776566A/en
Application granted granted Critical
Publication of CN1329793C publication Critical patent/CN1329793C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a method for distinguishing system power-on resetting and electrified resetting. A register is arranged in a programmable logic device, a value A is given during power-on resetting of the register by using the function of prearrangement of power-on resetting of the programmable logic device, and a resetting value caused by other peripheral operation (I/O pin or register writing operation) is B. After a CPU is started and before the CPU resets the programmable logic device, the value of the registor is firstly read, and if the value of the register is A, the power-on resetting is executed; if not, the electrified resetting is executed, and then, the CPU resets the programmable logic device for preparation for the next judgment. With regard to the system of which the periphery is provided with the programmable logic device, extra hardware cost does not need to be added, and the power-on resetting and the electrified resetting of the system can be reliably and simply distinguished.

Description

Distinguishing system power-on reset and the charged method that resets
Technical field
The invention belongs to Circuits System resetting technique field, relate in particular to a kind of distinguishing system power-on reset and the charged method that resets.
Background technology
Some equipment need be distinguished system reset triggering factors (electrification reset still is charged resetting) after system restart, existing common method is to use the peripheral SRAM of CPU to judge, write specific data (following is example with 0x55) toward certain storage space of SRAM after the system start-up, after starting, system reset reads the data of identical address again, if be still 0x55, think that then system is charged resetting, if be other any value, then is judged as electrification reset.There are two problems in the method:
1, the CPU periphery does not often have SRAM, considers it is very unworthy from the cost aspect if consider to increase a SRAM from the judgement demand that resets specially in such cases;
2, SRAM is a random access memory, and after powering on, each storage space data is uncertain, has the back object space that the powers on possibility identical with presetting number (0x55 mentioned above), and therefore, judgement is insecure, and the possibility of erroneous judgement is arranged.
Therefore, the situation of reset types can't be reliably judged in existence at present.
Summary of the invention
In order to overcome the existing reliably deficiency of decision circuitry system reset type, provide a kind of programming device register distinguishing system power-on reset and charged method that resets utilized.
This paper provides a kind of distinguishing system power-on reset and the charged method that resets, and comprising:
But enable the register electrification reset preparatory function of programmable logic device (PLD), after the electrification reset, the value of establishing corresponding register is predisposed to A so; To device programming, register is set resets (referring to by the IO pin or write register reset) value for B (B is not equal to A), after system's (referring to CPU or microcontroller) starts, read the value of corresponding register, if be A, then be judged as electrification reset, otherwise be judged as charged resetting.
System read the value of corresponding register before the programmable logic device (PLD) that resets.
Resetting of programmable logic device (PLD) directly or indirectly controlled by system.
The invention has the beneficial effects as follows: for complicated slightly Circuits System, the CPU periphery generally all can have CPLD or FPGA to make Glue Logic, and memory interface generally also is the software development Convenient interface, adopt the present invention (only to take logical resource seldom) not increasing under any system hardware condition of cost, need not upgrading hardware and can reliably, simply distinguish electrification reset and charged resetting, can be widely used in having each electronic product of judgement demand of resetting.
Description of drawings
Fig. 1 is the trigger of 1 (or 0) for the D end;
Fig. 2 is not intended to for input directly drives output;
Fig. 3 is 0 for the register electrification reset, and is irrelevant with trigger D end.
Embodiment
Characteristics difference electrification reset and charged resetting that the present invention utilizes programming device register power-up state can predict/be provided with.At present a lot of programming devices provides electrification reset (PoR) function that register can be provided with, and judges that therefore electrification reset and charged resetting only need do following processing:
But 1, enable the register electrification reset pre-value function of programming device during logical design;
2, in the logical design, make the corresponding effectively later on register of programming device Reset signal reset to certain value different with electrification reset.
CPU before the programming device that do not reset, can judge that according to the value of this register electrification reset still is charged resetting after starting.
A preferred embodiment of the present invention is described in detail in detail below.
It is electrification reset or charged resetting that certain network equipment requires distinguishing system.If electrification reset, the DDR-SDRAM of self check CPU mini system after then resetting, and in journal file recording reset types (electrification reset) and temporal information; If charged resetting, the DDR-SDRAM of self check CPU mini system no longer after then resetting, and in journal file, note down reset types (charged resetting) and temporal information.
Certain CPLD of company a slice of using as adhesive logic is arranged on the veneer CPU mini system, and CPLD hangs on the LocalBus of CPU, provides access interface in the SRAM mode in logic.
In the IDE of the said firm compile option is provided with, have power-up don ' t care option provide to this function enable select.If choose, so, the later buffer status of power-up initializing is directly related with synthesis result, and the state of register trigger D end state when powering on determines that the state of Fig. 1 during powering on is equivalent to Fig. 2.That is to say that the Q end also is 1 if the D end is 1, if the D end is 0, the Q end also is 0.If do not choose power-up don ' tcare, so, no matter how trigger D holds state during powering on, the value of register all was 0 (as shown in Figure 3).This option is that the overall situation is effective for whole design, can bring certain area overhead.The device of all these development environment supports all has this function.
At first, in the logical code design 8bit register is set, (refers to that effective reset signal appears in reset pin, do not comprise electrification reset) be set to 0x55 when resetting, this register is read-only can not be write (preventing written in software operation destruction marking position); Be one section simple code sample that Verilog describes below:
module?powerup(Data,Addr,Wr,Rd,Rst,CS);
inout[7:0]Data;
input[2:0]Addr;
input?Wr,Rd,Rst,CS;
wire?PldWr,PldRd;
reg[7:0]PoR;
reg[7:0]Reg1,Reg2,Reg3;
reg[7:0]DataIn;
assign?PldWr=(CS=1′b1&&Rd=1′b1)?1:Wr;
assign?PldRd=(CS=1?′b1)?1:Rd;
assign?Data=(PldRd=1′b1)?8′bzzzzzzzz:DataIn;
always@(posedge?PldWr?or?negedge?Rst)
if(!Rst)
begin
PoR<=8 ' h55; // reset initialization position 0x55
Reg1<=8′h00;
Reg2<=8′h00;
Reg3<=8′h00;
end
else
Case (Addr) // not is to the write operation of PoR, and promptly PoR is read-only, and CPU can't rewrite;
3′b001:Reg1<=Data;
3′b010:Reg2<=Data;
3′b011:Reg3<=Data;
default:;
endcase
always@(negedge?PldRd)
case(Addr)
3′b000:DataIn<=PoR;
3′b001:DataIn<=Reg1;
3′b010:DataIn<=Reg2;
3′b011:DataIn<=Reg3;
default:DataIn<=8′h11;
endcase
endmodule
Annotate: if the PoR bit wide is made as 1, then only take a trigger on the resource, need not 8.
Hook falls (not choosing) Verilog the compiler option power-up don ' t care;
Other place of logic design phase changes according to not needing.
On hardware design, can not directly receive the output that resets of house dog and so on the CPLD, because watchdog chip commonly used provides electrification reset, after powering on, can send reset pulse, this moment, CPLD resetted after being actually and receiving the Reset signal, destroyed the register primary data behind the electrification reset, other similar processing can be sent or use to the reset signal of CPLD by the GPIO of CPU.In a word, after powering on, the reset signal of CPLD should directly or indirectly be controlled (as: by writing reseting register control) by CPU.
On software design, CPU judges that the step of reset mode is as follows:
1, CPU starts;
2, read the corresponding PoR register of CPLD;
If 3 PoR are 0x55, then be judged as charged resetting, follow-uply do not do the internal memory self check, and the record log event is charged resetting; If PoR is 0x00, then be judged as electrification reset, follow-uply do the internal memory self check, and the record log event is an electrification reset;
4, the CPLD that resets makes it all registers and enters predetermined state, the start-up system other parts.

Claims (3)

1, a kind of distinguishing system power-on reset and the charged method that resets comprise:
But enable the register electrification reset prevalue function of programmable logic device (PLD), after the electrification reset, register can be made as prevalue automatically;
To the programming of described programmable logic device (PLD), register is set by the IO pin or write the value that register resets, this reset values is different from above-mentioned prevalue;
After the system start-up, read the data of described register,, then be judged as electrification reset if these data are above-mentioned prevalue; If these data are not above-mentioned prevalues, then be judged as charged resetting.
2, distinguishing system power-on reset as claimed in claim 1 and the charged method that resets, it is characterized in that: system read the value of described register before the programmable logic device (PLD) that resets.
3, distinguishing system power-on reset as claimed in claim 1 or 2 and the charged method that resets is characterized in that: resetting of programmable logic device (PLD) directly or indirectly controlled by system.
CNB2005101241025A 2005-11-25 2005-11-25 Method for distinguishing system power-on reset and live-line reset Expired - Fee Related CN1329793C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101241025A CN1329793C (en) 2005-11-25 2005-11-25 Method for distinguishing system power-on reset and live-line reset

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101241025A CN1329793C (en) 2005-11-25 2005-11-25 Method for distinguishing system power-on reset and live-line reset

Publications (2)

Publication Number Publication Date
CN1776566A CN1776566A (en) 2006-05-24
CN1329793C true CN1329793C (en) 2007-08-01

Family

ID=36766130

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101241025A Expired - Fee Related CN1329793C (en) 2005-11-25 2005-11-25 Method for distinguishing system power-on reset and live-line reset

Country Status (1)

Country Link
CN (1) CN1329793C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101825939A (en) * 2010-04-30 2010-09-08 深圳市芯海科技有限公司 Digital system and power on reset circuit thereof

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100445953C (en) * 2007-01-31 2008-12-24 华为技术有限公司 Method and device for distinguish cool start and hot start
CN101996113B (en) * 2009-08-21 2015-05-20 中兴通讯股份有限公司 Method and device for identifying cause of system reset
CN103793032B (en) * 2012-11-02 2017-09-29 华为技术有限公司 Method and apparatus for determining electrification reset
CN114860052B (en) * 2022-04-29 2024-04-02 上海瑞浦青创新能源有限公司 Program execution judging method, device, equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1435743A (en) * 2002-01-29 2003-08-13 深圳市中兴通讯股份有限公司上海第二研究所 Reset method
US6728891B2 (en) * 1998-10-30 2004-04-27 Fairchild Semiconductor Corporation Method and circuit for performing automatic power on reset of an integrated circuit
CN1510565A (en) * 2002-12-24 2004-07-07 深圳市中兴通讯股份有限公司上海第二 Reset circuit and control method for embedded system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6728891B2 (en) * 1998-10-30 2004-04-27 Fairchild Semiconductor Corporation Method and circuit for performing automatic power on reset of an integrated circuit
CN1435743A (en) * 2002-01-29 2003-08-13 深圳市中兴通讯股份有限公司上海第二研究所 Reset method
CN1510565A (en) * 2002-12-24 2004-07-07 深圳市中兴通讯股份有限公司上海第二 Reset circuit and control method for embedded system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101825939A (en) * 2010-04-30 2010-09-08 深圳市芯海科技有限公司 Digital system and power on reset circuit thereof
CN101825939B (en) * 2010-04-30 2012-06-27 深圳市芯海科技有限公司 Digital system and power on reset circuit thereof

Also Published As

Publication number Publication date
CN1776566A (en) 2006-05-24

Similar Documents

Publication Publication Date Title
US6718274B2 (en) Integrated PC Card host controller for the detection and operation of a plurality of expansion cards
US6574695B1 (en) System and method for providing hot swap capability using existing circuits and drivers with minimal changes
US5729683A (en) Programming memory devices through the parallel port of a computer system
US6813668B2 (en) Multi-functional electronic card capable of detecting removable cards
EP1215586A2 (en) Configuring memory and registers from a serial device
TWI389031B (en) Embedded electronic device and booting method thereof
CN1329793C (en) Method for distinguishing system power-on reset and live-line reset
US5948076A (en) Method and system for changing peripheral component interconnect configuration registers
US20060206286A1 (en) Method to reduce IPMB traffic and improve performance for accessing sensor data
CN107729071B (en) A kind of method and device initializing network interface card
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
US7080164B2 (en) Peripheral device having a programmable identification configuration register
CN112231005A (en) Method for managing FPGA (field programmable Gate array) version based on UBOOT (Universal boot on Board)
TWI467367B (en) Detecting method and apparatus for hot swapped sd card
US6704850B1 (en) Method and apparatus for determining the width of a memory subsystem
US6948057B2 (en) Memory modules storing therein boot codes and method and device for locating same
US9965417B1 (en) Use of interrupt memory for communication via PCIe communication fabric
EP2207100B1 (en) System and method for data recovery in a disabled integrated circuit
US7266680B1 (en) Method and apparatus for loading configuration data
US7979606B2 (en) Method for storing data
US20230059620A1 (en) eFUSE ONE-TIME PROGRAMMABLE MEMORY WITH INTER INTEGRATED CIRCUIT (I2C) COMMUNICATION AND OPERATION METHOD THEREOF
CN104077245A (en) NVRAM (non-volatile random access memory) control method and system
US20030084257A1 (en) Flash emulator
TWI473110B (en) Flash memory apparatus with serial interface and rsest method thereof
CN109416708B (en) Unit for managing technical information in a field

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: HUAWEI TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: GANGWAN NETWORK CO., LTD.

Effective date: 20060922

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20060922

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant after: Huawei Technologies Co., Ltd.

Address before: 100094 harbour network research and development center, No. 17, Zhongguancun Software Park, No. 8 northeast Wang Xi Road, Beijing, Haidian District

Applicant before: Harbour Networks Holdings Limited

C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING EQUITY EXCHANGE CO., LTD.

Free format text: FORMER OWNER: HUAWEI TECHNOLOGY CO LTD

Effective date: 20120323

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518129 SHENZHEN, GUANGDONG PROVINCE TO: 100033 XICHENG, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20120323

Address after: 100033, No. 17, Finance Street, Beijing, Xicheng District

Patentee after: Beijing property right Bats Exchange Inc

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: Huawei Technologies Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070801

Termination date: 20151125

EXPY Termination of patent right or utility model