CN101174221A - Electric system storing starting code by flash memory and its start method - Google Patents

Electric system storing starting code by flash memory and its start method Download PDF

Info

Publication number
CN101174221A
CN101174221A CNA2006101433208A CN200610143320A CN101174221A CN 101174221 A CN101174221 A CN 101174221A CN A2006101433208 A CNA2006101433208 A CN A2006101433208A CN 200610143320 A CN200610143320 A CN 200610143320A CN 101174221 A CN101174221 A CN 101174221A
Authority
CN
China
Prior art keywords
electronic system
boot code
flash memory
boot
type flash
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
Application number
CNA2006101433208A
Other languages
Chinese (zh)
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.)
Magic Pixel Inc
Original Assignee
Magic Pixel Inc
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 Magic Pixel Inc filed Critical Magic Pixel Inc
Priority to CNA2006101433208A priority Critical patent/CN101174221A/en
Publication of CN101174221A publication Critical patent/CN101174221A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Retry When Errors Occur (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention relates to a starting method of an electronic system, which is characterized in that the electronic system is started with a processor according to the starting codes in a NAND type flash memory. The method comprises the following steps: firstly, the NAND type flash memory is provided, and at least one part or a plurality of parts of complete starting codes are stored in the flash memory; secondly, a hardware reset signal is responded to duplicate a first starting code to a present address execute memory; thirdly, the processor executes the starting codes in the present address execute memory to start the electronic system; fourthly, after the delay of a specific period of time, whether the starting of the electronic system succeeds is judged; fifthly, when the starting of the electronic system fails, the electronic system is reset, and a second starting code is duplicated to the present address execute memory; sixthly, the processor executes the starting codes in the present address execute memory to start the electronic system, and if the starting still fails, the former operations are repeated until the starting succeeds.

Description

Electronic system and starting-up method with the flash memory storage boot code
Technical field
The present invention is relevant for a kind of electronic system, and particularly relevant for a kind of electronic system with NAND type flash memory (Flash) storage boot code.
Background technology
Traditional electronic system with NAND type flash memory storage boot code is stored a boot code in NAND type flash memory.When the electronic system desire is started shooting, the boot code in the NAND type flash memory is copied to the present location carry out (Execute In Place, XIP) storer, and the boot code that the processor of electronic system is carried out in the execute store of present location is started shooting electronic system.Yet, because NAND type flash memory easily after long repeated use, produces the bad problem of bit loss.So, when the corrupted of the part position of storage boot code, traditional electronic system with NAND type flash memory storage boot code can't be started shooting because of the boot code corrupted.
Summary of the invention
In view of this, purpose of the present invention is exactly that a kind of electronic system and starting-up method thereof with NAND type flash memory (Flash) storage boot code (Boot Code) is being provided.Electronic system of the present invention can be improved the shortcoming that traditional electronic system can't be started shooting because of NAND type flash memory corrupted easily effectively.
According to purpose of the present invention, a kind of electronic system with NAND type flash memory storage boot code is proposed, comprise: (Execute In Place, XIP) storer, processor, NAND type flash memory, NAND type flash memory controller, boot program controller (Sequencer) and timer are carried out in the present location.Processor and present location execute store couple, to carry out the program code in the execute store of present location.NAND type flash memory comprises the first boot code store storage piece and the second boot code store storage piece, and it is respectively in order to storing first boot code and second boot code, and first and second boot code is for equating, and all can be used to do complete boot program.NAND type flash memory controller is in order to the read operation of control NAND type flash memory, and in order to the program code in the NAND type flash memory is copied to the present location execute store.The boot program controller is controlled NAND type flash memory controller in response to the hardware reset signal and is duplicated first boot code to the present location execute store.By this, processor is carried out first boot code in the execute store of present location, and electronic system is started shooting.Timer response postpones one section special time in the hardware reset signal, and detects the success of whether starting shooting of this electronic system after postponing this special time, judges whether to restart the boot program controller then.Wherein, when the electronic system boot failure, boot program controller replacement electronic system and timer, and control NAND type flash memory controller duplicates second boot code to the present location execute store.Processor is carried out second boot code in the execute store of present location, and electronic system is started shooting.
According to another object of the present invention, a kind of starting-up method of electronic system is proposed, processor can be started shooting electronic system according to the boot code in the NAND type flash memory.The starting-up method of electronic system comprises following step.At first, provide NAND type flash memory, wherein have first boot code and second boot code.Then, duplicate first boot code to the present location execute store in response to the hardware reset signal.Then, processor is carried out first boot code in the execute store of present location, and electronic system is started shooting.Then, postpone to judge behind one section special time the electronic system success of whether starting shooting.Then, when the electronic system boot failure, the replacement electronic system, and duplicate second boot code to the present location execute store.Afterwards, processor is carried out second boot code in the execute store of present location, and electronic system is started shooting.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent, a preferred embodiment cited below particularly, and conjunction with figs. are described in detail as follows:
Description of drawings
Fig. 1 represents the calcspar with the electronic system of NAND type flash memory storage boot code according to a preferred embodiment of the present invention.
The process flow diagram of the starting-up method of Fig. 2 presentation graphs 1 electronic system 100.
The main element symbol description
100: electronic system
102:NAND type flash memory
1021-102n, 1161-116m: boot code store storage piece
104: the present location execute store
106:NAND type flash memory controller
108: the boot program controller
110: timer
112: processor
114: open state flag unit
Ad1-Adn: address signal
HR: hardware reset signal
HD: halt signal
Flag: flag signals
202-212: operation steps
Embodiment
Electronic system with NAND type flash memory (Flash) storage boot code (Boot Code) of the present invention is stored at least two group boot code in NAND type flash memory.Electronic system with NAND type flash memory storage boot code of the present invention also has a boot program controller, and during with the first boot code corrupted in two groups of boot code, the control electronic system is started shooting according to another group boot code.
Please refer to Fig. 1, its expression is according to the calcspar with the electronic system of NAND type flash memory storage boot code of a preferred embodiment of the present invention.Electronic system 100 comprises NAND type flash memory 102, present location execution (Execute In Place, XIP) storer 104, NAND type flash memory controller 106, boot program controller 108, timer 110 and processor 112.
NAND type flash memory 102 comprises boot code store storage piece 1021-102n, and it stores the 1st boot code (not shown), the 2nd boot code (not shown) respectively ... and n boot code (not shown).Wherein, n is the natural number greater than 1, and the 1st to the n boot code boot code for equating for example, and it is the boot code that can be used to the complete boot program.NAND type flash memory controller 106 is in order to the read operation of control NAND type flash memory 102, and in order to the program code in the NAND type flash memory 102 is copied to present location execute store 104.Processor 112 couples with present location execute store 104, to carry out the program code in the present location execute store 104.
Boot program controller 108 is in response to hardware reset signal HR, control NAND type flash memory controller 106 and duplicate the 1st boot code in the boot code store storage piece 1021, and the 1st boot code that processor 112 is carried out in the present location execute stores 104 is come electronic system 100 starts to present location execute store 104.Timer 110 also postpones one section special time in response to hardware reset signal HR, and whether startup boot program controller 108 measurement processor 112 start shooting successfully according to the 1st boot code after postponing special time.Wherein, the length of special time for example greater than NAND type flash memory controller 106 with boot code copy to time of present location execute store 104 and processor 112 carry out boot code finish electronic system 100 the start operation time and.
When processor 112 during according to the 1st boot code boot failure, boot program controller 108 is carried out and is restarted flow process, with replacement electronic system 100 and timer 110, and control NAND type flash memory controller 106 duplicates the 2nd boot code in the boot code store storage piece 1022 to present location execute store 104, and the 2nd boot code that processor 112 is carried out in the present location execute stores 104 comes electronic system 100 is started shooting.And timer 110 also self reset moved and postponed to start again behind this special time the success of whether starting shooting of boot program controller 108 detected electrons systems 100.
When processor 112 according to the 2nd boot code still during boot failure, boot program controller 108 is carried out again and is restarted flow process, with replacement electronic system 100 and timer 110, and control NAND type flash memory controller 106 duplicates the 3rd boot code in the boot code store storage piece 1023 to present location execute store 104, and the 3rd boot code that processor 112 is carried out in the present location execute stores 104 comes this electronic system is started shooting.And timer 110 also self reset moved and postponed to start again behind this special time the success of whether starting shooting of boot program controller 108 detected electrons systems 100.Boot program controller 108 repeats the above-mentioned flow process that restarts, and detects up to boot program controller 108 and stops its operation when processor 112 is started shooting successfully.
Electronic system 100 also comprises open state flag device 114, and it is in order to output flag signals Flag.To boot program controller 108, and judge according to the signal level of flag signals Flag whether electronic system 100 starts shooting and successfully explain for example by boot program controller 108 with open state flag device 114 output flag signals Flag for present embodiment.Flag signals Flag for example has an original levels.Processor 112 is connected with open state flag device 114, and for example has flag signals level setting program code in the 1-n boot code.When processor 112 execution 1-n boot code starts of finishing electronic system 100 are wherein operated, processor 112 is also carried out this flag signals Flag level setting program code, is set at a termination level with the signal level with flag signals Flag by original levels.
So, when the signal level of boot program controller 108 detection flag signals Flag is original levels, expression processor 112 can't be finished the start operation of electronic system 100 according to the boot code in the present location execute store 104, and then the signal level of flag signals Flag can't be set at termination level, that is electronic system 100 boot failures.At this moment, boot program controller 108 is carried out and is restarted flow process, and processor 112 is started shooting to electronic system 100 according to the boot code in the next boot code store storage piece.And when the signal level of boot program controller 108 detection flag signals Flag is termination level, expression processor 112 is finished the start operation of electronic system 100, and the signal level of flag signals Flag is set at termination level, that is electronic system 100 is started shooting successfully.
The NAND type flash memory 102 of present embodiment also comprises program code store storage piece 1161-116m, and it is respectively in order to store a plurality of application codes, and wherein, m is the natural number greater than 1.When boot program controller 108 detects electronic system 100 and starts shooting successfully, control NAND type flash memory controller 106 copies to the application code in the program code store storage piece 1161-116m program code store storage piece wherein in the present location execute store 104, and processor 112 is carried out other application operatings of electronic system 100 according to the application code in the present location execute store 104.
In the present embodiment, the memory capacity size of the boot code store storage piece 1021-102n of NAND type flash memory 102 is for example for equating, boot code store storage piece 1021-102n for example is adjacent boot code store storage piece, and the start address of storage block boot code store storage piece 1021 for example is zero.Boot program controller 108 is OPADD signal Ad1-Adn to NAND type flash memory controller 106 for example, read 1-n boot code among the boot code store storage piece 1021-102n with control NAND type flash memory controller 106, and control NAND type flash memory controller 106 copies to 1-n boot code in the present location execute store 104.Address signal Ad1-Adn is for example corresponding with the start address of boot code store storage piece 1021-102n respectively, and boot program controller 108 for example obtains address signal Ad2-Adn with the method for the address signal difference that adds up according to address signal Ad1.Wherein, this address signal difference for example is the difference of address signal Ad2 and Ad1.
The boot program controller 108 of present embodiment also be used to NAND type flash memory controller 106 duplicate 1-n boot code wherein one during to present location execute store 104, output halt signal HD is to processor 112, to suspend processor 112 operations in this boot code reproduction process.And the boot program controller 108 of present embodiment also in NAND type flash memory controller 106 duplicate 1-n boot code wherein one remove halt signal HD after finishing to the operation of present location execute store 104, but make processor 112 normal runnings, to carry out 1-n boot code coming wherein in the present location execute store 104 to electronic system 100 starts.
Please refer to Fig. 2, the process flow diagram of the starting-up method of its presentation graphs 1 electronic system 100.The starting-up method of present embodiment comprises following step:
At first,, provide NAND type flash memory 102, have boot code store storage piece 1021-102n to store 1-n boot code respectively as step 202.
Then,, duplicate the 1st boot code to present location execute store 104, and suspend the running of processor 112 in response to hardware reset signal HR as step 204.
Then, as step 206, the 1st boot code that processor 112 is carried out in the present location execute store 104 is come electronic system 100 starts.
Then,, postpone to judge behind one section special time electronic system 100 success of whether starting shooting as step 208, if not, execution in step 210.
Then, as step 210, replacement electronic system 210 to be duplicating the 2nd boot code to present location execute store 104, and suspends the running of processor 112.
Afterwards, as step 212, the 2nd boot code that processor 212 is carried out in the present location execute store 104 is come electronic system 100 starts.Then, if electronic system 100 boot failure still, the step of repeating step 208-212 makes processor 112 carry out 3-n boot code to come to electronic system 100 starts, till electronic system 100 is started shooting successfully in regular turn.
Though present embodiment is only to export flag signals Flag to boot program controller 108, so that whether its detected electrons system 100 starts shooting successfully explain for example, yet, flag signals Flag is not limited to directly import boot program controller 108, and also can import timer 110, stop the timing operation of timer 110 when being termination level with signal level in flag signals Flag.Whether boot program controller 108 stops judging electronic system 100 success of whether starting shooting with the timing of timer 110 operation.If the timing of timer 110 operation is stopped by flag signals Flag, expression electronic system 100 is started shooting successfully; If the timing of timer 110 operation is not stopped by flag signals Flag, expression electronic system boot failure.
The electronic system of present embodiment and starting-up method are stored many parts of boot code in NAND type flash memory, and it is next when the boot code corrupted that the boot program controller is set, and start shooting according to following a boot code.So, the electronic system of present embodiment and starting-up method can improve effectively in the NAND type flash memory of conditional electronic system and only have a boot code, and easily when the boot code store storage piece of storage boot code produces corrupted, the problem that can't start shooting.In addition, when the boot code number of storing in the NAND type flash memory of the electronic system of present embodiment was more than enough, the electronic system of present embodiment also had the capable of starting up advantage of assurance.
In sum; though the present invention with preferred embodiment openly as above; right its is not in order to limit the present invention; any those skilled in the art; under the situation that does not break away from the spirit and scope of the present invention; can change and modification, so protection scope of the present invention is as the criterion with the claim institute restricted portion that is proposed.

Claims (10)

1. electronic system with NAND type flash memory storage boot code comprises:
(XIP) memory storage is carried out in one present location;
One processor is carried out the program code in this present location execute store;
One NAND type flash memory comprises one first boot code store storage piece and one second boot code store storage piece, this first and the boot code of this second storage block storage for equating;
One NAND type flash memory controller, in order to controlling the read operation of this NAND type flash memory, and in order to the program code in this NAND type flash memory is copied to this present location execute store;
One boot program controller is controlled this NAND type flash memory controller in response to a hardware reset signal and is duplicated this first boot code to this present location execute store, and this processor is carried out boot code in this present location execute store, comes this electronic system start; And
One timer postpones a special time in response to this hardware reset signal, and detects the success of whether starting shooting of this electronic system after postponing this special time, judges whether to restart this boot program controller then;
Wherein, when this electronic system boot failure, this boot program controller reset this electronic system and this timer, and control this NAND type flash memory controller and duplicate this second boot code to this present location execute store, this processor is carried out this second boot code in this present location execute store, comes this electronic system start.
2. electronic system as claimed in claim 1 wherein also comprises one the 3rd storage block in this NAND type flash memory, in order to store one the 3rd boot code;
Wherein, this timer starts this boot program controller and judges this success of whether starting shooting after postponing this special time, when this electronic system boot failure, this boot program controller this electronic system of resetting, and control this NAND type flash memory controller and duplicate the 3rd boot code to this present location execute store, this processor is carried out the 3rd boot code in this present location execute store, comes this electronic system start.
3. electronic system as claimed in claim 1, wherein this electronic system also comprises:
One open state flag unit, in order to exporting a flag signals to this boot program controller, this boot program controller is judged the success of whether starting shooting of this electronic system according to the signal level of this flag signals;
Wherein, this flag signals has an original levels, when the signal level of this flag signals is this original levels, represents that this electronic system do not start shooting successfully as yet;
Wherein, finishing the signal level of setting this flag signals after the start of this electronic system when this processor is a termination level, starts shooting successfully to represent this electronic system.
4. electronic system as claimed in claim 1, wherein this open state flag device is exported this flag signals to this timer, stop the running of this timer when being this termination level, make this boot program controller detect this electronic system and start shooting successfully with signal level in this flag signals.
5. electronic system as claimed in claim 1, wherein the output of this boot program controller respectively with this first, corresponding one first address signal, one second address signal and the three-address signal of start address of this second and the 3rd boot code store storage piece, control this NAND type flash memory controller duplicate this first, in this second and the 3rd boot code store storage piece this first, this second and the 3rd boot code is to this present location execute store.
6. electronic system as claimed in claim 1, wherein this boot program controller in this NAND type flash memory controller duplicate this first, this second and the 3rd boot code wherein one during to this present location execute store, export a halt signal to this processor and make this processor pausing operation.
7. electronic system as claimed in claim 1, wherein this boot program controller also in this NAND type flash memory controller duplicate this first, this second and the 3rd boot code wherein one remove this halt signal after finishing to the operation of this present location execute store, make this processor carry out this first, this second and the 3rd boot code wherein one to this electronic system start.
8. the starting-up method of an electronic system can come to electronic system start one processor according to the boot code in the NAND type flash memory, and this starting-up method comprises:
(a) provide a NAND type flash memory, this NAND type flash memory has one first boot code and one second boot code;
(b) duplicate this first boot code to a present location execute store in response to a hardware reset signal;
(c) this processor is carried out this first boot code in this present location execute store, comes this electronic system start;
(d) postpone to judge behind the special time success of whether starting shooting of this electronic system, if not, execution in step (e);
(e) this electronic system of resetting, and duplicate this second boot code to this present location execute store; And
(f) this processor is carried out this second boot code in this present location execute store, comes this electronic system start.
9. starting-up method as claimed in claim 8 wherein also comprises:
(b ') suspends the running of this processor when duplicating this first boot code to this present location execute store.
10. starting-up method as claimed in claim 8 wherein also comprises:
(e ') suspends the running of this processor when duplicating this second boot code to this present location execute store.
CNA2006101433208A 2006-11-03 2006-11-03 Electric system storing starting code by flash memory and its start method Pending CN101174221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006101433208A CN101174221A (en) 2006-11-03 2006-11-03 Electric system storing starting code by flash memory and its start method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006101433208A CN101174221A (en) 2006-11-03 2006-11-03 Electric system storing starting code by flash memory and its start method

Publications (1)

Publication Number Publication Date
CN101174221A true CN101174221A (en) 2008-05-07

Family

ID=39422746

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006101433208A Pending CN101174221A (en) 2006-11-03 2006-11-03 Electric system storing starting code by flash memory and its start method

Country Status (1)

Country Link
CN (1) CN101174221A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930374A (en) * 2009-06-26 2010-12-29 和硕联合科技股份有限公司 Peripheral control module, computer system and operating method of computer system
CN101493776B (en) * 2009-02-18 2012-08-22 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and power-on method and system thereof
CN102722423A (en) * 2011-03-29 2012-10-10 比亚迪股份有限公司 Portable terminal and self-restoration method thereof
CN102736666A (en) * 2011-04-12 2012-10-17 群联电子股份有限公司 Reference frequency setting method, memory controller and flash memory storage device
CN104268026A (en) * 2014-09-15 2015-01-07 曙光信息产业(北京)有限公司 Monitoring and management method and device for embedded system
US9003100B2 (en) 2011-03-31 2015-04-07 Phison Electronics Corp. Reference frequency setting method, memory controller, and flash memory storage apparatus
CN113495848A (en) * 2020-04-08 2021-10-12 慧荣科技股份有限公司 Flash memory device, card opening method of flash memory device and computer readable storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493776B (en) * 2009-02-18 2012-08-22 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and power-on method and system thereof
CN101930374A (en) * 2009-06-26 2010-12-29 和硕联合科技股份有限公司 Peripheral control module, computer system and operating method of computer system
CN101930374B (en) * 2009-06-26 2013-08-21 和硕联合科技股份有限公司 Peripheral control module, computer system and operating method of computer system
CN102722423A (en) * 2011-03-29 2012-10-10 比亚迪股份有限公司 Portable terminal and self-restoration method thereof
US9003100B2 (en) 2011-03-31 2015-04-07 Phison Electronics Corp. Reference frequency setting method, memory controller, and flash memory storage apparatus
CN102736666A (en) * 2011-04-12 2012-10-17 群联电子股份有限公司 Reference frequency setting method, memory controller and flash memory storage device
CN102736666B (en) * 2011-04-12 2016-03-30 群联电子股份有限公司 Reference frequency establishing method, Memory Controller and flash memory
CN104268026A (en) * 2014-09-15 2015-01-07 曙光信息产业(北京)有限公司 Monitoring and management method and device for embedded system
CN104268026B (en) * 2014-09-15 2018-06-26 曙光信息产业(北京)有限公司 The method for managing and monitoring and device of embedded system
CN113495848A (en) * 2020-04-08 2021-10-12 慧荣科技股份有限公司 Flash memory device, card opening method of flash memory device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US7870378B2 (en) Electronic system with NAND flash memory storing boot code and highly reliable boot up method
CN101174221A (en) Electric system storing starting code by flash memory and its start method
TWI684868B (en) Memory controller and operating method thereof, and controlling method of a memory system
CN103116532B (en) Damage in fault from the storehouse embedded software system and recover
JP5575338B2 (en) Information processing apparatus, information processing method, and computer program
TWI703498B (en) Memory device and associated boot code loading method of electronic device
US8661232B2 (en) Register state saving and restoring
US20080109798A1 (en) Methods for performing resilient firmware upgrades to a functioning memory
TWI490876B (en) Method and apparatus of system boot and pilot process
WO2012071945A1 (en) Method and device for backing up and upgrading bootstrap
CN102135927A (en) Method and device for system booting based on NAND FLASH
CN105589765A (en) Method for realizing program backup
CN102750191A (en) Method for initiating a refresh operation in a solid-state nonvolatile memory device
US10395038B2 (en) System and method for automatic recovery of firmware image
CN101206579A (en) Computer system capable of avoiding update of basic input /output system program from failing and updating method thereof
CN106775674B (en) Equipment based on universal boot loader and starting method thereof
WO2008058101A2 (en) Memory controllers for performing resilient firmware upgrades to a functioning memory
CN113032788A (en) Firmware image switching method, device and medium in computer system
CN116737279B (en) Method and device for program running, processor, electronic device and medium
CN112416527A (en) Data recovery method, device, equipment and storage medium
CN101571817A (en) Mainboard as well as recovering method and startup method of basic input output system thereof
US7275132B2 (en) Computing machine with hard stop-tolerant disk file management system
CN209746537U (en) NVDIMM-N compatible with NVDIMM-P function
WO2022093197A1 (en) Firmware overwrites using queues and pointers
US10592329B2 (en) Method and electronic device for continuing executing procedure being aborted from physical address where error occurs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20080507