CN105607871A - Control method of intelligent U disk - Google Patents
Control method of intelligent U disk Download PDFInfo
- Publication number
- CN105607871A CN105607871A CN201510956930.9A CN201510956930A CN105607871A CN 105607871 A CN105607871 A CN 105607871A CN 201510956930 A CN201510956930 A CN 201510956930A CN 105607871 A CN105607871 A CN 105607871A
- Authority
- CN
- China
- Prior art keywords
- read
- usb
- write
- flash disk
- usb flash
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0625—Power saving in storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Abstract
The invention discloses a control method of an intelligent U disk. The method comprises the following steps: a, receiving a data package sent by a host by a USB controller, putting the data package in an FIFO memory and generating an interrupt command to inform an MCU; b, analyzing the received command by the MCU, and judging the read/write state of the command; c, configuring the running parameters of a flash controller according to the result of a logic layer, starting a flash to transmit DMA and carrying out physical read/write on the flash; and d, judging whether the physical read/write carried out on the flash satisfies a read/write length requirement of a USB. According to the control method disclosed in the invention, the MCU is capable of dynamically switching the working frequency of the master clock of the U disk according to the practical work condition of the U disk, so that the balance of the performance and power consumption of a U disk controller is realized, and the total power consumption of the U disk controller in the whole working process is reduced.
Description
Technical field
The present invention relates to USB solid state storage technologies field, relate more specifically to a kind of controlling party of intelligent USB flash diskMethod.
Background technology
USB flash disk, its full name is USB flash drive, English " USBflashdisk " by name; A kind of USB of useThe miniature high power capacity mobile storage product of interface, storage medium is generally Nandflash, and it connects by USBMouth is connected with computer, realizes plug and play. USB flash disk is connected to after the USB interface of computer, the data in USB flash diskCan exchange with computer. Now had the USB flash disk controller of supporting USB3.0, the USB flash disk maximum of making is read speedDegree exceedes 200MB/s, and random read-write performance is left mechanical hard disk well behind especially. Meanwhile, USB flash disk controlDevice internal operating frequencies processed and complexity also increase thereupon, allow the petite USB flash disk heat dissipation problem of size become increasingly conspicuous;Along with the rise of USB3.0, the performance of intelligent USB flash disk controller is more and more higher in addition, between performance and power consumptionContradiction is also more and more outstanding, makes the interior cross clock domain design of controller also very complicated, and difficulty is also increasing.
Therefore, be necessary to provide a kind of control method of improved intelligent USB flash disk to overcome above-mentioned defect.
Summary of the invention
The object of this invention is to provide a kind of control method of intelligent USB flash disk, the control method of USB flash disk of the present inventionIn, the read-write frequency of the flash controller of USB flash disk is consistent with USB flash disk controller master clock, and MCU is according to UDish real work situation capable of dynamic switches the operating frequency of USB flash disk master clock, has realized the performance of USB flash disk controllerWith the balance of power consumption, reduce the total power consumption of USB flash disk controller in the whole course of work.
For achieving the above object, the invention provides a kind of control method of intelligent USB flash disk, it comprises following stepRapid: the packet that a, USB controller receive main frame transmission is placed in FIFO memory, produces and interruptsOrder notice MCU; B, MCU resolve the order receiving, and judge the read-write state of described order; C,According to the operational factor of the result configuration flash controller of logical layer, start flash transmission DMA, and to flashCarry out physics read-write; D, judge the read-write length requirement that whether the physics read-write of flash is met to USB.
Preferably, the control method of described intelligent USB flash disk also comprises that step: MCU is according to processing described orderThe frequency in working state control master clock territory. MCU is according to the read-write state control master clock territory of described orderFrequency;
Preferably, before described step a, USB flash disk and main frame exact connect ion and identified by main frame after, whole UDisk controller works in the first clock frequency, described MCU, flash in low power consumpting state and described master clock territoryController and USB controller are in same master clock territory.
Preferably, the described frequency according to the read-write state control master clock territory of described order is specially:
In the time judging order for non-read write command, keep master clock territory to work in the first clock frequency;
In the time judging order for read write command, MCU controls master clock territory and is converted to second clock frequency, and instituteFrequency when stating second clock frequency and be USB flash disk controller and carrying out normal logical layer work.
Preferably, in the time judging order for read write command, USB flash disk controller carries out normal logical layer work alsoConfiguration USB transmits required DMA parameter.
Preferably, in described steps d, the frequency that described MCU controls master clock territory is converted to the 3rd clockFrequency, and described the 3rd clock frequency reading writing working frequency that is flash.
Preferably, the control method of described intelligent USB flash disk also comprises step: flash is carried out after physics read-write,Flash controller is by interrupt notification MCU, and MCU controls master clock and is converted to second clock frequency.
Preferably, described step judges the read-write length requirement tool that whether the physics read-write of flash is met to USBBody is:
In the time that judgement does not meet the read-write length requirement of USB, repeated execution of steps d;
In the time that judgement meets the read-write length requirement of USB, the USB end of transmission, and MCU controls USB flash disk controlThe master clock territory frequency conversion of device processed is the first clock frequency.
Preferably, described the 3rd clock frequency is greater than described the first clock frequency, and described second clock frequencyBe greater than described the 3rd clock frequency.
Compared with prior art, the control method of intelligent USB flash disk of the present invention, because described MCU is according to locatingManage the frequency in the working state control master clock territory of described order, thereby make described USB flash disk controller in differenceDuty time its clock also corresponding change of frequency, the power consumption that also makes whole USB flash disk controller along withThe variation of its duty and changing, thus described USB flash disk controller at one's leisure in low power consumpting state,When work, just in higher power consumption state, therefore reduce the whole course of work of described USB flash disk controllerPower consumption.
By following description also by reference to the accompanying drawings, it is more clear that the present invention will become, and these accompanying drawings are for explainingEmbodiments of the invention.
Brief description of the drawings
Fig. 1 is the flow chart of the control method of the present invention's intelligence USB flash disk.
Detailed description of the invention
With reference now to accompanying drawing, describe embodiments of the invention, in accompanying drawing, similarly element numbers representative is similarly firstPart. As mentioned above, the invention provides a kind of control method of intelligent USB flash disk, in the present invention, USB flash diskThe read-write frequency of flash controller is consistent with USB flash disk master clock, and MCU can according to USB flash disk real work situationThe operating frequency of dynamically switching USB flash disk master clock, has realized the performance of USB flash disk controller and the balance of power consumption, subtractsThe little total power consumption of USB flash disk controller in the whole course of work.
In the control method of the present invention's intelligence USB flash disk, intelligent USB flash disk controller comprises USB controller, flashController (NFC) and MCU, wherein, the transfer of data of described USB controller major control USB passage,The physical read write operation of NFC major control flash, MCU control logic layer is to the same time control of conversion of physical layerThe frequency in USB flash disk controller master clock processed territory; And described USB controller, flash controller (NFC) andBetween MCU three, connect by bus or master cache, to realize the normal transmission of data. Specifically please refer to figure1, the specific embodiment of the control method of description the present invention intelligence USB flash disk. As shown in the figure, the present invention's intelligence UThe control method of dish comprises the steps:
Step S101, the packet that USB controller receives main frame transmission is placed into FIFO (FirstInputThe abbreviation of FirstOutput, First Input First Output) in memory, produce interruptive command notice MCU; At thisIn step, in USB controller, be provided with FIFO, for the link layer at USB and master cache span clockTerritory swap data; And in this step, when USB flash disk and main frame exact connect ion and after being identified by main frame, whole UDisk controller works in the first clock frequency in low power consumpting state and described master clock territory, and this first clock frequentlyRate is conventionally very low, and to make described USB flash disk controller in low power consumpting state, this first clock frequency can be exampleAs 5MHZ, certainly also can be other low frequency clock, can set according to concrete USB flash disk controller. InstituteStating MCU, flash controller and USB controller in same clock zone, is also described master clock territory, andMost of Digital Logic of USB flash disk controller is also operated in same master clock territory, thereby makes described when mainWhen clock territory works in the first clock frequency, each parts are all in low power consumpting state; And arrange in described MCUHave frequency multiplier, described frequency multiplier provides clock zone (master clock for described USB controller, NFC and MCUTerritory), thus ensure that described USB controller, NFC and MCU are in same clock zone; Described MCUControl the frequency in described frequency multiplier output clock territory, also control the frequency in described master clock territory.
Step S102, MCU resolves the order receiving, and judges the read-write state of described order; At thisIn step, the read-write state of described order comprises non-read-write state and read-write state two states.
As a preferred embodiment of the present invention, the control method of described intelligent USB flash disk also comprises step S103,MCU is according to the frequency in the working state control master clock territory of the described order of processing; In this step, MCUControl procedure to master clock territory frequency is specially:
In the time judging order for non-read write command, keep master clock territory to work in the first clock frequency, non-read-writeState is described USB flash disk controller in idle condition, and namely described USB flash disk controller maintains by main frameThe low power consumpting state recognizing, now described MCU controls described master clock territory and works in the first clock frequency(clock frequency that is also described frequency multiplier output is the first clock frequency), thus described USB flash disk control ensuredDevice maintains low power consumpting state. When judging that order is when the read write command, MCU controls master clock territory and is converted to theTwo clock frequencies, and described second clock frequency is the frequency of USB flash disk controller while carrying out the work of normal logical layerRate, to carry out logical address conversion, the logical layer work such as page table lookup; Wherein said second clock frequency isThe maximum operating frequency of described USB flash disk controller, is generally 80MHZ, and this frequency is according to hardware (USB flash disk controlThe IC of device) highest frequency and determine, therefore in actual applications, the maximum operating frequency of described MCUTo determine according to the highest frequency of concrete USB flash disk controller, be not limited to 80MHZ; And when MCU controlsMaster clock territory is converted to after second clock frequency, and USB flash disk controller carries out normal logical layer work and configures USBThe DMA parameter transmitting, to ensure that data can normally transmit.
Step S104, according to the operational factor of the result configuration flash controller of logical layer, starts flash and passesDefeated DMA, and flash is carried out to physics read-write; In this step, according to the fortune of logical layer in step S103Row result and the operational factor of corresponding configuration flash controller, to carry out normal physics read-write to flash; AndIn this step, the frequency that described MCU controls master clock territory is converted to the 3rd clock frequency, and the described the 3rdClock frequency is the operating frequency of flash read-write, to ensure carrying out normal physics read-write to flash, and notCan make mistakes; Wherein, as a specific embodiment of the present invention, the reading writing working frequency of flash is 40MHZ,Apparently, in concrete application, be not limited in this frequency, can be according to concrete actual conditions and correspondence is establishedDetermine the reading writing working frequency of flash, to making flash carry out normal physics read-write.
In addition, as the preferred embodiments of the present invention, described the 3rd clock frequency is greater than described the first clock frequentlyRate, and described second clock frequency is greater than described the 3rd clock frequency. As mentioned above, described the first clock frequentlyRate be USB flash disk and main frame exact connect ion and identified by main frame after clock frequency in the time of idle condition, for example5MHZ; Described second clock frequency is the frequency of USB flash disk controller while carrying out the work of normal logical layer, exampleAs 80MHZ, now described USB flash disk controller is in the state of running up, and its power consumption is also maximum; DescribedThe 3rd clock frequency is the operating frequency of flash read-write, for example 40MHZ; Thereby make described USB flash disk controlDevice is in the time of different duty, and described MCU adjusts the frequency of the clock zone of its output in real time, both protectsDemonstrate,prove the normal work of USB flash disk controller, reduced again the power consumption in the whole course of work.
Step S105, judges the read-write length requirement that whether the physics read-write of flash is met to USB; At thisIn frequency, by judge the read-write length requirement whether the physics read-write of flash is met to USB determine rightWhether the physics read-write of flash completes. Particularly, when judging, the physics of flash is read and write to discontented sufficient USB'sWhen read-write length requirement, repeated execution of steps S104, until meet the read-write length requirement of USB, to preventCarry out skip and write or mispronounce the operation of writing, ensure the correctness of read-write operation; When the physical read judging flashWhile writing the read-write length requirement that meets USB, the USB end of transmission. And as the preferred embodiments of the present invention,Complete after the physics read-write of flash, flash controller is by interrupt notification MCU, and MCU controls USB flash disk controlThe master clock territory of device processed is converted to the first clock frequency; So far described USB flash disk controller completes a course of work,Enter idle condition, the now master clock territory frequency conversion of described MCU control USB flash disk controller is the first clock frequencyRate, to reduce power consumption, makes whole USB flash disk controller maintain a low power consumpting state.
As mentioned above, the control method of intelligent USB flash disk of the present invention can be according to the different work of described USB flash disk controllerThe state of doing is adjusted the frequency that changes its master clock territory in real time, thereby makes described USB flash disk controller differentDuty has different power consumptions, instead of power consumption while always maintaining intensive work state, reducesThe power consumption of the whole course of work.
In conjunction with most preferred embodiment, invention has been described above, but the present invention is not limited to above announcementEmbodiment, and should contain the various amendments of carrying out according to essence of the present invention, equivalent combinations.
Claims (9)
1. a control method for intelligent USB flash disk, is characterized in that, comprises the steps:
The packet that a, USB controller receive main frame transmission is placed in FIFO memory, produces and interruptsOrder notice MCU;
B, MCU resolve the order receiving, and judge the read-write state of described order;
C, according to the operational factor of the result configuration flash controller of logical layer, start flash transmission DMA,And flash is carried out to physics read-write;
D, judge the read-write length requirement that whether the physics read-write of flash is met to USB.
2. the control method of intelligent USB flash disk as claimed in claim 1, is characterized in that, also comprises stepMCU is according to the frequency in the working state control master clock territory of the described order of processing.
3. the control method of intelligent USB flash disk as claimed in claim 2, is characterized in that, at described step aBefore, USB flash disk and main frame exact connect ion and identified by main frame after, whole USB flash disk controller is in low power consumpting stateAnd described master clock territory works in the first clock frequency, described MCU, flash controller and USB controllerIn same master clock territory.
4. the control method of intelligent USB flash disk as claimed in claim 3, is characterized in that, described in described basisThe frequency in the read-write state control master clock territory of order is specially:
In the time judging order for non-read write command, keep master clock territory to work in the first clock frequency;
In the time judging order for read write command, MCU controls master clock territory and is converted to second clock frequency, and instituteFrequency when stating second clock frequency and be USB flash disk controller and carrying out normal logical layer work.
5. the control method of intelligent USB flash disk as claimed in claim 4, is characterized in that, when judging that order isWhen read write command, USB flash disk controller carries out normal logical layer work and configures USB transmitting required DMAParameter.
6. the control method of intelligent USB flash disk as claimed in claim 5, is characterized in that, in described steps dIn, the frequency that described MCU controls master clock territory is converted to the 3rd clock frequency, and described the 3rd clock frequencyFor the reading writing working frequency of flash.
7. the control method of intelligent USB flash disk as claimed in claim 6, is characterized in that, also comprises step:Complete after the physics read-write of flash, flash controller is by interrupt notification MCU, and MCU controls master clockBe converted to the first clock frequency.
8. the control method of intelligent USB flash disk as claimed in claim 3, is characterized in that, described step judgementThe read-write length requirement that whether the physics read-write of flash is met to USB is specially:
In the time that judgement does not meet the read-write length requirement of USB, repeated execution of steps d;
In the time that judgement meets the read-write length requirement of USB, the USB end of transmission, and MCU controls USB flash disk controlThe master clock territory frequency conversion of device processed is the first clock frequency.
9. the control method of intelligent USB flash disk as claimed in claim 6, is characterized in that, described the 3rd clockFrequency is greater than described the first clock frequency, and described second clock frequency is greater than described the 3rd clock frequency.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510956930.9A CN105607871A (en) | 2015-12-18 | 2015-12-18 | Control method of intelligent U disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510956930.9A CN105607871A (en) | 2015-12-18 | 2015-12-18 | Control method of intelligent U disk |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105607871A true CN105607871A (en) | 2016-05-25 |
Family
ID=55987834
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510956930.9A Pending CN105607871A (en) | 2015-12-18 | 2015-12-18 | Control method of intelligent U disk |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105607871A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102103558A (en) * | 2009-12-18 | 2011-06-22 | 上海华虹集成电路有限责任公司 | Multi-channel NANDflash controller with write retransmission function |
CN103136136A (en) * | 2012-11-23 | 2013-06-05 | 香港应用科技研究院有限公司 | Method and system for performing data transmission of flash memory media |
CN204129729U (en) * | 2014-06-05 | 2015-01-28 | 苏州润林文化传媒有限公司 | A kind of Flash storage control system based on DMA transmission |
CN104391564A (en) * | 2014-11-28 | 2015-03-04 | 福州瑞芯微电子有限公司 | Power consumption control method and device |
-
2015
- 2015-12-18 CN CN201510956930.9A patent/CN105607871A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102103558A (en) * | 2009-12-18 | 2011-06-22 | 上海华虹集成电路有限责任公司 | Multi-channel NANDflash controller with write retransmission function |
CN103136136A (en) * | 2012-11-23 | 2013-06-05 | 香港应用科技研究院有限公司 | Method and system for performing data transmission of flash memory media |
CN204129729U (en) * | 2014-06-05 | 2015-01-28 | 苏州润林文化传媒有限公司 | A kind of Flash storage control system based on DMA transmission |
CN104391564A (en) * | 2014-11-28 | 2015-03-04 | 福州瑞芯微电子有限公司 | Power consumption control method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106354656B (en) | Method and system for storage management | |
US8688901B2 (en) | Reconfigurable load-reduced memory buffer | |
US10304546B2 (en) | External storage device and method of setting reference frequency for the same | |
CN108108324B (en) | PCIE (peripheral component interface express) expansion method and device | |
US11468329B2 (en) | Techniques to manage training or trained models for deep learning applications | |
CN111176919B (en) | FPGA test method, device and storage medium | |
WO2016095435A1 (en) | Multi-chip cascading method, chip and device, and storage medium | |
CN104965798A (en) | Data processing method, related device and data processing system | |
CN102870374A (en) | Load-sharing method and apparatus, and veneer, | |
US9223379B2 (en) | Intelligent receive buffer management to optimize idle state residency | |
JP2009129077A (en) | Information processor having memory clock setting function and memory clock setting method | |
CN107861775A (en) | A kind of SSD starts control device and method | |
CN110765065A (en) | System on chip | |
US20130148583A1 (en) | Method and system for transferring data between wireless devices | |
US20200379677A1 (en) | Memory controller and memory controlling method where number of commands (executed by the memory controller prior to releasing host memory) is adjusted based on transmission speed of interface to host | |
CN105607871A (en) | Control method of intelligent U disk | |
CN106796505A (en) | Instruct the method and processor for performing | |
CN102033713A (en) | Electronic system, controller and data transmission method | |
CN106547716B (en) | A kind of expansion bus configuration system and method towards low pin number | |
CN102693199B (en) | IDMA (Internal Direct Memory Access) interface and control method thereof | |
CN110856195B (en) | Configuration system and method of radio frequency assembly | |
US9367495B1 (en) | High speed integrated circuit interface | |
US9377957B2 (en) | Method and apparatus for latency reduction | |
US10832132B2 (en) | Data transmission method and calculation apparatus for neural network, electronic apparatus, computer-readable storage medium and computer program product | |
US20090271677A1 (en) | Data Transformation Method and Related Device for a Testing System |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160525 |
|
WD01 | Invention patent application deemed withdrawn after publication |