CN1308337A - Simultaneous program code and data storing method in flash memory - Google Patents

Simultaneous program code and data storing method in flash memory Download PDF

Info

Publication number
CN1308337A
CN1308337A CN 00135208 CN00135208A CN1308337A CN 1308337 A CN1308337 A CN 1308337A CN 00135208 CN00135208 CN 00135208 CN 00135208 A CN00135208 A CN 00135208A CN 1308337 A CN1308337 A CN 1308337A
Authority
CN
China
Prior art keywords
data
flash memory
write
program
program code
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.)
Granted
Application number
CN 00135208
Other languages
Chinese (zh)
Other versions
CN1121041C (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.)
Inventec Appliances Nanjing Corp
Original Assignee
Inventec Group Nanjing Electronic Technology 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 Inventec Group Nanjing Electronic Technology Co Ltd filed Critical Inventec Group Nanjing Electronic Technology Co Ltd
Priority to CN 00135208 priority Critical patent/CN1121041C/en
Publication of CN1308337A publication Critical patent/CN1308337A/en
Application granted granted Critical
Publication of CN1121041C publication Critical patent/CN1121041C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

A method to store the program code and data information in flash memory at the same time is to set the program execution section and data buffer section in the random access memory in the electronic device. The change in-formation to be written in will be temporarily stored into the data buffer section when data informatioin in the flash memory is required to change and the corresponding program code in the flash memory will be coded as an individual code section to be stored in the program execution section. At the same time, it is carried out to disable all the interrupts of the electronic device temporarily and to move accounting pointer of the system program to the program execution section so as to carry out the changing job, to write the changing information in the data buffer section into the quickflashing storage.

Description

In flash memory, deposit the method for program code and data information simultaneously
The present invention relates to a kind of store data method, relate in particular to the method for in flash memory, depositing program code and data information simultaneously at flash memory.
In many communication products, all use the storage unit of flash memory (FLASH CHIP) at present as its system documentation.Traditionally, the program code of the system program of these communication products and data information leave in respectively in two different flash memories.This practice, though comparatively convenient in the use,, when these traditional communication products of designing for manufacturing, because of needing two flash memories at least, as storage unit, store the program code and the data information of its system program respectively, not only cost is higher, and has occupied more circuit space.If these program codes and data information are left in in a slice flash memory; then when the system program to these traditional communication products carries out the data change; to directly carry out write activity to this flash memory because of need; regular meeting makes its data bus change; causing wherein the sub-program code can't carry out, and crashes or system carries out and makes a mistake and cause.
In view of this, the inventor is through the permanent research and experiment of making great efforts, and development and Design goes out a kind of method of depositing program code and data information in flash memory simultaneously of the present invention finally.
One object of the present invention is program code in the electronic installation and data information can be stored simultaneously to a slice flash memory, not only can significantly reduce the cost of storage unit, and effective economization circuit space.
Another object of the present invention is to the disposal route of utilizing the present invention designed, can improve the mode that data information is written into flash memory, during with effective solution change data information, the problem that program code can't be carried out.
According to above-mentioned purpose, the invention provides a kind of method of in flash memory, depositing program code and data information simultaneously, this method makes electronic installation CPU (central processing unit) (CPU), within it in the random-access memory (ram) of portion, the program of cooking up is carried out district and data buffer, make this electronic installation when need change data in its flash memory, can the change data of desiring to write is temporary earlier to this data buffer, and should the change data pairing program code is compiled to after the code segments independently, again its temporary execution to this program is distinguished, and all interruptions of this electronic installation of temporary close, and the counting pointer (Program Counter) of system program is moved to this program carry out the district, changing operation, the change data of this data buffer is write this flash memory.
For making further understanding and understanding, for the embodiment conjunction with figs., be described in detail as follows now purpose of the present invention, processing feature and effect thereof:
Carry out the work synoptic diagram that data information stores among the present invention of being shown in Figure 1 between the storage unit of electronic installation; And
Shown in Figure 2 is the main control process flow synoptic diagram of the system program of electronic installation among the present invention.
The present invention is mainly used in the electronic installation, this electronic installation can be mobile phone (cellarphone), personal digital aid (PDA) (Personal Digital Assistant) or other electronic installation, consult shown in Figure 1, this electronic installation comprises CPU (central processing unit) (CPU), in order to control each electronic component on the whole device, make it be able to normal operation; Random-access memory (ram) 20, the related data data during in order to temporary this device normal operation; Flash memory (FLASH) 10, this flash memory 10 mainly comprises master routine execution district 11 (main area), independent code storage area 12 (storage area) and region of data storage 13 (data area), wherein this master routine is carried out district 11 and is not only the main region that system program is carried out, also in order to store required system program of this device normal operation and program code, this independent code storage area 12 is non-execution district, mainly in order to storing independent code section required when this flash memory 10 carried out write activity, 13 of this region of data storages are in order to store the required related data data of this device normal operation.The present invention is mainly in this random access memory 20, the program of cooking up is carried out district 21 (executing area) and data buffer 23 (data buffer), make this electronic installation when need change data information in this flash memory 10, can the change data of desiring to write is temporary earlier to this data buffer 23, and program code corresponding in this flash memory 10 is compiled is a code segments independently, the temporary execution to this program distinguishes 21, simultaneously, all interruptions of this electronic installation of temporary close, counting pointer (Program Counter) with system program moves to this program execution district 21 again, changing operation, the change data of this data buffer 23 is write this flash memory 10.
In the present invention, owing to write in the operation process of this flash memory 10 carrying out the change data, change data system in this data buffer 23 is divided into the data of many segments, per unit is in the time, only allow a bit of data are write region of data storage (Data Area) 13 in this flash memory 10, therefore, a bit of data have been write whenever, just there is an interval time, can be used to inquire about interrupt flag, so this electronic installation can utilize this interval time, whether inquiry has important interrupt flag, it is disconnected among if generation is important, then suspend write operation, this counting pointer is moved back to the master routine that this master routine is carried out system program in the district 11, this interrupt flag is handled, after disposing, reexamine this data buffer 23, whether still there are data not finish write activity, if, then make this counting pointer move back to this program again and carry out district 21, proceed to change operation, the change data that does not write as yet in this data buffer 23 is write this flash memory 10 in regular turn, till finishing the writing of whole change data.
The present invention writes fashionablely the data information in this flash memory 10 being carried out the change data, and the CPU (central processing unit) of this electronic installation is according to the following step, consults shown in Figure 2ly, finishes the write activity of whole change data:
(30) when not changing the demand of data, the master routine of the master routine of system program in this flash memory 10 carried out operation in the district 11, when desiring to carry out the data change, the program code that will wait the data that changes is earlier weaved into a code segments independently, and it is copied to this program carries out district 21;
(31) needs are write to the change data of this flash memory 10, be copied to this data buffer 23;
(32) shield all interruptions, order does not respond any interruption in that the data information in this flash memory 10 is changed in the ablation process of data;
(33) the counting pointer with system program is passed to this program execution district 21, begins to carry out the write activity to this flash memory 10;
(34) with being divided into the data of many segments in this data buffer 23, write one by one in this flash memory 10, and after whenever having write a bit of data, insert a time gap,, carry out the inquiry of interrupt flag to utilize these gaps;
Judge in writing the time slot of data (35) whether the generation interrupt request is arranged,, then continue the following step,, then continue step (37) if do not have if having;
(36) as interrupt request takes place, then suspend the write activity of change data, and will count the master routine that pointer moves back to system program in this master routine execution district 11, this interrupt flag is handled, after disposing, reexamine this data buffer 23, whether the data of not finishing write activity are still arranged;
(37) judge whether the data in this data buffer 23 have been write, if, then continue the following step, otherwise, return step (34), continue to write down a bit of data, till finishing the writing of whole change data;
(38) will count pointer and move back to the master routine that this master routine is carried out system program in the district 11, continue uncompleted master routine;
(39) unlatching is to the shielding of all interruptions.
So, the inventive method not only can make program code and the data information in this electronic installation be stored simultaneously to a slice flash memory, significantly reduce the cost of storage unit, the economization circuit space, also can improve the mode that data information is written into flash memory, when effectively solving the change data information, the problem that program code can't be carried out.
The above, only for the cited best specific embodiment of the present invention, but feature of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in field of the present invention, can think easily and variation or modification, all should be encompassed in the scope of following claim.

Claims (7)

1. method of in flash memory, depositing program code and data information simultaneously, it is characterized in that, this method is the CPU (central processing unit) that makes electronic installation, within it in the random access memory of portion, the program of cooking up is carried out district and data buffer, make this electronic installation when need change data information in its flash memory, can the change data of desiring to write is temporary earlier to this data buffer, and program code corresponding in this flash memory is compiled is a code segments independently, the temporary execution to this program distinguished, simultaneously, all interruptions of this electronic installation of temporary close, again the counting pointer of system program is moved to this program and carry out the district, changing operation, the change data of this data buffer is write this flash memory.
2. the method for in flash memory, depositing program code and data information simultaneously as claimed in claim 1, it is characterized in that, this flash memory comprises master routine execution district, independent code storage area and region of data storage, it is the main region that system program is carried out that this master routine is carried out the district, and store required system program of this device normal operation and program code, this independent code storage area is a non-execution district, required independent code section when in order to store this flash memory being carried out write activity, this region of data storage is then in order to store the required related data data of this device normal operation.
3. the method for in flash memory, depositing program code and data information simultaneously as claimed in claim 1, it is characterized in that, write in the operation process of this flash memory carrying out the change data, change data in this data buffer is divided into the data of many segments, per unit is in the time, only allows a bit of data are write region of data storage in this flash memory.
4. the method for in flash memory, depositing program code and data information simultaneously as claimed in claim 3, it is characterized in that this CPU (central processing unit) will be inserted an interval time after whenever having write a bit of data, so that utilize this interval time, whether inquiry has important interrupt flag.
5. the method for in flash memory, depositing program code and data information simultaneously as claimed in claim 4, it is characterized in that, when this CPU (central processing unit) is found important interruption, promptly suspend write operation, this counting pointer is moved back to the master routine that this master routine is carried out system program in the district, this interrupt flag is handled, after disposing, reexamine this data buffer, whether still have data not finish write activity.
6. the method for in flash memory, depositing program code and data information simultaneously as claimed in claim 5, it is characterized in that, this CPU (central processing unit) finds still have when not finishing the data that write in this data buffer, this counting pointer of military order moves back to this program again and carries out the district, proceed to change operation, the change data that does not write is as yet write this flash memory in regular turn, till finishing the writing of whole change data.
7. the method for in flash memory, depositing program code and data information simultaneously as claimed in claim 5, it is characterized in that, this CPU (central processing unit) find the data in this data buffer finished write fashionable, this counting pointer of military order moves back to the master routine that this master routine is carried out system program in the district, continue not finish program, and open all interruptions.
CN 00135208 2000-11-27 2000-11-27 Simultaneous program code and data storing method in flash memory Expired - Fee Related CN1121041C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 00135208 CN1121041C (en) 2000-11-27 2000-11-27 Simultaneous program code and data storing method in flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 00135208 CN1121041C (en) 2000-11-27 2000-11-27 Simultaneous program code and data storing method in flash memory

Publications (2)

Publication Number Publication Date
CN1308337A true CN1308337A (en) 2001-08-15
CN1121041C CN1121041C (en) 2003-09-10

Family

ID=4596650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 00135208 Expired - Fee Related CN1121041C (en) 2000-11-27 2000-11-27 Simultaneous program code and data storing method in flash memory

Country Status (1)

Country Link
CN (1) CN1121041C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1316376C (en) * 2002-12-12 2007-05-16 建兴电子科技股份有限公司 Multistage management structure and method for buffer
CN100341000C (en) * 2004-07-28 2007-10-03 群联电子股份有限公司 Method for using flash memory as buffer area, and electronic devices
CN100389407C (en) * 2002-07-25 2008-05-21 联想(北京)有限公司 Method for storing system and application rpogramme in hand-held information device
CN1732446B (en) * 2002-12-30 2010-09-08 Nxp股份有限公司 Method for writing to a memory

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100389407C (en) * 2002-07-25 2008-05-21 联想(北京)有限公司 Method for storing system and application rpogramme in hand-held information device
CN1316376C (en) * 2002-12-12 2007-05-16 建兴电子科技股份有限公司 Multistage management structure and method for buffer
CN1732446B (en) * 2002-12-30 2010-09-08 Nxp股份有限公司 Method for writing to a memory
CN100341000C (en) * 2004-07-28 2007-10-03 群联电子股份有限公司 Method for using flash memory as buffer area, and electronic devices

Also Published As

Publication number Publication date
CN1121041C (en) 2003-09-10

Similar Documents

Publication Publication Date Title
EP1540485B1 (en) Out of order dram sequencer
US5560003A (en) System and hardware module for incremental real time garbage collection and memory management
CN1149489C (en) Method and apparatus for providing piplined memory controller
CN102291423B (en) Method for controlling physical layer (PHY) chip and control circuit
JPH06309224A (en) Method for data page control and data processing system
CN101630276B (en) High-efficiency memory access method
US9569381B2 (en) Scheduler for memory
GB2348306A (en) Batch processing of tasks in data processing systems
CN101788922A (en) Method and device for realizing transaction storage system based on auxiliary thread
CN101847096B (en) Optimization method of stack variable-containing function
EP1760581A1 (en) Processing operations management systems and methods
CN1121041C (en) Simultaneous program code and data storing method in flash memory
CN102567220A (en) Cache access control method and Cache access control device
CN101706788A (en) Cross-area access method for embedded file system
EP1760580A1 (en) Processing operation information transfer control system and method
CN102169464B (en) Caching method and device used for non-volatile memory, and intelligent card
CN103559079A (en) Shared memory based data access method and device
CN100520737C (en) Caching system, method and computer system
CN101196851B (en) Data management method of flash memory
CN101866676A (en) Data access method and data access device for multichannel flash memory system
CN100430889C (en) Digital signal processor architecture with optimized memory access
CN101581961A (en) CPU and method for reducing CPU power consumption
CN1333346C (en) Method for accessing files
CN1049751C (en) Virtual array type access device of direct memory
CN101630155B (en) Method for realizing instruction interaction in numerical control machine system

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: YINGHUADA(NAN JING) TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: YINGYEDA GROUP(NANJING) ELECTRONIC TECHNOLOGY CO.,LTD

Effective date: 20041112

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

Effective date of registration: 20041112

Address after: 210000 Pai Road, Jiangning economic and Technological Development Zone, Nanjing, Jiangsu

Patentee after: Inventec (Nanjing) Technology Co., Ltd.

Address before: Nanjing City, Jiangsu province 210006 Crane Street No. 100

Patentee before: Yingyeda Group (Nanjing) Electronic Technology Co., Ltd.

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

Granted publication date: 20030910

Termination date: 20101127