Patent ID: 9032107
Filing Date: 2015-05-12
Classification: G06F,Y04S

Abstract:
1. A universal serial bus line USB Key, wherein said USB key comprises an interface module, a power module and a micro control unit (MCU) module, wherein the interface module is configured to connect with a terminal; the power module is configured to supply power to the MCU module in case that the interface module is connected with the terminal; the MCU module is configured to perform initialization setting after power on, and detect power level status of a mode pin inside the MCU module, in case that the power level status conforms to a first predetermined condition, set a pin for serial interface communication in the MCU module to a high impedance state, configure a USB function, receive a request for enumerating a device being sent from the terminal connecting to the interface module, and perform USB communication with the terminal after enumeration; in case that the power level status conforms to a second predetermined condition, set a pin for USB communication in the MCU module to a high impedance state, configure a serial interface function, send a request for enumerating a device to the terminal connecting to the interface module, and perform a serial interface communication with the terminal after enumeration, in which the mode pin is configured to indicate a communication mode between the USB Key and the terminal by the power level status of the mode pin itself; the mode pin comprises a first mode pin and a second mode pin; the first predetermined condition refers to that the first mode pin is in a predetermined power level and the second mode pin is not in the predetermined power level; and the second predetermined condition refers to that the first mode pin is not in the predetermined power level and the second mode pin is in the predetermined power level; the interface module comprises a first interface module for connecting to the terminal via a USB interface, and a second interface module for connecting to the terminal via a serial interface, in which the first interface module comprises a first pin, and the second interface module comprises a second pin; if the first interface module connects to the USB interface of the terminal, the first pin is in high power level, while if the second interface module connects to the serial interface of the terminal, the second pin is in high power level; and if the first mode pin connects to the first pin and the second mode pin connects to the second pin, the predetermined level is high power level; while if the first mode pin connects to the second pin and second mode pin connects to the first pin, the predetermined level is low power level; the terminal connecting to the first interface module is a USB terminal, and the terminal connecting to the second interface module is a serial-interface terminal; and the MCU module is also configured to configured to ascertain communication privileges of the USB terminal and the serial-interface terminal in case that the first mode pin and the second mode pin both are in high power level, and if the USB terminal has a higher communication privilege than the serial interface terminal, set a pin for serial-interface communication in the MCU module to high impedance state, configure the USB function, and receive a request for enumerating a device being initiated by the USB terminal, and perform USB communication with the USB terminal after enumeration; while if the USB terminal has a lower communication privilege than the serial-interface terminal, set a pin for USB communication in the MCU module to high impedance state, configure the serial-interface function, send a request for enumerating a device to the serial interface terminal, and perform the serial-interface communication with the serial interface terminal after enumeration.