CN108062281A - A kind of solution mass-memory unit carries out data copy with PC ends and the method to break occurs - Google Patents

A kind of solution mass-memory unit carries out data copy with PC ends and the method to break occurs Download PDF

Info

Publication number
CN108062281A
CN108062281A CN201711083137.8A CN201711083137A CN108062281A CN 108062281 A CN108062281 A CN 108062281A CN 201711083137 A CN201711083137 A CN 201711083137A CN 108062281 A CN108062281 A CN 108062281A
Authority
CN
China
Prior art keywords
memory unit
data copy
timer
carries out
out data
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
CN201711083137.8A
Other languages
Chinese (zh)
Other versions
CN108062281B (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.)
Zhuhai Fruit Technology Co Ltd
Original Assignee
Zhuhai Fruit 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 Zhuhai Fruit Technology Co Ltd filed Critical Zhuhai Fruit Technology Co Ltd
Priority to CN201711083137.8A priority Critical patent/CN108062281B/en
Publication of CN108062281A publication Critical patent/CN108062281A/en
Application granted granted Critical
Publication of CN108062281B publication Critical patent/CN108062281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/22Handling requests for interconnection or transfer for access to input/output bus using successive scanning, e.g. polling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

Technical scheme includes a kind of solution mass-memory unit and the method to break occurs with PC ends progress data copy, and this method includes:When mass-memory unit carries out data copy with PC ends, timer is created in storage device;When the time of equipment end processing PC sort commands is no more than the broken string threshold value at PC ends, then CSW is directly transmitted, if more than broken string threshold value, CSW is replied using timer;Timer is reset after the completion of replying, and receives the operational order at follow-up PC ends.Beneficial effects of the present invention are:In the case where not changing the existing data writing mechanism of equipment end, broken string caused by data write-in can be effectively avoided, and also ensures the integrality of data.

Description

A kind of solution mass-memory unit carries out data copy with PC ends and occurs what is broken Method
Technical field
Data copy is carried out with PC ends the present invention relates to a kind of solution mass-memory unit and the method to break occur, belong to Computer data interaction process field.
Background technology
Many mobile equipment, especially some multimedia play equipments are, it is necessary to connect the transmission that PC carries out data, relatively often What is seen is exactly mass storage functions, and after equipment is connected by USB line with PC, when PC can pop up a mobile disk, open The file copy on PC to equipment end can be used after disk.
Prior art:Existing technical solution is usually the read-write for the agreement completion data for following Bulk-Only, Under this mode, all orders, which are all encapsulated in CBW, to be transmitted, and equipment end comes out command analysis after receiving CBW, then holds The corresponding order of row, for example if receiving the order of write operation, will write data in the storage specified, it can be returned after having performed CSW is returned, PC receives the follow-up superventions of CSW and CBW is sent to perform Next Command.PC can wait the return of CSW after CBW is sent, and exceed Regular hour just will be considered that communication abnormality, can carry out reset operation to equipment.That is having to the processing time of equipment will It asks, the equipment of many massive stores is just present with broken string when connecting PC and carrying out data copy, causes data write-in failure, must Connection must be re-established.
Existing technical disadvantages are that write operation to be waited returns again to CSW to PC after finishing, and the write time of each is often It is different, has read-write data buffer storage in many Mobile operating systems at present, data are first to write in caching, subsequently again Equipment storage is written back to, write operation time of return at this time is than very fast, but the containing dirty pages quantity for working as system reaches certain threshold value, The operation of write-back storage can be triggered, the time that write operation needs in this case is just relatively more long.For PC, if waited The time of CSW is more long, receives CSW not yet within general 9 seconds or so, will send the signal of reset to equipment end.At this time It is susceptible to copy to fail to normally complete, the situation of PC ends prompting disk write-in failure.
Bulk-Only:A kind of piece of storage class agreement that USB harpoons formulate mass-memory unit.
Command Block Wrapper(CBW):One data packet comprising command block and associated information.
Command Status Wrapper(CSW):One data packet that state is performed comprising command block.
The content of the invention
In view of the deficiencies of the prior art, technical scheme provides a kind of solution mass-memory unit and PC ends It carries out data copy and the method to break occurs, for solving the deficiencies in the prior art.
Technical scheme includes a kind of solution mass-memory unit and breaks with PC ends progress data copy Method, which is characterized in that this method includes:S1, when mass-memory unit carries out data copy with PC ends, in storage device Create timer;S2 when the time of equipment end processing PC sort commands is no more than the broken string threshold value at PC ends, then directly transmits CSW, if More than broken string threshold value, then CSW is replied using timer;S3 resets timer after the completion of replying, and receives the operation at follow-up PC ends Instruction.
Data copy is carried out according to a kind of solution mass-memory unit and PC ends and the method to break occurs, wherein Step S1 is further included:The data copy size at detection device end and PC ends, the data if desired copied are then more than specified threshold Equipment end creates corresponding timer, and sets timing, and initialization timer is required for when receiving order.
Data copy is carried out according to a kind of solution mass-memory unit and PC ends and the method to break occurs, wherein Equipment end receives initialization timer after the CBW that PC ends are sent.
Data copy is carried out according to a kind of solution mass-memory unit and PC ends and the method to break occurs, wherein Timing be no more than PC ends broken string threshold value.
Data copy is carried out according to a kind of solution mass-memory unit and PC ends and the method to break occurs, wherein The broken string threshold value at PC ends is arranged to 8~10s, and wherein 8s is set for compatibility, and 9~10s is set to be general.
Data copy is carried out according to a kind of solution mass-memory unit and PC ends and the method to break occurs, wherein Step S2 is further included:Equipment end parses order in CBW, and then performs corresponding order, if the subcommand time performed is not Broken string threshold value more than PC ends then replys CSW, if more than the broken string threshold value at PC ends, is performed back in timer using call back function The action of multiple CSW.
Data copy is carried out according to a kind of solution mass-memory unit and PC ends and the method to break occurs, wherein Step S3 is further included:Timer is reset after having replied CSW, continues to the Next Command at CBW processing PC ends.
Data copy is carried out with PC ends according to the arbitrary solution mass-memory unit and the method to break, feature occurs It is, this method further includes:Mass-memory unit carries out data copy with PC ends and refers to the storage of mass-memory unit Data are transmitted to PC ends by data connecting line, can also refer to lead to the data of the suitable mass-memory unit storage at PC ends Data connecting line is crossed to store to mass-memory unit.
Beneficial effects of the present invention are:It, can be effective in the case where not changing the existing data writing mechanism of equipment end Avoid data write-in caused by broken string, and also ensure the integrality of data.
Description of the drawings
Fig. 1 show the overview flow chart of embodiment according to the present invention.
Specific embodiment
It is right in the following with reference to the drawings and specific embodiments in order to make the object, technical solutions and advantages of the present invention clearer The present invention is described in detail.The solution mass-memory unit of the present invention carries out data copy with PC ends and the method to break occurs Data copy is carried out suitable for mass-memory unit and PC ends.
Fig. 1 show the overall construction drawing of embodiment according to the present invention.
(1) timer is created when equipment end enters massive store pattern.
(2) after equipment end receives CBW, the timer is initialized, the timing of timer is set in 8 seconds.
(3) equipment end comes out command analysis, then perform corresponding order, for example, write data can calling system write text Then part interface waits its return.
(4) after equipment has performed order, CSW is replied, then timer is reset.
(5) equipment is during order is performed, if 8 seconds be timed to, represents that CSW can not be returned in time, at this moment exist The action for replying CSW is performed in the call back function of timer.
(6) timer is reset after having replied CSW.
(7) Next Command of CBW processing PC is continued to.
The above is presently preferred embodiments of the present invention, the invention is not limited in the above embodiment, as long as It reaches the technique effect of the present invention with identical means, should all belong to the scope of protection of the present invention.In the protection model of the present invention Its technical solution and/or embodiment can have a variety of modifications and variations in enclosing.

Claims (8)

1. a kind of solution mass-memory unit carries out data copy with PC ends there is the method to break, which is characterized in that the party Method includes:
When mass-memory unit carries out data copy with PC ends, timer is created in storage device by S1;
S2 when the time of equipment end processing PC sort commands is no more than the broken string threshold value at PC ends, then directly transmits CSW, if more than disconnected Line threshold value then replys CSW using timer;
S3 resets timer after the completion of replying, and receives the operational order at follow-up PC ends.
2. a kind of solution mass-memory unit according to claim 1 carries out data copy with PC ends and the side to break occurs Method, which is characterized in that the step S1 is further included:
The data copy size at detection device end and PC ends, the data if desired copied are more than that specified threshold then creates for equipment end Corresponding timer, and timing is set, it is required for initialization timer when receiving order.
3. a kind of solution mass-memory unit according to claim 2 carries out data copy with PC ends and the side to break occurs Method, which is characterized in that initialization timer after equipment end receives the CBW of PC ends transmission.
4. a kind of solution mass-memory unit according to claim 2 carries out data copy with PC ends and the side to break occurs Method, which is characterized in that timing therein is no more than the broken string threshold value at PC ends.
5. a kind of solution mass-memory unit according to claim 2 or 4 carries out data copy with PC ends and breaks Method, which is characterized in that the broken string threshold value at PC ends is arranged to 8~10s, and wherein 8s is set for compatibility, and 9~10s is general It sets.
6. a solution mass-memory unit according to claim 1 carries out data copy with PC ends and the side to break occurs Method, which is characterized in that the step S2 is further included:
Equipment end parses order in CBW, and then performs corresponding order, if the subcommand time performed is no more than PC ends Broken string threshold value then replys CSW, if more than the broken string threshold value at PC ends, is performed in timer using call back function and replys the dynamic of CSW Make.
7. a solution mass-memory unit according to claim 1 carries out data copy with PC ends and the side to break occurs Method, which is characterized in that the step S3 is further included:
Timer is reset after having replied CSW, continues to the Next Command at CBW processing PC ends.
8. carrying out data copy with PC ends according to the arbitrary solution mass-memory units of claim 1-7 there is the side to break Method, which is characterized in that this method further includes:
Mass-memory unit carries out data copy with PC ends and refers to connect the storage data of mass-memory unit by data Bound transmission can also refer to deposit the data of the suitable mass-memory unit storage at PC ends by data connecting line to PC ends It stores up to mass-memory unit.
CN201711083137.8A 2017-11-07 2017-11-07 Method for solving disconnection of data copying between mass storage device and PC terminal Active CN108062281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711083137.8A CN108062281B (en) 2017-11-07 2017-11-07 Method for solving disconnection of data copying between mass storage device and PC terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711083137.8A CN108062281B (en) 2017-11-07 2017-11-07 Method for solving disconnection of data copying between mass storage device and PC terminal

Publications (2)

Publication Number Publication Date
CN108062281A true CN108062281A (en) 2018-05-22
CN108062281B CN108062281B (en) 2020-06-30

Family

ID=62135672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711083137.8A Active CN108062281B (en) 2017-11-07 2017-11-07 Method for solving disconnection of data copying between mass storage device and PC terminal

Country Status (1)

Country Link
CN (1) CN108062281B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022126584A1 (en) * 2020-12-18 2022-06-23 华为技术有限公司 Link reestablishment method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1385794A (en) * 2001-05-14 2002-12-18 精工爱普生株式会社 Data transmission controller, electronic device and data transmission method
CN1564001A (en) * 2004-04-09 2005-01-12 清华大学 Portable signal generating method and system based on USB mobile memory tech
CN1776588A (en) * 2004-11-16 2006-05-24 富士通株式会社 Information processing system, storage unit,and computer-readable recording medium
CN101303685A (en) * 2007-05-09 2008-11-12 瑞昱半导体股份有限公司 Method for improving read-write data speed of all-purpose sequence bus storage equipment
US9760730B2 (en) * 2015-08-28 2017-09-12 Dell Products L.P. System and method to redirect and unlock software secure disk devices in a high latency environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1385794A (en) * 2001-05-14 2002-12-18 精工爱普生株式会社 Data transmission controller, electronic device and data transmission method
CN1564001A (en) * 2004-04-09 2005-01-12 清华大学 Portable signal generating method and system based on USB mobile memory tech
CN1776588A (en) * 2004-11-16 2006-05-24 富士通株式会社 Information processing system, storage unit,and computer-readable recording medium
CN101303685A (en) * 2007-05-09 2008-11-12 瑞昱半导体股份有限公司 Method for improving read-write data speed of all-purpose sequence bus storage equipment
US9760730B2 (en) * 2015-08-28 2017-09-12 Dell Products L.P. System and method to redirect and unlock software secure disk devices in a high latency environment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022126584A1 (en) * 2020-12-18 2022-06-23 华为技术有限公司 Link reestablishment method and device

Also Published As

Publication number Publication date
CN108062281B (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN103034603B (en) Multi-channel flash memory card control device and control method thereof
CN102866971A (en) Data transmission device, system and method
CN103955441A (en) Equipment management system, equipment management method and IO (Input/Output) expansion interface
CN103401909A (en) Data interaction method and system based on BS (browser/server), client end and server
US9835682B2 (en) Debugging system and method
CN109656841A (en) Mixing control method and device based on software simulation I2C and Hardware I2C
CN102750245B (en) Message method of reseptance, message receiver module, Apparatus and system
CN110289039A (en) A kind of adjustment method and device of eMMC
CN101751230B (en) Equipment and method for calibrating time stamp of I/O (input/output) data
CN111143898B (en) Data protection method for pluggable memory device
CN108062281A (en) A kind of solution mass-memory unit carries out data copy with PC ends and the method to break occurs
TWI696078B (en) Memory device and method for operating the same
CN111198837B (en) SDIO interface system based on FPGA and controller bridging method
CN103973534A (en) Method and device for simulating sharing of USB flash disk
CN104601489A (en) Log block transmitting method and apparatus
CN102043741B (en) Circuit and method for pipe arbitration
CN101561760B (en) Interface card firmware upgrading method
CN109144844A (en) Method for tracing, device, equipment and machine readable media
CN114153634A (en) Inter-process communication system and operating platform based on domestic Loongson processor
CN114168503A (en) Interface IP core control method, interface IP core, device and medium
CN105117358A (en) DMA (Direct Memory Access) data transmission method and apparatus
CN102147766B (en) Method for maintaining TCP (Transmission Control Protocol) stream table structure and unordered buffer area
CN101976230A (en) Transaction translator of universal serial bus and input request isochronous transaction method
CN108776629A (en) A kind of server chips group carry Micro SD cards switching system and method
CN103257930B (en) A kind of data read-write method based on DDS and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant