USB forced formatting drive-free socket and control method thereof

文档序号:135424 发布日期:2021-10-22 浏览:35次 中文

阅读说明:本技术 Usb强制格式化免驱动插口及其控制方法 (USB forced formatting drive-free socket and control method thereof ) 是由 马小明 盛晓燕 王渊 陈朝宇 刘畅 于 2021-07-12 设计创作,主要内容包括:本发明提供了一种USB强制格式化免驱动插口及其控制方法。该插口具有小至40mm*27mm*14.5mm体积外形;免驱动USB即插即用式连接方式;控制芯片包含USB格式化程序,可格式化USB3.0和USB2.0接口flash存储器;控制芯片包含USB HUB程序;红绿指示灯指示运行状态。所述微控制器为32位通用增强型RISC-V系列MCU,配有高速USB通信接口,配有128位数据宽度的DMA,支持USB3.0主/从模式,支持控制、批量、中断、实时或同步传输。本发明先对通过USB3.0/2.0协议接入的FLASH存储设备进行格式化,然后存储设备再与公共平台进行数据交互。从而排除了安全隐患,确保了公共数据平台的安全性。本发明基于单片机实现,其结构简洁,逻辑合理,具有突出的技术优势。(The invention provides a USB mandatory formatted drive-free socket and a control method thereof. The socket has a volumetric profile as small as 40mm by 27mm by 14.5 mm; a drive-free USB plug-and-play connection mode; the control chip comprises a USB formatting program which can format USB3.0 and USB2.0 interface flash memories; the control chip comprises a USB HUB program; the red and green indicating lamp indicates the running state. The microcontroller is a 32-bit general enhanced RISC-V series MCU, is provided with a high-speed USB communication interface, is provided with a DMA with 128-bit data width, supports a USB3.0 master/slave mode, and supports control, batch, interruption, real-time or synchronous transmission. The invention firstly formats the FLASH storage device accessed by the USB3.0/2.0 protocol, and then the storage device carries out data interaction with the public platform. Therefore, potential safety hazards are eliminated, and the safety of the public data platform is ensured. The invention is realized based on a single chip microcomputer, has simple structure and reasonable logic and has outstanding technical advantages.)

A USB positive-format drive-free jack, characterized by a volume profile as small as 40mm by 27mm by 14.5 mm; a drive-free USB plug-and-play connection mode; the control chip comprises a USB formatting program which can format USB3.0 and USB2.0 interface flash memories; the control chip comprises a USB HUB program; the red and green indicating lamp indicates the running state.

2. The USB forced formatting drive-free socket according to claim 1, wherein the microcontroller is a 32-bit general-purpose enhanced RISC-V series MCU, equipped with a high speed USB communication interface, equipped with a 128-bit data wide DMA, supporting USB3.0 master/slave mode, supporting control, bulk, interrupt, real-time or isochronous transfer.

3. The USB mandatory formatting drive-free jack of claim 2, wherein the microcontroller controls an external indicator light, the GPIO port of the microcontroller being connected to the indicator light.

4. A control method of a USB mandatory formatting drive-free socket is characterized by comprising the following steps:

1) the microcontroller circularly scans whether the USB female head is connected with the FLASH equipment or not, and before the FLASH equipment is not detected, the data transmission between the USB male head and the public data platform is always in a disconnected state;

2) when the USB female head is scanned to be accessed into FLASH equipment, a formatting program is started, and a GPIO port of the microcontroller outputs green light to flicker;

3) after formatting is finished, starting the USB HUB, connecting the FLASH device with a public data platform through the HUB, using a USB3.0 or USB2.0 communication protocol, and simultaneously outputting a green light to be bright through a GPIO port on the microcontroller;

4) if the formatting fails for 3 times, the microcontroller does not start the USB HUB, communicates with the public platform through the USB2.0 protocol, sends the key code error, and outputs a red light to be on.

Technical Field

The invention relates to the technical field of information security, in particular to a USB mandatory formatted drive-free socket and a control method thereof.

Background

The laboratory uses a public data platform (a computer, a server and the like) to perform data transmission with an external storage device (FLASH, a mechanical hard disk and the like) through a USB3.0/2.0 protocol. And the external storage device may carry viruses, and the public platform can be attacked, so that the system security of the public platform is always difficult.

Disclosure of Invention

The invention aims to provide a USB mandatory formatting drive-free socket and a control method thereof aiming at the technical defects of the prior art so as to solve the technical problem that the conventional USB socket is lack of safety guarantee.

In order to achieve the technical purpose, the invention adopts the following technical scheme:

USB mandatory formatting drive-free sockets, as small as 40mm 27mm 14.5mm volume profile; a drive-free USB plug-and-play connection mode; the control chip comprises a USB formatting program which can format USB3.0 and USB2.0 interface flash memories; the control chip comprises a USB HUB program; the red and green indicating lamp indicates the running state.

Preferably, the microcontroller is a 32-bit general enhanced RISC-V series MCU, is provided with a high-speed USB communication interface, is provided with a DMA with 128-bit data width, supports a USB3.0 master/slave mode, and supports control, batch, interrupt, real-time or synchronous transmission.

Preferably, the microcontroller controls an external indicator light, and a GPIO port of the microcontroller is connected to the indicator light

A control method of a USB mandatory formatting drive-free socket comprises the following steps:

1) the microcontroller circularly scans whether the USB female head is connected with the FLASH equipment or not, and before the FLASH equipment is not detected, the data transmission between the USB male head and the public data platform is always in a disconnected state;

2) when the USB female head is scanned to be accessed into FLASH equipment, a formatting program is started, and a GPIO port of the microcontroller outputs green light to flicker;

3) after formatting is finished, starting the USB HUB, connecting the FLASH device with a public data platform through the HUB, using a USB3.0 or USB2.0 communication protocol, and simultaneously outputting a green light to be bright through a GPIO port on the microcontroller;

4) if the formatting fails for 3 times, the microcontroller does not start the USB HUB, communicates with the public platform through the USB2.0 protocol, sends the key code error, and outputs a red light to be on.

The invention provides a USB mandatory formatted drive-free socket and a control method thereof. According to the technical scheme, firstly, FLASH storage equipment accessed through a USB3.0/2.0 protocol is formatted, and then the storage equipment carries out data interaction with a public platform. Therefore, potential safety hazards are eliminated, and the safety of the public data platform is ensured. The invention is realized based on a single chip microcomputer, has simple structure and reasonable logic and has outstanding technical advantages.

Drawings

Fig. 1 is a connection relationship diagram of the present invention in use.

Fig. 2 is a configuration diagram of the present invention.

Fig. 3 is a control logic diagram of the present invention.

FIG. 4 is a pictorial representation of the present invention.

Detailed Description

Hereinafter, specific embodiments of the present invention will be described in detail. Well-known structures or functions may not be described in detail in the following embodiments in order to avoid unnecessarily obscuring the details. Approximating language, as used herein in the following examples, may be applied to identify quantitative representations that could permissibly vary in number without resulting in a change in the basic function. Unless defined otherwise, technical and scientific terms used in the following examples have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

The USB mandatory formatting drive-free socket and the control method thereof are as follows:

the technical scheme mainly comprises three parts:

the USB socket device is connected with a public data platform through a USB male connector and uses a USB3.0/2.0 communication protocol. The USB female head is connected with the FLASH storage equipment, and the USB3.0/2.0 protocol is used for communication. As shown in fig. 1.

1. Hardware design

USB socket devices use an MCU microcontroller, RISC-V3A core, supporting the IMAC subset of RISC-V instructions. DMA with 128-bit data width is adopted on the chip to support the high bandwidth requirement of a plurality of high-speed peripherals, and high-speed transmission of large data volume is realized.

And the USB3.0Host/Device mode and the OTG function are supported. Support control, bulk, interrupt, real time/isochronous transfer. The host supports USB3.0HUB. The internal circuit connections of the USB socket device are shown in fig. 2.

2. Software design

The USB interface equipment uses the USB3.0, USB2.0, USB HUB and file system module of the MCU. The specific software flow is as follows:

1) the singlechip scans the USB female head circularly to judge whether the FLASH equipment is accessed. Before no FLASH equipment is detected, the data transmission between the USB male head and the public data platform is always in a disconnected state.

2) When the FLASH device is scanned and accessed, a formatting program is started. The GPIO port of the singlechip outputs green light flicker to indicate formatting.

3) And after the formatting is finished, starting the USB HUB, connecting the FLASH device with a public data platform through the HUB, and using a USB3.0 communication protocol (the protocol is downward compatible with a USB2.0 protocol). Meanwhile, a GPIO port on the single chip microcomputer outputs a green light to be on, and the formatting is finished.

4) If the formatting fails for 3 times, the single chip microcomputer does not start the USB HUB, communicates with the public platform through a USB2.0 protocol, and sends a key code error. Meanwhile, the singlechip outputs a red light to be on, which indicates that formatting fails. The control logic is shown in fig. 3.

3. Structural appearance

The USB socket device uses a male mold USB communication device shell, the length is 40mm, the width is 27mm, and the height is 14.5 mm. The material used was ABS, the appearance of which is shown in FIG. 4.

The embodiments of the present invention have been described in detail, but the description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention. Any modification, equivalent replacement, and improvement made within the scope of the application of the present invention should be included in the protection scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:监控LED控制卡并重启的方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!