CN101901158A - Update method and device of firmware - Google Patents
Update method and device of firmware Download PDFInfo
- Publication number
- CN101901158A CN101901158A CN2010102427342A CN201010242734A CN101901158A CN 101901158 A CN101901158 A CN 101901158A CN 2010102427342 A CN2010102427342 A CN 2010102427342A CN 201010242734 A CN201010242734 A CN 201010242734A CN 101901158 A CN101901158 A CN 101901158A
- Authority
- CN
- China
- Prior art keywords
- card
- firmware
- storage card
- order
- command
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a device for updating a firmware, which can not only be used for updating the firmware under normal condition, but also can be used for repairing and updating the firmware when the system cannot work due to the damage to the firmware. According to the technical scheme, after receiving a host command, a memory card analyzes a host command and if the host command is a defined command, the memory card is forced to enter a firmware update mode and match with a host to update the firmware of the memory card, wherein the defined command is added by a card reader on the basis of a standard memory card command.
Description
Technical field
The present invention relates to a kind of firmware update, relate in particular to a kind of firmware and carry out method for updating and device storage card.
Background technology
Because storage card is compared conventional storage media its inherent advantages is arranged, little, simple in structure, easy to use as volume, do not need self-powered, read or write speed is fast, safety in utilization is high, so storage card being applied in the middle of the various digital products such as mobile phone, MP3, DV more and more widely., also produce simultaneously with the compatibility issue of various products because the popularity of using more significantly increases thereupon.Therefore the firmware of present storage card mostly adopts and is stored in the middle of the built-in flash memory (hereinafter to be referred as Flash), so that also can in time revise problem or consummating function by the mode of upgrading firmware after launch.Common storage card has digital safety card (SecureDigital Memory Card at present, hereinafter referred SD card), multimedia memory card (Multimedia Card, mmc card), memory stick (Memory Stick, the MS card) and CompactFlash card (CF card) or the like, wherein most widely usedly surely belonged to the SD card.
Generally speaking, the firmware of embedded system needs to upgrade, and so several reasons is arranged usually: correction Bug, perfect in shape and function or upgrading, firmware damage and cause system to work.Therefore at present there are following form in the firmware update or the reparation of embedded system: (1) former firmware damages fully, and system can operate as normal or firmware upgrade functionality can operate as normal at least; (2) design has special function pin, and reporting system is made a forcible entry into the firmware upgrade pattern; (3) memory storage of firmware is detachable, and carries out firmware by third party device or instrument and rewrite, and realizes the renewal or the upgrading of firmware; (4) increase standby firmware storage,, then repair with backup device in case the firmware in the main storage means damages.
Because SD card product only is useful on and communicates by letter with card reader and 9 stitch of data transmission expose outside whole encapsulation, be respectively VCC, GND, CLK, CMD and DATA line, not having extra function pin can be used for notifying the SD card to force to enter the firmware update pattern, therefore, the scheme of the normal firmware update of adopting of SD cartoon at present is as follows:
(1) SD card programming firmware not, the back SD card master controller loading firmware failure that powers on enters the firmware update pattern automatically, and is connected with main frame (adding card reader such as computer), then with in the middle of the Flash of firmware burning to the SD card.
(2) firmware is crossed in the programming of SD card, but firmware is impaired or other reasons, and the loading firmware failure can enter the firmware update pattern equally automatically when causing the SD card to power on, and can adopt such scheme 1 to carry out firmware update this moment.
(3) firmware is crossed in the programming of SD card, and powers on and enter normal mode of operation automatically, and main frame can make it to enter the firmware update pattern by sending order, carries out firmware update.
(4) firmware is crossed in the programming of SD card, because of some reason work not just, can't be connected with main frame, though or working properly, powering on to enter normal mode of operation automatically, but can't enter the firmware update pattern, then can adopt dual mode to upgrade firmware.The one, the mode of short circuit Flash data line forces to allow the loading firmware failure that powers on of SD card, enter the firmware update pattern after, cancel the data line short circuit again, so that normally carry out firmware burning; The 2nd, the Flash tip-off is got off, on special Flash eraser,, weld back again then according to scheme 1 and carry out firmware update firmware erasing.
Continuous development along with new technology, a lot of digital products all begin to develop towards the smaller and more exquisite direction of volume, can reduce cost on the one hand, then bring the portability of better outward appearance and Geng Jia on the other hand, thereupon, therefore employed storage card is also required smaller and more exquisite, the littler miniature digital safety card of volume (hereinafter referred Micro SD card) has just been arranged.In order to pursue dwindling of volume, Micro SD card has adopted special encapsulation pattern, and its control chip and NAND Flash storer the two and printed circuit board (PCB) (PCB) have adopted the chip on board encapsulation (Chip0n Board, COB) mode is packaged together.Can to take shell apart different with the SD card of standard in the past, this encapsulation of Micro SD card can't be dismantled, and can't adopt such scheme 4 to carry out firmware update, that is to say if in case situation in the scheme 4 occurs, gently then can't upgrade firmware, heavy then whole card can't use and can only scrap.
To sum up, the firmware of Micro SD card can't operate as normal because of some reason, even can't use fully the time, can't realize repairing by existing firmware update means.And run into this situation for the SD card, and then must take shell reparation apart, waste time and energy, and the integrality that disfeatures and block.
Summary of the invention
The objective of the invention is to address the above problem, a kind of firmware update is provided, not only can be used for the firmware update under the normal condition, also can be used for firmware and damage when causing system to work firmware is carried out restoration updating.
Another object of the present invention is to provide a kind of firmware updating device.
Technical scheme of the present invention is: the present invention has disclosed a kind of firmware update, storage card is after receiving Host Command, Host Command is resolved, if self-defining order, then force storage card to enter the firmware update pattern, cooperate main frame to carry out the firmware update process of storage card, wherein self-defining order is that card reader is set up on the basis of standard storage card command.
According to an embodiment of firmware update of the present invention, it is after the storage card electrifying startup that storage card receives Host Command.
According to an embodiment of firmware update of the present invention, it is after storage card enters normal mode of operation that storage card receives Host Command.
According to an embodiment of firmware update of the present invention, storage card is SD card or Micro SD card.
According to an embodiment of firmware update of the present invention, self-defining order realizes with the order of the custom parameter of ACMD41 in the SD card standard criterion, perhaps realizes with the reservation order in the SD card standard criterion.
The present invention has also disclosed a kind of firmware updating device, comprising:
Card reader, the storage card order of interior bidding standard and one group of custom command;
Storage card further comprises:
The electrifying startup module, electrifying startup storage card after storage card inserts card reader;
Command recognition module couples the electrifying startup module, receives the initial phase order that card reader sends behind the storage card electrifying startup, identifies the storage card order or the custom command of standard;
The firmware loads module couples command recognition module, is identifying the firmware loads of carrying out storage card after being the storage card order of standard;
The firmware update module couples command recognition module, is identifying the firmware update of carrying out storage card after being custom command.
According to an embodiment of firmware updating device of the present invention, storage card is SD card or Micro SD card.
According to an embodiment of firmware updating device of the present invention, the self-defining order in the card reader is that the order with the custom parameter of ACMD41 in the SD card standard criterion realizes, perhaps realizes with the reservation order in the SD card standard criterion.
The present invention contrasts prior art following beneficial effect: the present invention designs a special card reader, is used for the firmware programming and the renewal of storage card, and card reader has increased by one group of custom command on standard storage card command basis.Next is the design part of storage card, and powering at storage card receives the card reader command phase, increases the judgement to custom command, is used for judging whether need to force to enter the firmware update pattern.The contrast prior art, whether the firmware regardless of storage card damages or damaged condition, as long as storage card hardware does not damage, can adopt the mode of pure software to carry out the renewal and the reparation of firmware, make it to get back to normal operating conditions, and can not cause the destruction of any outward appearance.And technical scheme of the present invention is little to the design change of existing storage card, and design complexities and system cost be not influence almost.
Description of drawings
Fig. 1 is the structural drawing of the embodiment of firmware updating device of the present invention.
Fig. 2 is the refined structure figure of Fig. 1 embodiment.
Fig. 3 is the process flow diagram of the embodiment of firmware update of the present invention.
Embodiment
The invention will be further described below in conjunction with drawings and Examples.
The present invention is the embodiment that example illustrates storage card with the SD card.Because Micro SD card adopts and the identical consensus standard of SD, therefore description hereinafter all refers to Micro SD and the unified explanation of SD card with the SD card.The storage card of other type also is applicable to following embodiment.
The embodiment of firmware updating device
Fig. 1 shows the one-piece construction of the embodiment of firmware updating device.See also Fig. 1, the firmware updating device of present embodiment comprises card reader 2 and SD card 3 two parts, and card reader 2 links to each other with host computer 1, sets up the transmission channel of order and data, also sets up the transmission channel of order and data between card reader 2 and the SD card 3.
Fig. 2 shows the refined structure of card reader 2 and SD card 3.See also Fig. 2, SD card command and one group of custom command of bidding standard in the card reader 2.Electrifying startup module 30 in the SD card 3 is responsible for inserting card reader 2 back electrifying startup SD cards 3 at SD card 3.Card reader 2 sends ordering to SD card 3 of initial phase.By the initial phase order of command recognition module 31 receptions that couple electrifying startup module 30 from card reader 2, the order that identifies reception is the still custom command of SD card command (typically refer to the ACMD41 order of standard, be used for SD card initialization Flash and loading firmware etc.) of standard.Custom command is to be used for judging whether needing to force to enter the firmware update pattern.Wherein custom command can realize with the order of the custom parameter of ACMD41, also can realize with the reservation order in the SD card standard criterion.
The embodiment of firmware update
Fig. 3 shows the flow process of the embodiment of firmware update of the present invention.See also Fig. 3, each step of the firmware update of present embodiment is as follows.
Step S100:SD card electrifying startup.
Normally after the SD card is inserted into card reader, SD card electrifying startup.
Step S101:SD card is waited for and is received Host Command.
Host Command is divided into the SD card command of standard, for example CMD0 and CMD8 order, ACMD41 order and custom command, and these orders all are arranged in the card reader.Wherein CMD0 and CMD8 order is used to reset and protocol version identification, and the ACMD41 order is used for the SD card initialization, and custom command is used to specify and enters the firmware update pattern when SD card powers on.Wherein custom command can realize with the order of the custom parameter of ACMD41, also can realize with the reservation order in the SD card standard criterion.
Owing to use the various device of SD card numerous, issuable compatibility issue in use can adopt the mode that sends repeatedly order to guarantee the correctness of judging when design.
Step S102: the Host Command that receives is resolved.If CMD0 and CMD8 order then enter step S103; If the ACMD41 order then enters step S104; If other order then enters step S115.
Step S103:, carry out the identification of device reset and protocol version because the Host Command that receives is CMD0 and CMD8 order.
Step S104: because the Host Command that receives is the ACMD41 order, carry out the SD card initialization, enter step S105 then.
Step S105: initialization flash memory, and verification integrity of firmware.
Step S106: judge whether flash memory initialization and firmware verification be successful.If it is success then enter step S107, if unsuccessful then enter step S114.
Step S107: loading firmware and operation on the SD card.
Step S108: judge the whether normally operation of SD card system, if normal operation then enter step S110, if could normally move then enter step S109.
Step S109:SD card system is absorbed in the abnormality endless loop, loses response with main frame.
Step S110: reply main frame SD card and be ready to, finish follow-up and verification process main frame.
Step S111:SD card enters normal mode of operation, waits for Host Command.
Step S112: the Host Command that receives is carried out command analysis, if custom command then enters step S115, if SD card standard commands then enters step S113.
Step S113:SD sticks into standard operations such as capable read/write.Get back to step S111 then.
Step S114: judge whether other order is custom command, if custom command then enters step S115, then enters step S116 if not custom command.
Step S115:SD card enters the firmware update pattern, cooperates main frame to carry out firmware update.
Step S116: be left intact, return step S101.
The embodiment of comprehensive above-mentioned method and apparatus as can be seen, inventive point of the present invention mainly is: card reader has increased by one group of custom command on the basis of standard SD order, be used to specify and enter the firmware update pattern when SD card powers on; Next is that the SD card powers on and receives the card reader command phase and increase judgement to custom command, is used for judging whether need to force to enter the firmware update pattern.Whether the firmware regardless of storage card damages or damaged condition like this, as long as storage card hardware does not damage, can adopt the pure software mode to carry out the renewal and the reparation of firmware, makes it to get back to normal operating conditions, and can not cause the destruction of any outward appearance.And because the power-up initializing of most of SD card is all realized (ROM (read-only memory) that its program code is stored in the SD card controller is central) by software, realize that this scheme does not need to revise the hardware design of SD card controller, the design of card reader also is same reason, increasing order also only needs update routine to get final product, therefore the cost of whole proposal realization is lower, revise also being easy to, almost not influence concerning design complexities and system cost.
The foregoing description provides to those of ordinary skills and realizes or use of the present invention; those of ordinary skills can be under the situation that does not break away from invention thought of the present invention; the foregoing description is made various modifications or variation; thereby protection scope of the present invention do not limit by the foregoing description, and should be the maximum magnitude that meets the inventive features that claims mention.
Claims (8)
1. firmware update, it is characterized in that, storage card is after receiving Host Command, Host Command is resolved, if self-defining order, then force storage card to enter the firmware update pattern, cooperate main frame to carry out the firmware update process of storage card, wherein self-defining order is that card reader is set up on the basis of standard storage card command.
2. firmware update according to claim 1 is characterized in that, it is after the storage card electrifying startup that storage card receives Host Command.
3. firmware update according to claim 1 is characterized in that, it is after storage card enters normal mode of operation that storage card receives Host Command.
4. firmware update according to claim 1 is characterized in that, storage card is SD card or Micro SD card.
5. firmware update according to claim 4 is characterized in that, self-defining order realizes with the order of the custom parameter of ACMD41 in the SD card standard criterion, perhaps realizes with the reservation order in the SD card standard criterion.
6. firmware updating device comprises:
Card reader, the storage card order of interior bidding standard and one group of custom command;
Storage card further comprises:
The electrifying startup module, electrifying startup storage card after storage card inserts card reader;
Command recognition module couples the electrifying startup module, receives the initial phase order that card reader sends behind the storage card electrifying startup, identifies the storage card order or the custom command of standard;
The firmware loads module couples command recognition module, is identifying the firmware loads of carrying out storage card after being the storage card order of standard;
The firmware update module couples command recognition module, is identifying the firmware update of carrying out storage card after being custom command.
7. firmware updating device according to claim 6 is characterized in that, storage card is SD card or Micro SD card.
8. firmware updating device according to claim 7 is characterized in that, the self-defining order in the card reader is that the order with the custom parameter of ACMD41 in the SD card standard criterion realizes, perhaps realizes with the reservation order in the SD card standard criterion.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510476779.9A CN104978225A (en) | 2010-08-02 | 2010-08-02 | Firmware updating method and firmware updating device |
CN2010102427342A CN101901158A (en) | 2010-08-02 | 2010-08-02 | Update method and device of firmware |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102427342A CN101901158A (en) | 2010-08-02 | 2010-08-02 | Update method and device of firmware |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510476779.9A Division CN104978225A (en) | 2010-08-02 | 2010-08-02 | Firmware updating method and firmware updating device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101901158A true CN101901158A (en) | 2010-12-01 |
Family
ID=43226710
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510476779.9A Pending CN104978225A (en) | 2010-08-02 | 2010-08-02 | Firmware updating method and firmware updating device |
CN2010102427342A Pending CN101901158A (en) | 2010-08-02 | 2010-08-02 | Update method and device of firmware |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510476779.9A Pending CN104978225A (en) | 2010-08-02 | 2010-08-02 | Firmware updating method and firmware updating device |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN104978225A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102222251A (en) * | 2011-06-23 | 2011-10-19 | 中颖电子股份有限公司 | High-speed low-power-consumption embedded memory card |
CN102331939A (en) * | 2011-06-23 | 2012-01-25 | 中颖电子股份有限公司 | Memory card capable of being upgraded by using any card reader |
CN102707969A (en) * | 2012-04-25 | 2012-10-03 | 中颖电子股份有限公司 | Storage card capable of updating firmware at any time in communication and firmware updating method thereof |
CN104572524A (en) * | 2015-01-06 | 2015-04-29 | 广东翼卡车联网服务有限公司 | Non-drive achievement method and system for accessing SD card IO device |
CN106897095A (en) * | 2017-02-24 | 2017-06-27 | 网易(杭州)网络有限公司 | The multiple method of application program hot repair, device and readable storage medium storing program for executing |
CN111857845A (en) * | 2020-06-19 | 2020-10-30 | 浪潮电子信息产业股份有限公司 | Integrity verification method, device and system for TF card software |
CN115576587A (en) * | 2022-11-18 | 2023-01-06 | 合肥康芯威存储技术有限公司 | Firmware upgrading device and method for storage device |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762797A (en) * | 2018-05-30 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of SSD firmwares online updating method, system and SSD |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1828537A (en) * | 2005-03-01 | 2006-09-06 | 明基电通股份有限公司 | Updating system and method for updating circuit module firmware from updated module |
CN101667447A (en) * | 2008-09-02 | 2010-03-10 | 新唐科技股份有限公司 | Memory card and method for memory card |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7320126B2 (en) * | 2001-11-06 | 2008-01-15 | Sandisk Corporation | Implementation of in system programming to update firmware on memory cards |
JP2008181228A (en) * | 2007-01-23 | 2008-08-07 | Sony Corp | Management system, management method, terminal equipment, management server, and program |
CN101646263A (en) * | 2009-09-07 | 2010-02-10 | 中兴通讯股份有限公司 | Upgrading method of built-in data card and system |
-
2010
- 2010-08-02 CN CN201510476779.9A patent/CN104978225A/en active Pending
- 2010-08-02 CN CN2010102427342A patent/CN101901158A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1828537A (en) * | 2005-03-01 | 2006-09-06 | 明基电通股份有限公司 | Updating system and method for updating circuit module firmware from updated module |
CN101667447A (en) * | 2008-09-02 | 2010-03-10 | 新唐科技股份有限公司 | Memory card and method for memory card |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102222251A (en) * | 2011-06-23 | 2011-10-19 | 中颖电子股份有限公司 | High-speed low-power-consumption embedded memory card |
CN102331939A (en) * | 2011-06-23 | 2012-01-25 | 中颖电子股份有限公司 | Memory card capable of being upgraded by using any card reader |
CN102707969A (en) * | 2012-04-25 | 2012-10-03 | 中颖电子股份有限公司 | Storage card capable of updating firmware at any time in communication and firmware updating method thereof |
CN104572524A (en) * | 2015-01-06 | 2015-04-29 | 广东翼卡车联网服务有限公司 | Non-drive achievement method and system for accessing SD card IO device |
CN104572524B (en) * | 2015-01-06 | 2017-11-21 | 广东翼卡车联网服务有限公司 | It is a kind of to realize the method and system for accessing SD card I/O device without driving |
CN106897095A (en) * | 2017-02-24 | 2017-06-27 | 网易(杭州)网络有限公司 | The multiple method of application program hot repair, device and readable storage medium storing program for executing |
CN106897095B (en) * | 2017-02-24 | 2020-10-13 | 网易(杭州)网络有限公司 | Method and device for hot repairing application program, readable storage medium and computing equipment |
CN111857845A (en) * | 2020-06-19 | 2020-10-30 | 浪潮电子信息产业股份有限公司 | Integrity verification method, device and system for TF card software |
CN111857845B (en) * | 2020-06-19 | 2022-04-22 | 浪潮电子信息产业股份有限公司 | Integrity verification method, device and system for TF card software |
CN115576587A (en) * | 2022-11-18 | 2023-01-06 | 合肥康芯威存储技术有限公司 | Firmware upgrading device and method for storage device |
Also Published As
Publication number | Publication date |
---|---|
CN104978225A (en) | 2015-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101901158A (en) | Update method and device of firmware | |
CN101329632B (en) | Method and apparatus for starting CPU by BOOT | |
CN101431441B (en) | Method for on-line updating FPGA system embedded with CPU | |
CN101454746B (en) | Method for communication with a multi-function memory card | |
US20080065788A1 (en) | System and method for producing high volume flash memory cards | |
CN103777972A (en) | System based on field-programmable gate array, configuration method and upgrading method | |
CN106874054B (en) | Method and system for on-line upgrading module program in repeater | |
CN101634960A (en) | Method for revising BIOS parameter and regenerating checksum | |
CN102945173A (en) | User program on-line upgrading system and method | |
CN101980159B (en) | Updating device and updating method for firmware of U disk | |
CN102707969A (en) | Storage card capable of updating firmware at any time in communication and firmware updating method thereof | |
CN101794110A (en) | Machine recognition method and device between imaging device and imaging box | |
CN102446101A (en) | System for mandatorily upgrading firmware and method for mandatorily upgrading firmware thereof | |
CN108153548A (en) | A kind of EMMC firmware upgrade methods and device | |
US20080114935A1 (en) | Memory Card System and Method Transmitting Host Identification Information Thereof | |
KR100385184B1 (en) | Computer system and method for setting up an operating system information thereof | |
CN102541671A (en) | Method and equipment for increasing recognition rate of electronic equipment to SD (Secure Digital) card | |
CN103309827B (en) | The device parameter reading/writing method of terminal and device | |
CN107423075A (en) | The register method and user terminal of driving | |
CN106293531B (en) | A method of prevent flash in SD use process from surprisingly being distorted based on flash write-protect | |
CN102023906B (en) | Microprocessor of portable terminal as well as portable terminal and repair method thereof | |
CN102184115B (en) | Method for updating system software and terminal device | |
CN101425028B (en) | Computer system and method for repairing firmware of the computer system | |
CN112988465A (en) | Method for automatically recovering operation of single chip microcomputer in upgrading failure | |
US8074023B2 (en) | In-system programming to switch memory access from one area to another in memory cards |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20101201 |