Utility model content
In view of above-mentioned the deficiencies in the prior art part, the purpose of this utility model is to provide a kind of break-make of storage deviceTest device and system, to solve the problems, such as that existing storage device is loaded down with trivial details by plug test operation is manually carried out.
In order to achieve the above object, the utility model takes technical scheme below:
A kind of on off test device of storage device, connection main frame and storage device, wherein, the storage device includes cardEquipment and USB device;The on off test device includes:Cartoon is broken control module, USB break-make control modules, control module, cardInterface and USB interface;
The control module output card control signal and USB control signals;The disconnected control module of cartoon is according to card control signalCard data, card power supply, the transmission state of card detection signal between control card apparatus and card interface, card interface transmission card data, cardPower supply, card detection signal are tested to main frame;
It is electric that USB break-makes control module controls usb data and USB between USB device and USB interface according to USB control signalsThe transmission state in source, USB interface transmission usb data and USB power source are tested to main frame.
In the on off test device of described storage device, the disconnected control module of the cartoon includes:
For according to the transmission of card power supply between first switch signal controller equipment and card interface and the card power supply for blockingSwitch element;
For according to the transmission of card data between second switch signal controller equipment and card interface and the card data blockedSwitch element;
For exporting card detector unit of the corresponding card detection signal to card interface according to trigger;
The card power switch unit link control module, card apparatus and card interface;The connection control of card data switch unitModule, card apparatus and card interface;Card detector unit link control module, card apparatus and card interface.
In the on off test device of described storage device, the USB break-makes control module includes:
For controlling the transmission of USB power source and the USB for blocking between USB device and USB interface according to the 3rd switching signalPower switch unit;
For controlling the transmission of usb data and the USB for blocking between USB device and USB interface according to the 4th switching signalData switch unit;
The USB power source switch element link control module, USB device and USB interface;Usb data switch element connectsControl module, USB device and USB interface.
In the on off test device of described storage device, the control module includes the control chip of model STM32;The PA4 pin connection card power switch unit of the control chip, the PA6 pin connection card data switch unit of control chip, controlThe PB12 pin connection card detector unit of chip, the PA5 pin connection USB power source switch element of control chip, the PB10 of control chipPin connects usb data switch element;The VBAT pin of control chip, NRST pin, VDDA pin, VDD_1 pin, VDD_2 pin, VDD_3 pinIt is all connected with operating voltage end.
In the on off test device of described storage device, the card power switch unit includes first resistor, second electricResistance, 3rd resistor, the first triode and the first metal-oxide-semiconductor;
One end of the first resistor connects the base stage of the first triode, the other end connection control chip of first resistorPA4 pin, the grounded emitter of the first triode, the colelctor electrode of the first triode connects one end of 3rd resistor, 3rd resistorOne end of other end connection second resistance and the grid of the first metal-oxide-semiconductor, the source electrode of the first metal-oxide-semiconductor connects the other end of second resistanceConnection card interface, the power end of the drain electrode connection card apparatus of the first metal-oxide-semiconductor.
In the on off test device of described storage device, the card data switch unit includes model MAX4947First switch chip, the 4th resistance and the first electric capacity;
The COM1 pin of the first switch chip, COM2 pin, COM3 pin, COM4 pin, COM5 pin and COM6 pin are all connected with cardInterface;The NC1 pin of first switch chip, NC2 pin, NC3 pin, NC4 pin, NC5 pin and NC6 pin are all connected with card apparatus;First switchThe VCC pin of chip connect feeder ear, also pass through the first capacity earth;The CB12 pin connection CB34 pin of first switch chip, CB56One end of pin and the 4th resistance, the other end of the 4th resistance connects the PA6 pin of control chip;The GND pin of first switch chip connectGround.
In the on off test device of described storage device, the card detector unit includes the second triode, the 5th resistanceWith the 6th resistance;
The base stage of second triode connects one end of the 5th resistance, the other end link control module of the 5th resistancePB12 pin, the grounded emitter of the second triode;The colelctor electrode of the second triode is connected card interface, is also connected by the 6th resistanceThe power end of card apparatus.
In the on off test device of described storage device, the USB power source switch element includes the 7th resistance, the 8th electricResistance, the 9th resistance, the 3rd triode and the second metal-oxide-semiconductor;
One end of 7th resistance connects the base stage of the 3rd triode, the other end connection control chip of the 7th resistancePA5 pin, the grounded emitter of the 3rd triode, the colelctor electrode of the 3rd triode connects one end of the 9th resistance, the 9th resistanceThe other end connects one end of the 8th resistance and the grid of the second metal-oxide-semiconductor, and the source electrode of the second metal-oxide-semiconductor connects the other end of the 8th resistanceConnection USB interface, the power end of the drain electrode connection USB device of the second metal-oxide-semiconductor.
In the on off test device of described storage device, the usb data switch element includes model MAX4947Second switch chip, the tenth resistance and the second electric capacity;
The COM1 pin of the second switch chip, COM2 pin, COM3 pin, COM4 pin, COM5 pin and COM6 pin are all connected with USBInterface;The NC1 pin of second switch chip, NC2 pin, NC3 pin, NC4 pin, NC5 pin and NC6 pin are all connected with USB device;Second switchThe VCC pin of chip connect feeder ear, also pass through the second capacity earth;The CB12 pin connection CB34 pin of second switch chip, CB56One end of pin and the tenth resistance, the other end of the tenth resistance connects the PB10 pin of control chip;The GND pin of second switch chip connectGround.
A kind of on off test system of storage device, it includes main frame and described on off test device, and the break-make is surveyedConnection main frame, storage device and on off test device grafting are put in trial assembly;
On off test device controls the on/off and data break-make between storage device and main frame, with analog storage equipmentPlug operation in main frame.
The on off test apparatus and system of the storage device provided compared to prior art, the utility model, control moduleOutput card control signal and USB control signals;The disconnected control module of cartoon according to card control signal controller equipment and card interface itBetween card data, card power supply, the transmission state of card detection signal, card interface transmission card data, card power supply, card detection signal are to main frameTested;It is electric that USB break-makes control module controls usb data and USB between USB device and USB interface according to USB control signalsThe transmission state in source, USB interface transmission usb data and USB power source are tested to main frame.By on off test device automatic imitationThe plug state of card apparatus and USB device, without the need for artificial repeatedly plug, greatlys save manpower.Solve existing storage deviceThe problem loaded down with trivial details by plug test operation is manually carried out.
Specific embodiment
The utility model provides a kind of on off test apparatus and system of storage device.For make the purpose of this utility model,Technical scheme and effect are clearer, clear and definite, and the embodiment that develops simultaneously referring to the drawings is further described to the utility model.It should be appreciated that specific embodiment described herein is not used to limit the utility model only to explain the utility model.
Fig. 1 is referred to, a kind of on off test system of storage device that the utility model is provided includes on off test device10 and main frame 20.The on off test device 10 is connected with main frame 20 by interface, storage device insertion on off test device 10In.On off test device 10 controls the on/off and data break-make between storage device and main frame 20, so as to analog storage setsThe standby plug operation in main frame.So only storage device need to be inserted on off test device 10, by off test device 10Automatic imitation plug state, without the need for artificial repeatedly plug, greatlys save manpower.
In the present embodiment, the storage device can be card apparatus(Such as SD card, TF cards)And USB device.Both differencesIt is that card apparatus need to carry out insertion detection, and USB device need not(The compatible insertion detections of supply pin VUSB on USB interfaceFunction).The internal circuit board of on off test device 10, arranges the disconnected control module 110 of cartoon, the control of USB break-makes on circuit boardModule 120, control module 130, card interface 140 and usb 1 50.The disconnected connection of control module 110 card apparatus of cartoon, control mouldBlock 130 and card interface 140, the connection USB device of USB break-makes control module 120, control module 130 and usb 1 50.
The output card control signal of the control module 130 and USB control signals.The disconnected control module 110 of cartoon is according to controlCard data, card power supply, the transmission state of card detection signal between signal controller equipment processed and card interface 140, card interface 140 is passedDefeated card data, card power supply, card detection signal are tested to main frame.USB break-makes control module 120 is according to USB control signal controlsThe transmission state of usb data and USB power source between USB device processed and usb 1 50, usb 1 50 transmission usb data andUSB power source is tested to main frame.
The disconnected control module 110 of cartoon and USB break-makes control module 120 are separate and be independent of each other, so can be simultaneouslyDetection card-type equipment and USB device, also can separate detection, improve the utilization rate of on off test device 10.
It is to be appreciated that card interface 140 and usb 1 50 are prior art, the two interfaces are connected by data wireInto the corresponding interface of main frame, for transmission data;Its model is not construed as limiting herein.The control letter of the output of control module 130Number can be the test program of the advance editor of system, or the output of tester's manual control.In the specific implementation, on off test device10 may be configured as an independent equipment, are provided with shell, shell and arrange control panel(For realizing entering on off test deviceRow is switched, sends the operation such as control instruction), supply module, interface are also included inside it(For inserting USB device), draw-in groove(WithIn the card apparatus of insertion SD card, TF cards etc), prior art is relatively common.The present embodiment mainly illustrates its internal control electricityLine structure.
Please continue to refer to Fig. 1, the disconnected control module 110 of the cartoon includes card power switch unit 111, card data switch listUnit 112 and card detector unit 113.Card control signal includes first switch signal, second switch signal and trigger.The cardPower switch unit 111 is according to the transmission of card power supply between first switch signal controller equipment and card interface 140 and blocks.CardData switch unit 112 is according to the transmission of card data between second switch signal controller equipment and card interface 140 and blocks.CardDetector unit 113 exports corresponding card detection signal to card interface 140 according to trigger.The card power switch unit 111Link control module 130, card apparatus and card interface 140;The link control module 130, card apparatus of card data switch unit 112 and cardInterface 140;The link control module 130, card apparatus of card detector unit 113 and card interface 140.
Fig. 2 is seen also, the control module 130 adopts the control chip U of model STM32.Control chip U'sPA4 pin connection card power switch unit 111, the PA6 pin connection card data switch unit 112 of control chip U, control chip U'sPB12 pin connection card detector unit 113, the PA5 pin connection USB power source switch element 121 of control chip U, control chip U'sPB10 pin connection usb data switch element 122;The VBAT pin of control chip U, NRST pin, VDDA pin, VDD_1 pin, VDD_2 pin,VDD_3 pin are all connected with operating voltage end MCU_3V3.
Fig. 3 is seen also, so that card apparatus are as SD card as an example.The card power switch unit 111 include first resistor R1,Second resistance R2,3rd resistor R3, the first triode V1 and the first metal-oxide-semiconductor Q1;One end connection first of first resistor R1The base stage of triode V1, the other end of first resistor R1 connects the PA4 pin of control chip U, and the emitter stage of the first triode V1 connectsGround, the colelctor electrode of the first triode V1 connects one end of 3rd resistor R3, other end connection second resistance R2 of 3rd resistor R3One end and the first metal-oxide-semiconductor Q1 grid, the first metal-oxide-semiconductor Q1 source electrode connection second resistance R2 the other end connection card interface140(Equivalent to connection main frame, by host supplying power), the power end of the drain electrode connection card apparatus of the first metal-oxide-semiconductor Q1.
Wherein, the first triode V1 be NPN triode, the first metal-oxide-semiconductor Q1 be PMOS, first switch signal SD_POW_CTRL controls the first triode V1 conductings when being high level, the first metal-oxide-semiconductor Q1 grid voltages are dragged down, the first metal-oxide-semiconductor Q1 conductings,Then main frame 20 is converted to card voltage SD_VDD to card apparatus by the card power supply SD_POWER that card interface 140 is input into(That is SD card)ForElectricity.SD card can just carry out follow-up detection and data transfer.
Fig. 4 is seen also, the card data switch unit 112 includes the first switch chip of model MAX4947IC1, the 4th resistance R4 and the first electric capacity C1.The COM1 pin of the first switch chip IC 1, COM2 pin, COM3 pin, COM4 pin,COM5 pin and COM6 pin are all connected with card interface 140;The NC1 pin of first switch chip IC 1, NC2 pin, NC3 pin, NC4 pin, NC5 pinCard apparatus are all connected with NC6 pin;The VCC pin connection feeder ear MAX4947_3V3 of first switch chip IC 1, also by first electricHold C1 ground connection;One end of the CB12 pin connection CB34 pin, CB56 pin and the 4th resistance R4 of first switch chip IC 1, the 4th resistanceThe other end of R4 connects the PA6 pin of control chip U;The GND pin ground connection of first switch chip IC 1.
Wherein, MAX4947 is six passage SPDT data switches.The NC1 pin of first switch chip IC 1, NC2 pin, NC5 pin,NC6 pin difference input card data SD_DATA2, SD_DATA3, SD_DATA0, SD_DATA1;NC3 pin, NC4 pin difference input cardInstruction SD_CMD, card clock SD_CLK.When second switch signal SD_DATA_CTRL is high level, first switch chip IC 1Conducting, NC1 pin are connected with COM1 pin, and NC2 pin are connected with COM2 pin, and NC3 pin are connected with COM3 pin, and NC4 pin are connected with COM4 pin,NC5 pin are connected with COM5 pin, and NC6 pin are connected with COM6 pin, output card data(SD_DATA0 correspondence output DATA0, with suchPush away), card instruction(SD_CMD correspondence output CMD)With card clock(SD_CLK correspondence output CLK)To card interface 140, so as to transmitTo main frame.When second switch signal SD_DATA_CTRL is low level, NC pin disconnect with corresponding COM pin, defeated so as to stopGo out.By the switching for controlling first switch chip IC 1, so as to reach the purpose that break-make card apparatus communicate with host data.Fig. 4In, signal has prefix " SD_ " to represent that from card apparatus the expression without prefix is exported to main frame.
Fig. 5 is seen also, the card detector unit 113 includes the second triode V2, the 5th resistance R5 and the 6th resistanceR6;The base stage of the second triode V2 connects one end of the 5th resistance R5, the other end connection control chip U of the 5th resistance R5PB12 pin, the grounded emitter of the second triode V2;The colelctor electrode connection card interface 140 of the second triode V2, also by theSix resistance R6 connect the power end of card apparatus.
Wherein, the second triode V2 is NPN triode.SD is simulated by drawing high card detection signal SD_CD or dragging downThe plug state of card, specially:When trigger SD_CD_CTRL is high level, the second triode V2 conductings export low levelCard detection signal SD_CD to card interface 140, main frame identification card apparatus are inserted.When trigger SD_CD_CTRL is low electricityAt ordinary times, the second triode V2 cut-offs, card detection signal SD_CD is pulled up by the 6th resistance R6, the card inspection of Host Detection to high levelSignal SD_CD is surveyed, is extracted equivalent to identification card apparatus.
The USB break-makes control module 120 includes USB power source switch element 121 and usb data switch element 122.It is describedUSB power source switch element 121 according to the 3rd switching signal control between USB device and usb 1 50 transmission of USB power source andBlock.Usb data switch element 122 controls the biography of usb data between USB device and usb 1 50 according to the 4th switching signalIt is defeated and block.The USB power source switch element link control module, USB device and USB interface;Usb data switch element connectsControl module, USB device and USB interface.USB control signals include the 3rd switching signal and the 4th switching signal.
See also Fig. 6, the USB power source switch element 121 includes the 7th resistance R7, the 8th resistance R8, the 9th electricResistance R9, the 3rd triode V3 and the second metal-oxide-semiconductor Q2;One end of the 7th resistance R7 connects the base stage of the 3rd triode V3, theThe PA5 pin of the other end connection control chip U of seven resistance R7, the grounded emitter of the 3rd triode V3, the 3rd triode V3'sColelctor electrode connects one end of the 9th resistance R9, and the other end of the 9th resistance R9 connects one end and second metal-oxide-semiconductor of the 8th resistance R8The grid of Q2, the source electrode of the second metal-oxide-semiconductor Q2 connects the other end connection usb 1 50 of the 8th resistance R8(Equivalent to connection masterMachine, by host supplying power), the power end of the drain electrode connection USB device of the second metal-oxide-semiconductor Q2(Such as VUSB pin).
Wherein, the 3rd triode V3 be NPN triode, the second metal-oxide-semiconductor Q2 be PMOS, the 3rd switching signal USB_POW_The 3rd triode V3 of control conductings, the second metal-oxide-semiconductor Q2 grid voltages are dragged down when CTRL is high level, the second metal-oxide-semiconductor Q2 conductings,Then main frame 20 is converted to USB voltages USB_VDD and supplies to USB device by USB power source USB_POWER that usb 1 50 is input intoElectricity.
Fig. 7 is seen also, the usb data switch element 122 includes the second switch chip of model MAX4947IC2, the tenth resistance R10 and the second electric capacity C2.The COM1 pin of the second switch chip IC 2, COM2 pin, COM3 pin, COM4 pin,COM5 pin and COM6 pin are all connected with usb 1 50;The NC1 pin of second switch chip IC 2, NC2 pin, NC3 pin, NC4 pin, NC5 pinUSB device is all connected with NC6 pin;The VCC pin connection feeder ear MAX4947_3V3 of second switch chip IC 2, also by second electricHold C2 ground connection;One end of the CB12 pin connection CB34 pin, CB56 pin and the tenth resistance R10 of second switch chip IC 2, the tenth resistanceThe other end of R10 connects the PB10 pin of control chip U;The GND pin ground connection of second switch chip IC 2.
Wherein, the NC1 pin of second switch chip IC 2, NC2 pin, NC3 pin, NC4 pin, NC5 pin, NC6 pin are input into respectively USBData(USB1_DP、USB1_DN、 USB2_DP、USB3_DN、USB3_DP、USB3_DN);When the 4th switching signal USB_When DATA_CTRL is high level, second switch chip IC 2 is turned on, and NC1 pin are connected with COM1 pin, and NC2 pin are connected with COM2 pin,NC3 pin are connected with COM3 pin, and NC4 pin are connected with COM4 pin, and NC5 pin are connected with COM5 pin, and NC6 pin are connected with COM6 pin, outputUsb data(USB1_DP correspondence output USB1_DP_1, by that analogy), signal have suffix " _ 1 " represent output to USB interface150, so as to be transferred to main frame.When the 4th switching signal USB_DATA_CTRL is low level, NC pin are disconnected with corresponding COM pinOpen, so as to stop output.By the switching for controlling second switch chip IC 2, lead to host data so as to reach break-make USB deviceThe purpose of letter.
In sum, the utility model controls the break-make shape between storage device and main frame by off test deviceState, so as to simulate plug state of the storage device on main frame, without the need for artificial repeatedly plug, you can realize the logical of storage deviceDisconnected test, greatlys save manpower.Solve the problems, such as that existing storage device is loaded down with trivial details by plug test operation is manually carried out.AndWithout the need for veritably plugging, it is to avoid multiple plug makes the shell fragment of interface loosen, affects the contact effect to cause to test inaccurate askingTopic.
It is understood that for those of ordinary skills, can according to the technical solution of the utility model andIts utility model design in addition equivalent or change, and all these changes or replace all should belong to appended by the utility modelScope of the claims.