CN101599020B - Method for downloading and executing program codes from microprocessor and communication device thereof - Google Patents

Method for downloading and executing program codes from microprocessor and communication device thereof Download PDF

Info

Publication number
CN101599020B
CN101599020B CN 200810110438 CN200810110438A CN101599020B CN 101599020 B CN101599020 B CN 101599020B CN 200810110438 CN200810110438 CN 200810110438 CN 200810110438 A CN200810110438 A CN 200810110438A CN 101599020 B CN101599020 B CN 101599020B
Authority
CN
China
Prior art keywords
microprocessor
program codes
external memory
internal storage
agreement
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
CN 200810110438
Other languages
Chinese (zh)
Other versions
CN101599020A (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.)
MStar Software R&D Shenzhen Ltd
MStar Semiconductor Inc Taiwan
Original Assignee
MStar Software R&D Shenzhen Ltd
MStar Semiconductor Inc Taiwan
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 MStar Software R&D Shenzhen Ltd, MStar Semiconductor Inc Taiwan filed Critical MStar Software R&D Shenzhen Ltd
Priority to CN 200810110438 priority Critical patent/CN101599020B/en
Publication of CN101599020A publication Critical patent/CN101599020A/en
Application granted granted Critical
Publication of CN101599020B publication Critical patent/CN101599020B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method for downloading and executing program codes from a microprocessor and a communication device thereof, which have high flexibility and can support microprocessor operation modes of a plurality of radio-frequency reading-writing programs. The method comprises the following steps: firstly executing a monitoring program to monitor whether the microprocessor receives a download request corresponding to a target program code; downloading the target program code from an external memory to an internal memory of the microprocessor after the microprocessor receives the download request; restarting the microprocessor to enable the microprocessor to enter into a first mode; and executing the target program code in the internal memory in the first mode.

Description

Download also method and the communication device of executive routine code in microprocessor
Technical field
The present invention relates to a kind of microprocessor, relate in particular to a kind of method and communication device in microprocessor download and executive routine code.
Background technology
Radio-frequency (RF) identification (Radio Frequency Identification, RFID) technology is a kind of communication technology of utilizing wireless signal identification specific objective and reading and writing related data.Owing to need not to set up entity between the data reading system that adopts REID and the specific objective or optics contacts, so its data identification/read or write speed is more even better than traditional bar code device.
Whether RFID tag (RFID tag) can comprise power supply according to its inside chip is divided into active and passive type two classes.Take the passive radio frequency identification label as example, its antenna can receive the wireless signal that the radio-frequency reading-writing device (RFID reader) in the specific range is launched, and then provides chip circuit required power supply with the electric wave that receives.Chip circuit in the RFID tag is once startup, will automatic decode, the signal that arrives of interpretation antenna reception, and provide the information (for example production site and the build date of the accompanying article of the identification number of label itself or this label) of radio-frequency reading-writing device requirement with wireless signal.
Can be widely used in the fields such as logistics management, purchase and consumption, status identification, intelligent household and office in view of REID, radio-frequency reading-writing device is incorporated in the portable electronic product of user (for example mobile phone and PDA), utilize the convenience of various applying in radio frequency identification to promote the user, become an inevitable trend.
Present most portable electronic product has all faced many restrictions and the requirements such as low-power consumption, low cost, volume be light and handy, and the function of integrating the more therein just means that such challenge is more harsh.In other words, the software and hardware resources in the portable electronic product is limited and preciousness all, and how to effectively integrate the radio frequency read-write capability also be the problem that can not be ignored in the situation that do not take too much software and hardware.
Yet existing radio-frequency (RF) identification standard is multifarious, and all size corresponds respectively to again different program codes; Therefore general single chip microcomputer is difficult to have both the read-write capability of containing multiple radio-frequency (RF) identification standard.Quite to popularize and often to be used to 8051 microprocessors as core of embedded system as example, owing to wherein only having size to be at most the internal processes internal memory of 64K byte, adopting 8051 microprocessors usually can only hold a few radio frequency read-write program code as the electronic product of the running core of radio frequency module for reading and writing.
Hence one can see that, if wish multiple radio frequency read-write program code is contained in the single microprocessor, is bound to such an extent that adopt memory size greatly but the comparatively high microprocessor of price, or adopts simultaneously multi-microprocessor to be responsible for separately different read-write standards.Thus, the cost of electronic product integral body just has to significantly promote.
Summary of the invention
Technical matters to be solved by this invention provides a kind of method in microprocessor download and executive routine code, and it has high flexibility and can support the microprocessor function mode of multiple radio frequency read-write program.In addition, it also provides a kind of communication device, and it has the low advantage of cost.
In order to solve above technical matters, the invention provides following technical scheme.
Be one to download and the method for performance objective program code in microprocessor according to one embodiment of the invention.Whether the method is at first carried out a watchdog routine, receive corresponding to one of the program codes request of downloading to monitor a microprocessor.After this microprocessor is received this download request, this program codes will be downloaded in the internal storage of this microprocessor from an external memory storage.Then, the method restarts this microprocessor, begins to carry out the pattern of this program codes to make this microprocessor enter.
Be a communication device according to another embodiment of the present invention, wherein comprise an external memory storage and a microprocessor.Store the program codes corresponding to a target communications protocol in this external memory storage.Itself also comprises an internal storage this microprocessor.Whether this microprocessor system is in order to carrying out a watchdog routine, receive corresponding to one of this program codes and download request to monitor this microprocessor.After receiving this download request, this microprocessor will be downloaded to this program codes in this internal storage from this external memory storage.After this program codes was downloaded to this internal storage, this microprocessor was restarted and begins to carry out this program codes in this internal storage.
Compared to prior art, as long as utilize the microprocessor of single internal storage less (so cost is lower) can reach the effect of supporting multiple radio frequency read-write program according to How It Works of the present invention and communication device.
Description of drawings
Below in conjunction with the drawings and specific embodiments the present invention is described in further detail.
Figure 1A is the calcspar of the electronic system in one embodiment of the invention.
Figure 1B is the internal configurations example according to external memory storage of the present invention.
Fig. 2 is according to downloading the also process flow diagram of the How It Works of executive routine code in microprocessor in one embodiment of the invention.
Fig. 3 downloads and the process flow diagram of the How It Works of executive routine code in microprocessor in according to another embodiment of the present invention.
[primary clustering symbol description]
10: electronic system 12: microprocessor
12A: internal storage 14: central control unit
16: external memory storage S21 ~ S23: process step
S31 ~ S36: process step
Embodiment
Be a kind ofly to download and the How It Works of executive routine code in microprocessor according to one embodiment of the invention.In this embodiment, this microprocessor system is arranged in certain electronic system (a for example action communication system).Shown in Figure 1A, except microprocessor 12, this electronic system 10 has also comprised a central control unit 14 and an external memory storage 16.Microprocessor 12 itself comprises again an internal storage 12A.On the practice, internal storage 12A can be a static random access memory (static random accessmemory), and 16 of external memory storages can be a flash memory (flash memory).
Figure 1B is an internal configurations example of external memory storage 16.According to the present invention, a plurality ofly external memory storage 16 can be stored in advance corresponding to the pre-set programs code of different communications protocol separately.In this example, external memory storage 16 stores N pre-set programs code (the first pre-set programs code ~ N pre-set programs code), and N is the positive integer greater than 1.For instance, these pre-set programs codes can correspond respectively to multiple different radio-frequency (RF) identification agreement, for example ISO 14443A agreement, ISO 14443B agreement, ISO 15693 agreements, ISO 18092 agreements or EPC UHF C1G2 agreement.
The capacity of internal storage 12A may be type and the specification that is decided by microprocessor 12.Relatively, the capacity of external memory storage 16 then can have sizable adjustment elasticity according to practical application request, can't be restricted because of type and the specification of microprocessor 12.More particularly, the deviser of electronic system 10 can be according to electronic system 10 with the communications protocol quantity of cooperation and the capacity of program code size decision external memory storage 16 thereof.
See also Fig. 2, Fig. 2 is the process flow diagram according to How It Works of the present invention.At first, step S21 system continues or periodically carries out a watchdog routine, the download request of whether receiving corresponding to a program codes with monitoring microprocessor 12.If the determination result is NO for it, then step S21 can repeatedly be performed.Relatively, if the judged result of step S21 is yes, then the method will continue execution in step S22, from external memory storage 16 this program codes will be downloaded among the internal storage 12A.Then, step S23 system restarts microprocessor 12, enters the pattern that will carry out the program codes in the internal storage 12A to make microprocessor 12.
For instance, when central control module 14 determined to ask microprocessor 12 to carry out radio frequency read-write capability corresponding to EPC UHFC1G2 agreement, central control unit 14 will transmit download request corresponding to EPC UHF C1G2 agreement to microprocessor 12.After receiving this download request, just can be downloaded among the internal storage 12A from external memory storage 16 corresponding to that pre-set programs code of EPC UHF C1G2 agreement (that is herein the program codes of indication).
After this, if central control unit 14 wishes that microprocessor 12 changes the radio frequency read-write capability of carrying out corresponding to ISO 14443A agreement into, central control unit 14 is as long as transmit download request corresponding to ISO 14443A agreement to microprocessor 12, will be downloaded among the internal storage 12A from external memory storage 16 corresponding to the pre-set programs code of ISO 14443A agreement.
According to the present invention, the program code corresponding to EPC UHF C1G2 agreement that originally was stored in the internal storage 12A can be erased before internal storage 12A receives new program code or directly be covered by new program code.Therefore, as long as the capacity of internal storage 12A is even as big as holding single kind of program code.
On the practice, if microprocessor 12 all has direct memory access (DMA) (directmemory access with external memory storage 16, DMA) ability, microprocessor 12 can utilize the mode of DMA to download the said procedure code, save by this trouble of coordinating through central control unit 14 intermediaries.
As shown in Figure 1B, can comprise one in the external memory storage 16 in order to store the block of address translation table.The function of this table of comparisons is to list externally start address, length and the corresponding communications protocol in the storer 16 of each pre-set programs code.By this, microprocessor 12 can find out easily according to communications protocol the storage location of program codes.
See also Fig. 3, Fig. 3 is the process flow diagram of the microprocessor How It Works in according to another embodiment of the present invention.In this embodiment, comprise a block (as shown in Figure 1B) that stores an initial program code in the external memory storage 16.And, all be included in this initial orders code corresponding to above-mentioned watchdog routine and the program code that downloads.
Microprocessor 12 among this embodiment can remove first to read the initial orders code (step S31) that is stored in the external memory storage 16 after being predetermined to be start.Therefore, in the situation that this sets change, microprocessor 12 will be begun watchdog routine and the downloading among the execution in step S33 optionally among the execution in step S32 automatically after again starting shooting.
As shown in Figure 3, the method is set execution in step S34 microprocessor 12 and can be gone to read the program codes that is stored among the internal storage 12A after the start next time after step S33, but not is stored in the initial orders code in the external memory storage 16.Then, step S35 namely restarts microprocessor 12, reads and carry out this program codes to make microprocessor 12.In addition, in step S36, microprocessor 12 can be set to next time can be removed to read the initial orders code that is stored in the external memory storage 16 after the start again.By this, when microprocessor 12 was started shooting again next time, step S31 and step S32 can be performed again again, whether transmitted new download request with monitoring central control unit 14.
On the practice, can be contained in each pre-set programs code corresponding to the program code of step S36.In other words, no matter be which pre-set programs code is downloaded and carried out by microprocessor 12, the start of microprocessor 12 is set all can then be reduced to preset state.
Be according to another embodiment of the present invention a kind of computer program that is stored in the computer fetch medium.This computer fetch medium stores and is used to one embedded (embedded) computer program that a program codes was downloaded and carried out to a microprocessor.When this computer program was carried out by this microprocessor, this microprocessor of this computer program military order was carried out such as Fig. 2 or process step shown in Figure 3.
Be a kind of mobile communication device, for example mobile phone of various kenels or PDA according to still another embodiment of the invention.This action communication device has comprised the microprocessor 12 that Figure 1A illustrates, central control unit 14 and external memory storage 16.The How It Works that uses Fig. 2 or Fig. 3 to provide is provided, and this action communication device can have the ability of supporting multiple radio frequency read-write program.The more important thing is, owing to be stored in the external memory storage 16 corresponding to the program code system of various radio-frequency (RF) identification agreements, so the internal storage 12A in the microprocessor 12 does not need too large.
Can be understood by above explanation, compared to prior art, as long as utilize the microprocessor of single internal storage less (so cost is lower) can reach the effect of supporting multiple radio frequency read-write program according to How It Works of the present invention and communication device.From another angle, in the situation that the holistic cost of electronic installation does not need significantly to increase, can provide the radio frequency literacy more polynary than prior art according to electronic installation of the present invention.
By the detailed description of above specific embodiment, be that hope can be known description feature of the present invention and spirit more, and be not to come category of the present invention is limited with above-mentioned disclosed specific embodiment.On the contrary, its objective is that hope can contain in the category of claim of being arranged in of various changes and tool equality institute of the present invention wish application.

Claims (10)

1. a method of downloading and carry out a program codes in a microprocessor is characterized in that, program codes is that it comprises the following step separately corresponding to a radio-frequency (RF) identification agreement:
(a) determine by a central control unit this program codes is downloaded and carried out to microprocessor whether, and this program codes is one of plural program code that is stored in by an external memory storage;
(b) carry out the watchdog routine be stored in this external memory storage, whether receive from this central control unit and corresponding to one of this program codes and download request to monitor this microprocessor;
(c) in response to this download request, this program codes is downloaded in the internal storage of this microprocessor from this external memory storage, the program code that the internal storage receipts are new is erased before or is directly covered by new program code, and the capacity of this internal storage only is used for storing one of described program code; And
(d) restart this microprocessor, enter first mode to make this microprocessor, this program codes in this internal storage will be performed in this first mode.
2. the method for claim 1 is characterized in that, it further comprises the following step:
(e) in step (d) afterwards, carry out the setting of restarting of this microprocessor, if to make this microprocessor again be restarted, this microprocessor will enter the second pattern, and this watchdog routine will be performed in this second pattern.
3. the method for claim 1, it is characterized in that, described radio-frequency (RF) identification agreement is one that is selected from the following agreement: ISO 14443A agreement, ISO 14443B agreement, an ISO 15693 agreements, an ISO 18092 agreements and an EPC UHF C1G2 agreement.
4. the method for claim 1 is characterized in that, in described watchdog routine, be performed corresponding to a watchdog routine code of this watchdog routine, and this watchdog routine code system is stored in this external memory storage.
5. a communication device is characterized in that, it comprises:
One external memory storage wherein stores the program codes corresponding to a target communications protocol; And
One microprocessor, this microprocessor is coupled to this external memory storage and comprises an internal storage, whether this microprocessor system is stored in a watchdog routine of this external memory storage in order to execution, receive corresponding to one of this program codes and download request to monitor this microprocessor; In response to this download request, this microprocessor is downloaded to this program codes in this internal storage from this external memory storage, the program code that the internal storage receipts are new is erased before or is directly covered by new program code, and the capacity of this internal storage only is used for storing one of described program code;
Wherein after this program codes was downloaded to described internal storage, this microprocessor was restarted and enters first mode, and this program codes in this internal storage will be performed in this first mode.
6. communication device as claimed in claim 5, it is characterized in that, after described microprocessor enters this first mode, one of this microprocessor restarts to set and is performed, if make by this this microprocessor again be restarted, to enter the second pattern, and this watchdog routine will be performed in this second pattern.
7. communication device as claimed in claim 5, it is characterized in that, described target communications protocol is one that is selected from the following radio-frequency (RF) identification agreement: ISO 14443A agreement, ISO 14443B agreement, an ISO 15693 agreements, an ISO 18092 agreements and an EPC UHF C1G2 agreement.
8. communication device as claimed in claim 5 is characterized in that, in described watchdog routine, be performed corresponding to a watchdog routine code of this watchdog routine, and this watchdog routine code system is stored in this external memory storage.
9. communication device as claimed in claim 5 is characterized in that, described external memory storage is a flash memory, and this internal storage is a random access memory.
10. communication device as claimed in claim 5 is characterized in that, described program codes is that the form with a direct memory access is downloaded to this internal storage from this external memory storage.
CN 200810110438 2008-06-03 2008-06-03 Method for downloading and executing program codes from microprocessor and communication device thereof Expired - Fee Related CN101599020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810110438 CN101599020B (en) 2008-06-03 2008-06-03 Method for downloading and executing program codes from microprocessor and communication device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810110438 CN101599020B (en) 2008-06-03 2008-06-03 Method for downloading and executing program codes from microprocessor and communication device thereof

Publications (2)

Publication Number Publication Date
CN101599020A CN101599020A (en) 2009-12-09
CN101599020B true CN101599020B (en) 2013-03-06

Family

ID=41420475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810110438 Expired - Fee Related CN101599020B (en) 2008-06-03 2008-06-03 Method for downloading and executing program codes from microprocessor and communication device thereof

Country Status (1)

Country Link
CN (1) CN101599020B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1430142A (en) * 2001-12-29 2003-07-16 深圳市中兴通讯股份有限公司上海第二研究所 Device for realizing software down loading using single-chip processor in communication system and its method
CN1567270A (en) * 2003-06-14 2005-01-19 中兴通讯股份有限公司 Processor system and method using multi memory of start-up procedure
TW200615851A (en) * 2004-04-20 2006-05-16 Hynix Semiconductor Inc A FRIDid system including a programmable RF tag

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1430142A (en) * 2001-12-29 2003-07-16 深圳市中兴通讯股份有限公司上海第二研究所 Device for realizing software down loading using single-chip processor in communication system and its method
CN1567270A (en) * 2003-06-14 2005-01-19 中兴通讯股份有限公司 Processor system and method using multi memory of start-up procedure
TW200615851A (en) * 2004-04-20 2006-05-16 Hynix Semiconductor Inc A FRIDid system including a programmable RF tag

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JP特开2007-58505A 2007.03.08
JP特开2008-65549A 2008.03.21

Also Published As

Publication number Publication date
CN101599020A (en) 2009-12-09

Similar Documents

Publication Publication Date Title
US11494080B2 (en) Extended utilization area for a memory device
JP3993187B2 (en) Mobile communication terminal having radio frequency identification function and radio frequency identification programming method in the mobile communication terminal
JP5175215B2 (en) Method and device for emulating multiple RFID tags in a single portable electronic device
US9411990B2 (en) Working method of a multi-slot card reader based on the standard CCID protocol
US9418224B2 (en) Portable electronic device and control method of portable electronic device
US20040219949A1 (en) Memory drive device for wirelessly accessing data
JP2008536431A (en) Improved transponder
US20110256832A1 (en) Apparatus and method for controlling smart card comprised of multi sensor
US20210342557A1 (en) Passive near field communication (nfc) device, method and system
KR101636354B1 (en) Passive wireless memory device
CN103729205A (en) Electronic tag and method for upgrading electronic tag
KR100921694B1 (en) Data streaming apparatus for radio frequency identification tag
US20100141404A1 (en) Rfid sensor tag and sensor data storing method
CN101599020B (en) Method for downloading and executing program codes from microprocessor and communication device thereof
CN202153360U (en) Portable 134.2 KHz RFID multi-interface reader-writer
CN104639317A (en) System and method for key update of smart card based on app (Application) module
CN101561862B (en) Reader/writer, communication processing device, communication processing method, data management system and communication system
TWI389030B (en) Method and computer program product for loading and executing program code at micro-processor and communication device including the micro-processor
CN202548851U (en) Active RFID card-issuing device
KR101530479B1 (en) Ic card and portable electronic device
CN101887529A (en) Radio-frequency identification card for replacing encryption algorithm by user and method thereof
CN102279933B (en) Communication facilities and communication means
US20150161421A1 (en) Apparatus and method for controlling supply of power to radio frequency identification tag
KR101830376B1 (en) sensor tag without battery and method for processing data thereof
CN115840968A (en) Chip with logic encryption card and CPU card and communication method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130306

Termination date: 20190603