WO2021115202A1 - 电子设备、用户身份识别卡与存储卡的识别方法 - Google Patents

电子设备、用户身份识别卡与存储卡的识别方法 Download PDF

Info

Publication number
WO2021115202A1
WO2021115202A1 PCT/CN2020/133809 CN2020133809W WO2021115202A1 WO 2021115202 A1 WO2021115202 A1 WO 2021115202A1 CN 2020133809 W CN2020133809 W CN 2020133809W WO 2021115202 A1 WO2021115202 A1 WO 2021115202A1
Authority
WO
WIPO (PCT)
Prior art keywords
card
user identification
memory card
interface
memory
Prior art date
Application number
PCT/CN2020/133809
Other languages
English (en)
French (fr)
Inventor
段鹏君
赵礼列
李因鹏
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2021115202A1 publication Critical patent/WO2021115202A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0013Methods or arrangements for sensing record carriers, e.g. for reading patterns by galvanic contacts, e.g. card connectors for ISO-7816 compliant smart cards or memory cards, e.g. SD card readers
    • G06K7/0034Methods or arrangements for sensing record carriers, e.g. for reading patterns by galvanic contacts, e.g. card connectors for ISO-7816 compliant smart cards or memory cards, e.g. SD card readers the connector being capable of simultaneously receiving a plurality of cards in the same insertion slot
    • G06K7/0043Methods or arrangements for sensing record carriers, e.g. for reading patterns by galvanic contacts, e.g. card connectors for ISO-7816 compliant smart cards or memory cards, e.g. SD card readers the connector being capable of simultaneously receiving a plurality of cards in the same insertion slot the plurality of cards being cards of different formats, e.g. SD card and memory stick
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/317Testing of digital circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/077Constructional details, e.g. mounting of circuits in the carrier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/3816Mechanical arrangements for accommodating identification devices, e.g. cards or chips; with connectors for programming identification devices

Definitions

  • This application relates to the field of communication technology, and in particular to a method for identifying electronic devices, user identification cards, and memory cards.
  • NM Nano Memory
  • some products supporting NM memory card functions mainly rely on the memory card interface multiplexing function of the controller (CPU) to reuse part or all of the memory card interface as a SIM card interface module.
  • the controller When it is recognized that the memory card is inserted, the controller will set the corresponding interface function as the memory interface function.
  • the controller When it is recognized that the SIM card is inserted, the controller will set the SIM card interface function of the corresponding interface.
  • this technical solution requires that the memory card interface of the controller has a function that can be reused as a SIM card interface. When the controller does not have this multiplexing function, the product using this controller will not be able to realize the function of the NM memory card.
  • This application provides a method for identifying a user identification card and a memory card, and an electronic device to solve the prior art design for a common slot for the memory card and the SIM card, and the memory card interface of the controller of the electronic device Without the function of multiplexing as a SIM card, how to ensure that the memory card and the SIM card can be accurately identified and ensure that the memory card or the SIM card functions normally when the memory card and the SIM card are inserted.
  • the present application provides an electronic device, the electronic device includes: a controller and a card holder; the card holder is provided with a common card slot, and the common card slot is suitable for accommodating a supporting memory card and a user identity
  • the identification card or the memory card with the same size and size as the user identification card is shared;
  • the control chip controller has a memory card interface and a user identification card interface; wherein, the clock signal in the memory card interface
  • the pin is directly electrically connected to the clock signal pin in the user identification card interface;
  • the first data transmission pin in the memory card interface is directly connected to the reset signal pin in the user identification card interface Electrical connection;
  • the second data transmission pin in the memory card interface is directly and electrically connected to the data transmission pin in the user identification card interface;
  • the controller is used for the user placed in the common card slot
  • the user identification card interface is set to a high-impedance state, or the memory card interface is set to a high-impedance state according to the memory card placed in the common card slot.
  • the clock signal pin, the first data transmission pin, and the second data transmission pin in the memory card interface on the controller are directly connected to the corresponding pins in the user identification card interface.
  • the analog switch between the SIM card interface module and the memory card interface module in the prior art can be omitted, thereby reducing hardware costs.
  • the card socket is further provided with a connection point area matching the contact area of the user identification card or the memory card; wherein the connection point area includes: a clock signal connection point, a reset signal Connection point and data transmission connection point; wherein the clock signal pin in the memory card interface and the clock signal pin in the user identification card interface are connected to the clock signal connection point on the card socket; The first data transmission pin in the memory card interface and the reset signal pin in the user identification card interface are connected to the reset signal connection point on the card socket; the second data transmission pin in the memory card interface The pin and the data transmission pin in the user identification card interface are connected to the data transmission connection point on the card socket.
  • this application provides a method for identifying a user identification card and a memory card.
  • the method includes: when the electronic device detects that the first card is placed on the card holder, setting the user identification card interface Is a high-impedance state; controls the first card to perform a memory card initialization process; if the memory card initialization process of the first card fails, set the memory card interface to a high-impedance state, and control the first card
  • the card performs the initialization process of the user identification card; if the initialization process of the user identification card of the first card is successful, it is determined that the first card is a user identification card.
  • the method further includes: if the memory card initialization process of the first card is successful, determining that the first card is a memory card.
  • the method further includes: if the initialization procedure of the user identification card of the first card fails, determining that the first card is damaged.
  • the card socket of the electronic device is provided with a common card slot
  • the common card slot can hold both a memory card and a user identification card. Therefore, when the electronic device is turned on or detects the shared card socket
  • a card ie the first card
  • the user identification card interface on the controller is set to high impedance by default, and then the first card is controlled to initialize the memory card.
  • the initialization If the initialization is successful, then Determine that the first card is a memory card; otherwise, if the initialization fails, set the memory card interface on the controller to a high-impedance state, and control the first card to perform the initialization process of the user identification card; if the user identity of the first card If the initialization process of the identification card is successful, it is determined that the first card is a user identification card; conversely, if the initialization process of the user identification card of the first card fails, it is determined that the first card is damaged.
  • the present application provides a method for identifying a user identification card and a memory card.
  • the method includes: when the electronic device detects that a first card is placed on the common card slot of the card holder, inserting the memory card
  • the interface is set to a high impedance state; the first card is controlled to perform the initialization process of the user identification card; if the initialization process of the user identification card of the first card fails, the user identification card interface is set to high impedance And control the first card to perform the initialization process of the memory card; if the memory card initialization process of the first card is successful, it is determined that the first card is a memory card.
  • the method further includes: if the user identification card initialization process of the first card is successful, determining that the first card is a user identification card.
  • the method further includes: if the memory card initialization process of the first card fails, determining that the first card is damaged.
  • the controller when a card (ie, the first card) is placed on the common card slot of the electronic device when the electronic device is turned on or detected, the controller is first set by default.
  • the memory card interface on the computer is set to a high impedance state, and then the first card is controlled to initialize the user identification card.
  • the first card is determined to be the user identification card; otherwise, if the initialization fails, the controller
  • the user identification card interface on the computer is set to a high-impedance state, and the first card is controlled to perform the initialization process of the memory card; if the memory card initialization process of the first card is successful, the first card is determined to be the memory card; otherwise, if the first card is The memory card initialization process of the card fails, and it is determined that the first card is damaged.
  • the present application provides a computer-readable storage medium in which a computer program is stored, and when it runs on a computer, the computer executes the method described in the second or third aspect .
  • the present application provides a computer program, when the computer program is executed by a computer, it is used to execute the method described in the second or third aspect.
  • the program in the fifth aspect may be stored in whole or in part on a storage medium that is packaged with the processor, and may also be stored in part or in a memory that is not packaged with the processor.
  • the hardware is saved. There is an analog switch between the SIM card interface module and the memory card interface module in the technology, thereby reducing the hardware cost.
  • the first card is a memory card
  • set the user identification card interface to a high impedance state The card is a user identification card, and the memory card interface is set to a high-impedance state.
  • FIG. 1 is a schematic diagram of a card body structure of a user identification card suitable for being placed on a common card slot of a card holder in an electronic device according to an embodiment of the application;
  • FIG. 2 is a schematic diagram of a card body structure of a memory card suitable for being placed on a common card slot of a card holder in an electronic device according to an embodiment of the application;
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • FIG. 4 is a schematic flowchart of an embodiment of a method for identifying a user identification card and a memory card according to an embodiment of the application;
  • FIG. 5 is a schematic flowchart of another embodiment of a method for identifying a user identification card and a memory card according to an embodiment of the application.
  • the embodiments of the present application are applied to various electronic devices that support a shared card holder between a memory card and a user identification card (SIM card).
  • SIM card user identification card
  • At least one common card slot is provided on the card socket of the electronic device, and the common card slot can be used to hold a user identification card, or a memory card with the same shape and size as the user identification can be placed.
  • the memory card and user identification card placed in the shared card slot need to meet the following two requirements:
  • the memory card and the user identification card have the same shape and size.
  • the interface line sequence on the card body of the memory card is the same as the interface line sequence on the card body of the user identification card.
  • the user identification card may be a Nano-SIM card, so the shape and size of the memory card are exactly the same as those of the Nano-SIM card.
  • the aforementioned memory card may be a Nano memory card launched by Huawei, and its shape and size are the same as the Nano-SIM card.
  • the card body structure of the memory card and the user identification card that can be placed in the shared card slot of the card holder in the electronic device provided in the embodiments of the present application will be described in detail with reference to specific embodiments.
  • FIG. 1 is a schematic diagram of a card body structure of a user identification card suitable for placing on a common card slot of a card holder in an electronic device according to an embodiment of the application.
  • the user identification card is a Nano-SIM card.
  • the Nano-SIM card is a rectangle, four corners of the rectangle are rounded corners, and one corner of the four corners of the rectangle is chamfered, and a positioning notch is set on this corner (that is, the position shown by the number 17 in FIG. 1).
  • Figure 1 shows a side surface of the Nano-SIM card.
  • various contact areas of the user identification card are provided.
  • the contact areas include: DATA contact area 11 (ie, data transmission contact Area), VPP contact area 12 (i.e. programming voltage/input signal contact area), GND contact area 13 (first ground signal contact area), Vcc contact area 14 (i.e. first power contact area), The RST contact area 15 (the first reset signal contact area) and the CLK contact area 16 (that is, the first clock signal contact area).
  • FIG. 2 is a schematic diagram of a card body structure of a memory card suitable for being placed on a card holder in an electronic device provided by an embodiment of the application.
  • the memory card and the user identification card have the same shape and size. Therefore, the memory card shown in Figure 2 is also rectangular, and the four corners of the rectangle are rounded, and one of the four corners of the rectangle is chamfered, and then a positioning notch is set on this corner (that is, the label in Figure 2 29).
  • the size of the memory card provided in the embodiment of the present application is the same as the size of the Nano-SIM card. Specifically, the length of the memory card is the same as the length of the Nano-SIM card, and the width of the memory card is the same as the width of the Nano-SIM card. , The size of the positioning notch on the memory card is the same as the size of the positioning notch on the Nano-SIM card.
  • the side surface is provided with various contact areas of the memory card.
  • the contact areas include: DATA1 contact area 21 (that is, the second data transmission Contact area), CMD contact area 22 (i.e. control signal contact area), GND contact area 23 (i.e. second ground signal contact area), Vcc contact area 24 (i.e. second power contact area),
  • the DATA0 contact area 25 (the first data transmission signal contact area) and the CLK contact area 26 (that is, the second clock signal contact area).
  • the contact area further includes: a DATA3 contact area 27 and a DATA2 contact area 28, wherein the DATA3 contact area 27 is adjacent to and isolated from the GND contact area 23, and the DATA2 contact area 28 is
  • the Vcc contact areas 24 are arranged adjacently and in isolation.
  • the contact areas on the side of the card body of the memory card shown in FIG. 2 are only schematic diagrams. In practical applications, except for the GND contact area 23 (ie, the second ground signal contact area) and the Vcc contact area.
  • the position of the dot area 24 that is, the second power contact area
  • remains unchanged that is, the position shown in FIG. 2
  • the position of the remaining contact areas can be adjusted accordingly, and is not limited to the position shown in FIG.
  • the interface line sequence on the card body of the memory card is the same as the interface line sequence on the card body of the user identification card. Refer to the card body structure of the Nano-SIM card shown in FIG. 1 and the card body structure of the memory card shown in FIG. 2 in combination.
  • the position of the first clock signal contact area 16 on the card body of the user identification card 1 and the position of the second clock signal contact area 26 on the card body of the memory card 2 The location corresponds.
  • the position of the first power signal contact area 14 on the card body of the user identification card 1 corresponds to the position of the second power signal contact area 24 on the card body of the memory card 2.
  • the position of the first reset signal contact area 15 on the card body of the user identification card 1 corresponds to the position of the first data transmission signal contact area 25 on the card body of the memory card 2 .
  • the position of the programming voltage/input signal contact area 12 on the card body of the user identification card 1 corresponds to the position of the control signal contact area 22 on the card body of the memory card 2.
  • the position of the first ground signal contact area 13 on the card body of the user identification card 1 corresponds to the position of the second ground signal contact area 23 on the card body of the memory card 2.
  • the position of the data transmission contact area 11 on the card body of the user identification card 1 corresponds to the position of the second data transmission contact area 21 on the card body of the memory card 2.
  • the positions of the DATA3 contact area 27 and the second ground signal contact area 23 on the card body of the memory card 2 are the same as those of the first ground signal contact area 13
  • the position on the card body of the user identification card 1 corresponds to that.
  • the positions of the DATA2 touch area 28 and the second power signal contact area 24 on the card body of the memory card 2 and the first power signal contact area 14 on the user identification card 1 Corresponding to the position on the card body.
  • A corresponds to B, which means that A and B correspond to the same connection point (or shrapnel) of the card socket.
  • the position of the first clock signal contact area of the user identification card on the card body of the user identification card corresponds to the position of the second clock signal contact area of the memory card on the card body of the memory card.
  • “corresponding” can also be referred to as the mapping between the first clock signal contact area of the user identification card and the second clock signal contact area of the memory card, that is, the first clock signal contact area of the user identification card is mapped to the second clock signal contact area of the memory card.
  • the second clock signal contact area of the memory card corresponds to/maps the same connection point/shrapnel of the card socket.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the electronic device 3 includes: a controller 31 and a card socket 32.
  • the memory card interface of the controller 31 does not have the function of multiplexing as a SIM card interface, so the controller 31 is provided with a memory card interface 311 and a user identification card interface 312 respectively.
  • the memory by electrically connecting the clock signal pin SD_CLK in the memory card interface 311 with the clock signal pin SIM_CLK in the user identification card interface 312, the memory
  • the first data transmission pin SD_DATA0 in the card interface 311 is electrically connected to the reset signal pin SIM_RST in the user identification card interface 312
  • the second data transmission pin SD_DATA1 in the memory card interface 311 is electrically connected to the reset signal pin SIM_RST in the user identification card interface 312.
  • the data transmission pin SIM_DATA in the user identification card interface 312 is electrically connected.
  • the card socket 32 includes a common card slot 321 and a connection point area 322.
  • the connection point area 322 includes: SD_CLK/SIM_CLK (clock signal connection point), SIM_RST/SD_DATA0 (SIM reset signal/SD first data transmission connection point), SIM_DATA/SD_DATA1 (SIM data transmission/SD second data transmission) Connection point), SD_CMD (control signal connection point), SD_DATA2 connection point and SD_DATA3 connection point.
  • connection point area 322 of the card holder 32 can support the sharing of the memory card and the user identification card.
  • the clock signal pin SD_CLK in the memory card interface 311 and the clock signal pin SIM_CLK in the user identification card interface 312 are connected to the SD_CLK/SIM_CLK (clock signal connection) in the connection point area 322 of the card holder 32 point).
  • the first data transmission pin SD_DATA0 in the memory card interface 311 and the reset signal pin SIM_RST in the user identification card interface 312 are connected to the SIM_RST/SD_DATA0 (SIM_RST) in the connection point area 322 of the card holder 32. Reset signal/SD first data transmission connection point).
  • the second data transmission pin SD_DATA1 in the memory card interface 311 and the data transmission pin SIM_DATA in the user identification card interface 312 are connected to the SIM_DATA/SD_DATA1 (SIM_DATA/SD_DATA1) in the connection point area 322 of the card socket 32. Data transmission/SD second data transmission connection point).
  • SD_DATA0 to SD_DATA3 are data pins for parallel transmission, so the specific positions of the four pins SD_DATA0 to SD_DATA3 are not limited to the position arrangement shown in FIG. 3 , The positions of these four pins can be exchanged arbitrarily in practical applications.
  • the user identification card interface 312 is set to a high-impedance state; if the first card is a user identification card, the memory card interface 311 is set to a high-impedance state.
  • the high-impedance state is an output state of a circuit.
  • the memory card interface 311 or the user identification card interface 312 in the controller 31 is in the high-impedance state, the memory card Each pin of the interface 311 or the user identification card interface 312 is in a disconnected state, so that there is no control over the circuit connected to it.
  • the controller 31 when the controller 31 recognizes that the first card placed on the card socket 32 is a memory card, it sets the user identification card interface 312 to a high impedance state, so Each pin of the user identification card interface 312 is equivalent to being in a floating state, and each pin of the memory card interface 311 is still in a connected state with the corresponding pin on the card socket 32, so that the control The device 31 controls the memory card placed on the card holder 32.
  • the controller 31 when the controller 31 recognizes that the first card placed on the card socket 32 is a user identification card, it sets the memory card interface 311 to a high-impedance state, so that each pin of the memory card interface 311 It is equivalent to being in a suspended state, and each pin of the user identification card interface 312 is still in a connected state with the corresponding pin on the card socket 32, so that the controller 32 is placed on the card socket 32. On the user identification card to control.
  • the interface pins from the bifurcation point to the controller 31 should be as short as possible to ensure that the card The signal transmission quality between the base 32 and the controller 31.
  • the clock signal pin SD_CLK in the memory card interface 311 is electrically connected to the clock signal pin SIM_CLK in the user identification card interface 312, and the clock signal pin in the memory card interface 311
  • the SD_CLK and the clock signal pin SIM_CLK in the user identification card interface 312 are connected to the SD_CLK/SIM_CLK (clock signal connection point) on the card socket 32.
  • the controller detects whether the first card placed on the card socket is a memory card or a user identification card will be described in detail below.
  • FIG. 4 is a schematic flowchart of an embodiment of a method for identifying a user identification card and a memory card according to an embodiment of the application. Referring to Figure 4, the method includes the following steps:
  • Step 401 When the electronic device detects that the first card is placed on the common card slot of the card socket, set the user identification card interface to a high impedance state;
  • Step 402 Control the first card to perform the initialization process of the memory card
  • Step 403 If the memory card initialization process of the first card fails, set the memory card interface to a high-impedance state, and control the first card to perform the initialization process of the user identification card;
  • Step 404 If the user identification card initialization process of the first card is successful, determine that the first card is a user identification card.
  • the user identification card interface on the controller is set to In a high impedance state, each pin of the user identification card interface is equivalent to a floating state, and each pin of the memory card interface is still in a connected state with a corresponding pin on the card socket.
  • the controller controls the first card to perform the initialization process of the memory card.
  • the controller sends an instruction to the first card, and the first card completes the response, and the initialization process of the memory card is completed through the interaction between the two.
  • the specific process of the initialization process of the memory card is in the prior art, and will not be repeated here.
  • the memory card initialization process of the first card it is determined that the first card is a memory card. If the memory card initialization process of the first card fails, it is determined that the first card is not a memory card, so the memory card interface is set to a high-impedance state, and the first card is controlled to perform the user identification card Initialization process. Wherein, in the initialization process of the user identification card, the controller sends an instruction to the first card, and the first card completes the response, and the initialization process of the user identification card is completed through the interaction between the two.
  • the specific process of the initialization process of the user identification card is in the prior art, and will not be repeated here.
  • the user identification card initialization process of the first card is successful, it is determined that the first card is a user identification card. Conversely, if the initialization process of the user identification card of the first card fails, it is determined that the first card is damaged.
  • FIG. 5 is a schematic flowchart of another embodiment of a method for identifying a user identification card and a memory card according to an embodiment of the application. Referring to Figure 5, the method includes the following steps:
  • Step 501 When the electronic device detects that a first card is placed on the common card slot of the card socket, set the memory card interface to a high impedance state;
  • Step 502 Control the first card to perform the initialization process of the user identification card
  • Step 503 If the user identification card initialization process of the first card fails, set the user identification card interface to a high-impedance state, and control the first card to perform the memory card initialization process;
  • Step 504 If the memory card initialization process of the first card is successful, determine that the first card is a memory card.
  • the difference from the embodiment shown in FIG. 4 is that in this embodiment, firstly, when the electronic device detects that the first card is placed on the common card slot of the card socket (or when the electronic device is turned on), it defaults to first Set the memory card interface on the controller to a high-impedance state, so that each pin of the memory card interface is equivalent to a floating state, and each pin of the user identification card interface is still connected to the The corresponding pins on the card socket are in a connected state.
  • the first card is controlled to perform the initialization process of the user identification card. If the user identification card initialization process of the first card is successful, it is determined that the first card is a user identification card. If the user identification card initialization process of the first card fails, the user identification card interface is set to a high impedance state, and the first card is controlled to perform the memory card initialization process.
  • the memory card initialization process of the first card is successful, it is determined that the first card is a memory card. Conversely, if the memory card initialization process of the first card fails, it is determined that the first card is damaged.
  • the embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the user identification card shown in FIG. 4 or FIG. 5 provided in the embodiment of the present application can be combined with the user identification card shown in FIG. How to identify the memory card.
  • the foregoing computer-readable storage medium may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above.
  • computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (Read Only Memory) ;Hereinafter referred to as: ROM), Erasable Programmable Read Only Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic memory Pieces, or any suitable combination of the above.
  • the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including, but not limited to, wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
  • the computer program code used to perform the operations of this application can be written in one or more programming languages or a combination thereof.
  • the programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including local area network (Local Area Network; hereinafter referred to as: LAN) or Wide Area Network (hereinafter referred to as: WAN), or Connect to an external computer (for example, use an Internet service provider to connect via the Internet).
  • LAN Local Area Network
  • WAN Wide Area Network
  • an external computer for example, use an Internet service provider to connect via the Internet.
  • the technical solution of the present application electrically connects the clock signal pins in the memory card interface on the controller of the electronic device with the clock signal pins in the user identification card interface, and the first in the memory card interface
  • the data transmission pin is electrically connected with the reset signal pin in the user identification card interface
  • the second data transmission pin in the memory card interface is electrically connected with the data transmission pin in the user identification card interface
  • the first card is a memory card
  • set the user identification card interface to a high impedance state The card is a user identification card, and the memory card interface is set to a high-impedance state.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Telephone Function (AREA)

Abstract

一种电子设备、SIM卡与存储卡的识别方法,分别将电子设备的控制器上的存储卡接口中的时钟信号引脚、第一数据传输引脚以及第二数据传输引脚分别与SIM卡接口中的时钟信号引脚、复位信号引脚以及数据传输引脚电连接,因此在硬件方面节省了现有技术中SIM卡接口模块和存储卡接口模块之间的模拟开关,从而降低硬件成本。控制器用于根据共用卡槽内放置的用户身份识别卡,将用户身份识别卡接口设置为高阻态,或根据共用卡槽内放置的存储卡,将存储卡接口设置为高阻态。本技术方案不要求控制器支持存储卡复用做SIM卡的功能,且硬件电路不需要增加多余的器件,即可实现存储卡与SIM卡共用卡座。

Description

电子设备、用户身份识别卡与存储卡的识别方法
本申请要求于2019年12月09日提交中国专利局、申请号为201911250479.3、申请名称为“电子设备、用户身份识别卡与存储卡的识别方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,特别涉及一种电子设备、用户身份识别卡与存储卡的识别方法。
背景技术
在全面屏手机时代,由于Micro SD卡体积过大,手机内部空间已经被利用到极致,各主流手机厂家的旗舰机型均在逐步取消对外置存储卡的支持,但是外置存储卡所具有的数据方便转移,可加密等特点使用户对外置存储卡仍然有着非常强烈的需求。为了解决Micro SD卡体积大与用户对外置存储卡需求之间的矛盾,市面上推出了一款超微型存储卡:NM(Nano Memory)存储卡,这是一种新的数据存储方式。与Micro SD存储卡相比,NM存储卡的体积减小了45%,它的形状和大小与Nano SIM卡完全相同,可以实现SIM卡与存储卡共用卡槽,从而达到减小手机卡槽占用手机内部空间的目的。
现有技术中,一些支持NM存储卡功能的产品,设计方案主要是依靠控制器(CPU)的存储卡接口复用功能,将存储卡接口的部分或者全部接口复用做SIM卡接口模块。当识别到插入的是存储卡的时候,控制器会将对应的接口功能设置为存储器接口功能,当识别到插入的是SIM卡时,控制器会将对应的接口设置的SIM卡接口功能。但是,该技术方案要求控制器的存储卡接口具有可以复用做SIM卡接口的功能,当控制器不具有此复用功能时,则使用此控制器的产品将无法实现NM存储卡的功能。
针对控制器的存储卡接口不具有复用做SIM卡功能的情况,另外一种方案为在SIM卡接口模块和存储卡接口模块之间增加三个模拟开关,分别控制SIM卡/存储卡接口与卡座弹片的连接与断开。当控制器识别到插入的是存储卡的时候,则模拟开关切换到存储卡接口与卡座弹片相连接状态,当控制器识别到插入的是SIM卡的时候,模拟开关切换到SIM卡接口与卡座弹片相连接状态。但是,此技术方案的缺陷是除了必须的控制器和卡座电路之外,还需要增加三个模拟开关,从而导致硬件电路成本增加。
发明内容
本申请提供了一种用户身份识别卡与存储卡的识别方法、电子设备,用以解决现有技术中,针对存储卡和SIM卡共卡槽的设计,且电子设备的控制器的存储卡接口不具有复用做SIM卡的功能的情况下,如何保证在插入存储卡和SIM卡时都能够准确识别并保证存储卡或者SIM卡功能正常。
第一方面,本申请提供了一种电子设备,该电子设备包括:控制器和卡座;所述卡座上设置有一个共用卡槽,所述共用卡槽适于容纳支持存储卡和用户身份识别卡或 者与所述用户身份识别卡的大小和尺寸都相同的存储卡共用;所述控制芯片控制器上具有存储卡接口和用户身份识别卡接口;其中,所述存储卡接口中的时钟信号引脚与所述用户身份识别卡接口中的时钟信号引脚直连电连接;所述存储卡接口中的第一数据传输引脚与所述用户身份识别卡接口中的复位信号引脚直连电连接;所述存储卡接口中的第二数据传输引脚与所述用户身份识别卡接口中的数据传输引脚直连电连接;所述控制器用于根据所述共用卡槽内放置的用户身份识别卡,将所述用户身份识别卡接口设置为高阻态,或根据所述共用卡槽内放置的存储卡,将所述存储卡接口设置为高阻态。
通过本实施例提供的方案,将控制器上存储卡接口中的时钟信号引脚、第一数据传输引脚以及第二数据传输引脚分别与用户身份识别卡接口中相对应的引脚直接相连,这样可以省去现有技术中SIM卡接口模块和存储卡接口模块之间的模拟开关,从而降低硬件成本。
可选的,所述卡座上还设置有与所述用户身份识别卡或所述存储卡的触点区域相匹配的连接点区域;其中所述连接点区域包括:时钟信号连接点、复位信号连接点以及数据传输连接点;其中,所述存储卡接口中的时钟信号引脚与所述用户身份识别卡接口中的时钟信号引脚连接至所述卡座上的时钟信号连接点;所述存储卡接口中的第一数据传输引脚与所述用户身份识别卡接口中的复位信号引脚连接至所述卡座上的复位信号连接点;所述存储卡接口中的第二数据传输引脚与所述用户身份识别卡接口中的数据传输引脚连接至所述卡座上的数据传输连接点。
第二方面,本申请提供一种用户身份识别卡与存储卡的识别方法,该方法包括:当所述电子设备检测到卡座上放置有第一卡时,将所述用户身份识别卡接口设置为高阻态;控制所述第一卡进行存储卡的初始化流程;若所述第一卡的存储卡初始化流程失败,则将所述存储卡接口设置为高阻态,并控制所述第一卡进行用户身份识别卡的初始化流程;若所述第一卡的用户身份识别卡初始化流程成功,则确定所述第一卡为用户身份识别卡。
可选的,方法还包括:若所述第一卡的存储卡初始化流程成功,则确定所述第一卡为存储卡。
可选的,方法还包括:若所述第一卡的用户身份识别卡初始化流程失败,则确定所述第一卡已损坏。
通过本实施例提供的方案,由于电子设备的卡座上设置有共用卡槽,该共用卡槽既可以容纳存储卡也可以容纳用户身份识别卡,因此当电子设备在开机或检测卡座的共用卡槽上放置有一张卡(即第一卡)时,默认先将控制器上的用户身份识别卡接口设置为高阻态,然后控制第一卡进行存储卡的初始化流程,若初始化成功,则确定第一卡为存储卡;反之,若初始化失败,则将控制器上的存储卡接口设置为高阻态,并控制第一卡进行用户身份识别卡的初始化流程;若第一卡的用户身份识别卡初始化流程成功,则确定第一卡为用户身份识别卡;反之,若第一卡的用户身份识别卡初始化流程失败,则确定第一卡已损坏。
第三方面,本申请提供一种用户身份识别卡与存储卡的识别方法,该方法包括:当所述电子设备检测到卡座的共用卡槽上放置有第一卡时,将所述存储卡接口设置为 高阻态;控制所述第一卡进行用户身份识别卡的初始化流程;若所述第一卡的用户身份识别卡初始化流程失败,则将所述用户身份识别卡接口设置为高阻态,并控制所述第一卡进行存储卡的初始化流程;若所述第一卡的存储卡初始化流程成功,则确定所述第一卡为存储卡。
可选的,方法还包括:若所述第一卡的用户身份识别卡初始化流程成功,则确定所述第一卡为用户身份识别卡。
可选的,方法还包括:若所述第一卡的存储卡初始化流程失败,则确定所述第一卡已损坏。
与上述第二方面的方案不同的是,通过本实施例提供的方案,当电子设备在开机或检测卡座的共用卡槽上放置有一张卡(即第一卡)时,默认先将控制器上的存储卡接口设置为高阻态,然后控制第一卡进行用户身份识别卡的初始化流程,若初始化成功,则确定第一卡为用户身份识别卡;反之,若初始化失败,则将控制器上的用户身份识别卡接口设置为高阻态,并控制第一卡进行存储卡的初始化流程;若第一卡的存储卡初始化流程成功,则确定第一卡为存储卡;反之,若第一卡的存储卡初始化流程失败,则确定第一卡已损坏。
第四方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如第二方面或第三方面所述的方法。
第五方面,本申请提供一种计算机程序,当所述计算机程序被计算机执行时,用于执行第二方面或第三方面所述的方法。
在一种可能的设计中,第五方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。
可见,在以上各个方面,通过分别将电子设备的控制器上的存储卡接口中的时钟信号引脚与用户身份识别卡接口中的时钟信号引脚电连接,存储卡接口中的第一数据传输引脚与用户身份识别卡接口中的复位信号引脚电连接,存储卡接口中的第二数据传输引脚与用户身份识别卡接口中的数据传输引脚电连接,因此在硬件方面节省了现有技术中SIM卡接口模块和存储卡接口模块之间的模拟开关,从而降低硬件成本。在软件方面,根据控制器对放置在所述卡座的共用卡槽上的第一卡的检测结果,若第一卡为存储卡,将用户身份识别卡接口设置为高阻态;若第一卡为用户身份识别卡,将存储卡接口设置为高阻态。
附图说明
图1为本申请实施例提供的电子设备中卡座的共用卡槽上适于放置的一种用户身份识别卡的卡体结构示意图;
图2为本申请实施例提供的电子设备中卡座的共用卡槽上适于放置的一种存储卡的卡体结构示意图;
图3为本申请实施例提供的一种电子设备的结构示意图;
图4为本申请实施例提供的一种用户身份识别卡与存储卡的识别方法的一个实施例的流程示意图;
图5为本申请实施例提供的一种用户身份识别卡与存储卡的识别方法的另一个实施例的流程示意图。
具体实施方式
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
本申请实施例应用于支持存储卡与用户身份识别卡(SIM卡)共用卡座的各种电子设备。在电子设备的卡座上设置有至少一个共用卡槽,该共用卡槽可以放置用户身份识别卡,或者也可以放置与该用户身份识别的外形和尺寸都相同的存储卡。
放置于共用卡槽的存储卡与用户身份识别卡需要满足如下两个要求:
1)存储卡与用户身份识别卡具有相同的外形和尺寸。
2)存储卡的卡体上的接口线序与用户身份识别卡的卡体上的接口线序相同。
在一些实施例中,用户身份识别卡可以采用Nano-SIM卡,因此存储卡的外形和尺寸与Nano-SIM卡的外形和尺寸完全相同。例如,上述存储卡可以是由华为公司推出的Nano存储卡,其外形和大小与Nano-SIM卡相同。
为了便于对本申请实施例的描述,先结合具体实施例详细说明可放置于本申请实施例提供的电子设备中卡座的共用卡槽的存储卡与用户身份识别卡的卡体结构。
图1为本申请实施例提供的电子设备中卡座的共用卡槽上适于放置的一种用户身份识别卡的卡体结构示意图。
参考图1所示,本实施例中,所述用户身份识别卡为Nano-SIM卡。所述Nano-SIM卡为矩形,矩形的四角为圆角,并且矩形的四角中的一角进行了倒角设置,且该一角设置了定位缺口(即图1中的标号17所示位置)。
图1所示的是所述Nano-SIM卡的一个侧面,在该侧面上设置有用户身份识别卡的各个触点区域,所述触点区域包括:DATA触点区域11(即数据传输触点区域)、VPP触点区域12(即编程电压/输入信号触点区域)、GND触点区域13(第一接地信号触点区域)、Vcc触点区域14(即第一电源触点区域)、RST触点区域15(第一复位信号触点区域)以及CLK触点区域16(即第一时钟信号触点区域)。
图2为本申请实施例提供的电子设备中卡座上适于放置的一种存储卡的卡体结构示意图。
如上文所述,本申请实施例中,存储卡与用户身份识别卡具有相同的外形和尺寸。因此,如图2所示的存储卡也是矩形,并且矩形的四角为圆角,并且矩形的四角中的一角进行了倒角设置,进而在该一角上设置了定位缺口(即图2中的标号29所示位置)。并且,本申请实施例提供的存储卡的尺寸与Nano-SIM卡的尺寸相同,具体来说,存储卡的长度与Nano-SIM卡的长度相同,存储卡的宽度与Nano-SIM卡的宽度相同,存储卡上的定位缺口的尺寸与Nano-SIM卡上的定位缺口的尺寸也相同。
参考图2所示的是所述存储卡2的卡体的一个侧面,该侧面上设置有存储卡的各个触点区域,所述触点区域包括:DATA1触点区域21(即第二数据传输触点区域)、CMD触点区域22(即控制信号触点区域)、GND触点区域23(即第二接地信号触点区域)、Vcc触点区域24(即第二电源触点区域)、DATA0触点区域25(第一数据 传输信号触点区域)以及CLK触点区域26(即第二时钟信号触点区域)。触点区域还包括:DATA3触电区域27和DATA2触点区域28,其中,所述DATA3触点区域27与所述GND触点区域23相邻且隔离设置,所述DATA2触点区域28与所述Vcc触点区域24相邻且隔离设置。
需要说明的是,图2所示的存储卡的卡体侧面上的各个触点区域仅是示意图,在实际应用中,除了GND触点区域23(即第二接地信号触点区域)与Vcc触点区域24(即第二电源触点区域)的位置不变(即如图2所示的位置),其余触点区域的位置可以相应调整,并不限于图2所示的位置。
如上文所述,本实施例中,存储卡的卡体上的接口线序与用户身份识别卡的卡体上的接口线序相同。结合参考上述图1所示的Nano-SIM卡的卡体结构和图2所示的存储卡的卡体结构。
具体来说,所述第一时钟信号触点区域16在所述用户身份识别卡1的卡体上的位置与所述第二时钟信号触点区域26在所述存储卡2的卡体上的位置相对应。所述第一电源信号触点区域14在所述用户身份识别卡1的卡体上的位置与所述第二电源信号触点区域24在所述存储卡2的卡体上的位置相对应。所述第一复位信号触点区域15在所述用户身份识别卡1的卡体上的位置与所述第一数据传输信号触点区域25在所述存储卡2的卡体上的位置相对应。所述编程电压/输入信号触点区域12在所述用户身份识别卡1的卡体上的位置与所述控制信号触点区域22在所述存储卡2的卡体上的位置相对应。所述第一接地信号触点区域13在所述用户身份识别卡1的卡体上的位置与所述第二接地信号触点区域23在所述存储卡2的卡体上的位置相对应。所述数据传输触点区域11在所述用户身份识别卡1的卡体上的位置与所述第二数据传输触点区域21在所述存储卡2的卡体上的位置相对应。
进一步,本实施例中,所述DATA3触点区域27与所述第二接地信号触点区域23在所述存储卡2的卡体上的位置与所述第一接地信号触点区域13在所述用户身份识别卡1的卡体上的位置相对应。所述DATA2触控区域28与所述第二电源信号触点区域24在所述存储卡2的卡体上的位置与所述第一电源信号触点区域14在所述用户身份识别卡1的卡体上的位置相对应。
需要说明的是,本实施例中,A与B相对应,表示A和B对应了所述卡座的同一个连接点(或者说弹片)。举例来说,用户身份识别卡的第一时钟信号触点区域在用户身份识别卡的卡体上的位置与存储卡的第二时钟信号触点区域在存储卡的卡体上的位置相对应。其中,这里的“相对应”也可以称用户身份识别卡的第一时钟信号触点区域与存储卡的第二时钟信号触点区域映射,即用户身份识别卡的第一时钟信号触点区域与存储卡的第二时钟信号触点区域对应/映射了所述卡座的同一个连接点/弹片。
图3为本申请实施例提供的一种电子设备的结构示意图。
参考图3,所述电子设备3包括:控制器31和卡座32。
本实施例中,所述控制器31的存储卡接口不具有复用做SIM卡接口的功能,因此所述控制器31上分别设置有存储卡接口311和用户身份识别卡接口312。
与现有技术不同,本实施例中,通过分别将所述存储卡接口311中的时钟信号引脚SD_CLK与所述用户身份识别卡接口312中的时钟信号引脚SIM_CLK电连接,将所述存储卡接口311中的第一数据传输引脚SD_DATA0与所述用户身份识别卡接口312中的复位信号引脚SIM_RST电连接,以及将所述存储卡接口311中的第二数据传输引脚SD_DATA1与所述用户身份识别卡接口312中的数据传输引脚SIM_DATA电连接。
所述卡座32包括共用卡槽321和连接点区域322。其中,所述连接点区域322包括:SD_CLK/SIM_CLK(时钟信号连接点)、SIM_RST/SD_DATA0(SIM复位信号/SD第一数据传输连接点)、SIM_DATA/SD_DATA1(SIM数据传输/SD第二数据传输连接点)、SD_CMD(控制信号连接点)、SD_DATA2连接点以及SD_DATA3连接点。可以看出,在所述卡座32的连接点区域322中,SD_CLK/SIM_CLK(时钟信号连接点)、SIM_RST/SD_DATA0(SIM复位信号/SD第一数据传输连接点)以及SIM_DATA/SD_DATA1(SIM数据传输/SD第二数据传输连接点)可以支持存储卡与用户身份识别卡共用。
所述存储卡接口311中的时钟信号引脚SD_CLK与所述用户身份识别卡接口312中的时钟信号引脚SIM_CLK连接至所述卡座32的连接点区域322中的SD_CLK/SIM_CLK(时钟信号连接点)。所述存储卡接口311中的第一数据传输引脚SD_DATA0与所述用户身份识别卡接口312中的复位信号引脚SIM_RST连接至所述卡座32的连接点区域322中的SIM_RST/SD_DATA0(SIM复位信号/SD第一数据传输连接点)。所述存储卡接口311中的第二数据传输引脚SD_DATA1与所述用户身份识别卡接口312中的数据传输引脚SIM_DATA连接至所述卡座32的连接点区域322中的SIM_DATA/SD_DATA1(SIM数据传输/SD第二数据传输连接点)。
需要说明的是,图3所示的存储卡接口311中,SD_DATA0~SD_DATA3是并行传输的数据引脚,因此SD_DATA0~SD_DATA3这四个引脚的具体位置并不限于图3所示的位置排布,在实际应用中可以任意交换这四个引脚的位置。
可以看出,通过如图3所示的连接方式,在硬件上可以省去现有技术中用来切换的模拟开关,从而降低硬件成本。
进一步,基于图3所示的电子设备3的硬件结构,在软件实现上,根据所述控制器31对放置在所述卡座32上的第一卡的检测结果,若所述第一卡为存储卡,将所述用户身份识别卡接口312设置为高阻态;若所述第一卡为用户身份识别卡,将所述存储卡接口311设置为高阻态。
本领域技术人员理解,高阻态是一种电路的输出状态,当所述控制器31中的所述存储卡接口311或所述用户身份识别卡接口312处于高阻态时,所述存储卡接口311或所述用户身份识别卡接口312的各个引脚都处于隔断状态,从而对其连接的电路无任何控制。
具体到本实施例中,继续参考图3,当控制器31识别放置在所述卡座32上的第一卡为存储卡,则将所述用户身份识别卡接口312设置为高阻态,这样所述用户身份识别卡接口312的各个引脚相当于处于悬空状态,而所述存储卡接口311的各个引脚仍与所述卡座32上相应的引脚处于连接状态,以使所述控制器31对放置在所述卡座 32上的存储卡进行控制。反之,当控制器31识别放置在所述卡座32上的第一卡为用户身份识别卡,则将所述存储卡接口311设置为高阻态,这样所述存储卡接口311的各个引脚相当于处于悬空状态,而所述用户身份识别卡接口312的各个引脚仍与所述卡座32上相应的引脚处于连接状态,以使所述控制器32对放置在所述卡座32上的用户身份识别卡进行控制。
进一步,由于在布线上的限制,不同信号的走线可能会有绕线,从而导致走线加长,因此从分叉点到所述控制器31的接口引脚要尽量短,从而保证所述卡座32与所述控制器31之间的信号传输质量。
继续参考图3,所述存储卡接口311中的时钟信号引脚SD_CLK与所述用户身份识别卡接口312中的时钟信号引脚SIM_CLK电连接,且所述存储卡接口311中的时钟信号引脚SD_CLK与所述用户身份识别卡接口312中的时钟信号引脚SIM_CLK连接至所述卡座32上的SD_CLK/SIM_CLK(时钟信号连接点)。因此在布线时,要尽量使得从分叉点A到所述控制器31上的存储卡接口311中的时钟信号引脚SD_CLK的走线a1的长度以及从分叉点A到所述控制器31上的用户身份识别卡接口312中的时钟信号引脚SIM_CLK的走线a2的长度尽可能短,而从分叉点A到所述卡座32上的SD_CLK/SIM_CLK(时钟信号连接点)的走线a3的长度则无限制。
下面将详细描述控制器如何检测放置在卡座上的第一卡是存储卡还是用户身份识别卡的具体实施例。
图4为本申请实施例提供的一种用户身份识别卡与存储卡的识别方法的一个实施例的流程示意图。参考图4,所述方法包括如下步骤:
步骤401、当所述电子设备检测到卡座的共用卡槽上放置有第一卡时,将所述用户身份识别卡接口设置为高阻态;
步骤402、控制所述第一卡进行存储卡的初始化流程;
步骤403、若所述第一卡的存储卡初始化流程失败,则将所述存储卡接口设置为高阻态,并控制所述第一卡进行用户身份识别卡的初始化流程;
步骤404、若所述第一卡的用户身份识别卡初始化流程成功,则确定所述第一卡为用户身份识别卡。
本实施例所述的方法应用于如图3所示的电子设备。
首先,所述电子设备检测到卡座的共用卡槽上放置有第一卡时(或者当所述电子设备开机时),默认先将所述控制器上的所述用户身份识别卡接口设置为高阻态,这样所述用户身份识别卡接口的各个引脚相当于处于悬空状态,而所述存储卡接口的各个引脚仍与所述卡座上相应的引脚处于连接状态。
然后,所述控制器控制所述第一卡进行存储卡的初始化流程。其中,存储卡的初始化流程由控制器向第一卡发出指令,由第一卡完成应答,通过两者间的交互以完成存储卡的初始化流程。存储卡的初始化流程的具体过程为现有技术,在此不再赘述。
接着,若所述第一卡的存储卡初始化流程成功,则确定所述第一卡为存储卡。若所述第一卡的存储卡初始化流程失败,则确定所述第一卡不是存储卡,因此将所述存储卡接口设置为高阻态,并控制所述第一卡进行用户身份识别卡的初始化流程。其中,用户身份识别卡的初始化流程同样由控制器向第一卡发出指令,由第一卡完成应答, 通过两者间的交互以完成用户身份识别卡的初始化流程。用户身份识别卡的初始化流程的具体过程为现有技术,在此不再赘述。
若所述第一卡的用户身份识别卡初始化流程成功,则确定所述第一卡为用户身份识别卡。反之,若所述第一卡的用户身份识别卡初始化流程失败,则确定所述第一卡已损坏。
图5为本申请实施例提供的一种用户身份识别卡与存储卡的识别方法的另一个实施例的流程示意图。参考图5,所述方法包括如下步骤:
步骤501、当所述电子设备检测到卡座的共用卡槽上放置有第一卡时,将所述存储卡接口设置为高阻态;
步骤502、控制所述第一卡进行用户身份识别卡的初始化流程;
步骤503、若所述第一卡的用户身份识别卡初始化流程失败,则将所述用户身份识别卡接口设置为高阻态,并控制所述第一卡进行存储卡的初始化流程;
步骤504、若所述第一卡的存储卡初始化流程成功,则确定所述第一卡为存储卡。
本实施例所述的方法应用于如图3所示的电子设备。
与图4所述实施例不同的是,本实施例中,首先,所述电子设备检测到卡座的共用卡槽上放置有第一卡时(或者当所述电子设备开机时),默认先将所述控制器上的所述存储卡接口设置为高阻态,这样所述存储卡接口的各个引脚相当于处于悬空状态,而所述用户身份识别卡接口的各个引脚仍与所述卡座上相应的引脚处于连接状态。
然后,控制所述第一卡进行用户身份识别卡的初始化流程。若所述第一卡的用户身份识别卡初始化流程成功,则确定所述第一卡为用户身份识别卡。若所述第一卡的用户身份识别卡初始化流程失败,则将所述用户身份识别卡接口设置为高阻态,并控制所述第一卡进行存储卡的初始化流程。
若所述第一卡的存储卡初始化流程成功,则确定所述第一卡为存储卡。反之,若所述第一卡的存储卡初始化流程失败,则确定所述第一卡已损坏。
可以理解的是,上述实施例中的部分或全部步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。
本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,上述计算机程序被处理器执行时可以实现本申请实施例提供的图4或者图5所示的用户身份识别卡与存储卡的识别方法。
上述计算机可读存储介质可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(Read Only Memory;以下简称:ROM)、可擦式可编程只 读存储器(Erasable Programmable Read Only Memory;以下简称:EPROM)或闪存、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network;以下简称:LAN)或广域网(Wide Area Network;以下简称:WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
综上所述,本申请技术方案通过分别将电子设备的控制器上的存储卡接口中的时钟信号引脚与用户身份识别卡接口中的时钟信号引脚电连接,存储卡接口中的第一数据传输引脚与用户身份识别卡接口中的复位信号引脚电连接,存储卡接口中的第二数据传输引脚与用户身份识别卡接口中的数据传输引脚电连接,因此在硬件方面节省了现有技术中SIM卡接口模块和存储卡接口模块之间的模拟开关,从而降低硬件成本。在软件方面,根据控制器对放置在所述卡座的共用卡槽上的第一卡的检测结果,若第一卡为存储卡,将用户身份识别卡接口设置为高阻态;若第一卡为用户身份识别卡,将存储卡接口设置为高阻态。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种电子设备,其特征在于,包括:控制器和卡座;
    所述卡座上设置有一个共用卡槽,所述共用卡槽适于容纳用户身份识别卡或者与所述用户身份识别卡的外形和尺寸都相同的存储卡;
    所述控制器上具有存储卡接口和用户身份识别卡接口;其中,所述存储卡接口中的时钟信号引脚与所述用户身份识别卡接口中的时钟信号引脚电连接;所述存储卡接口中的第一数据传输引脚与所述用户身份识别卡接口中的复位信号引脚电连接;所述存储卡接口中的第二数据传输引脚与所述用户身份识别卡接口中的数据传输引脚电连接;
    所述控制器用于根据所述共用卡槽内放置的用户身份识别卡,将所述用户身份识别卡接口设置为高阻态,或根据所述共用卡槽内放置的存储卡,将所述存储卡接口设置为高阻态。
  2. 如权利要求1所述的电子设备,其特征在于,所述卡座上还设置有与所述用户身份识别卡或所述存储卡的触点区域相匹配的连接点区域;其中所述连接点区域包括:时钟信号连接点、复位信号连接点以及数据传输连接点;其中,
    所述存储卡接口中的时钟信号引脚与所述用户身份识别卡接口中的时钟信号引脚连接至所述卡座上的时钟信号连接点;
    所述存储卡接口中的第一数据传输引脚与所述用户身份识别卡接口中的复位信号引脚连接至所述卡座上的复位信号连接点;
    所述存储卡接口中的第二数据传输引脚与所述用户身份识别卡接口中的数据传输引脚连接至所述卡座上的数据传输连接点。
  3. 一种用户身份识别卡与存储卡的识别方法,其特征在于,包括:
    当所述电子设备检测到卡座的共用卡槽上放置有第一卡时,将所述用户身份识别卡接口设置为高阻态;
    控制所述第一卡进行存储卡的初始化流程;
    若所述第一卡的存储卡初始化流程失败,则将所述存储卡接口设置为高阻态,并控制所述第一卡进行用户身份识别卡的初始化流程;
    若所述第一卡的用户身份识别卡初始化流程成功,则确定所述第一卡为用户身份识别卡。
  4. 如权利要求3所述的方法,其特征在于,还包括:
    若所述第一卡的存储卡初始化流程成功,则确定所述第一卡为存储卡。
  5. 如权利要求3所述的方法,其特征在于,还包括:
    若所述第一卡的用户身份识别卡初始化流程失败,则确定所述第一卡已损坏。
  6. 一种用户身份识别卡与存储卡的识别方法,其特征在于,包括:
    当所述电子设备检测到卡座上放置有第一卡时,将所述存储卡接口设置为高阻态;
    控制所述第一卡进行用户身份识别卡的初始化流程;
    若所述第一卡的用户身份识别卡初始化流程失败,则将所述用户身份识别卡接口设置为高阻态,并控制所述第一卡进行存储卡的初始化流程;
    若所述第一卡的存储卡初始化流程成功,则确定所述第一卡为存储卡。
  7. 如权利要求6所述的方法,其特征在于,还包括:
    若所述第一卡的用户身份识别卡初始化流程成功,则确定所述第一卡为用户身份识别卡。
  8. 如权利要求6所述的方法,其特征在于,还包括:
    若所述第一卡的存储卡初始化流程失败,则确定所述第一卡已损坏。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求3-5任一项所述的方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算计算机上运行时,使得计算机执行如权利要求6-8任一项所述的方法。
PCT/CN2020/133809 2019-12-09 2020-12-04 电子设备、用户身份识别卡与存储卡的识别方法 WO2021115202A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911250479.3A CN113033222B (zh) 2019-12-09 2019-12-09 电子设备、用户身份识别卡与存储卡的识别方法
CN201911250479.3 2019-12-09

Publications (1)

Publication Number Publication Date
WO2021115202A1 true WO2021115202A1 (zh) 2021-06-17

Family

ID=76329522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133809 WO2021115202A1 (zh) 2019-12-09 2020-12-04 电子设备、用户身份识别卡与存储卡的识别方法

Country Status (2)

Country Link
CN (1) CN113033222B (zh)
WO (1) WO2021115202A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN217693391U (zh) * 2021-12-15 2022-10-28 华为技术有限公司 电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207965941U (zh) * 2018-02-01 2018-10-12 华为技术有限公司 存储卡和终端
CN109983706A (zh) * 2018-02-01 2019-07-05 华为技术有限公司 一种电子设备
CN209640862U (zh) * 2019-05-24 2019-11-15 北京小米移动软件有限公司 存储卡和终端

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7493437B1 (en) * 2000-07-06 2009-02-17 Mcm Portfolio Llc Flashtoaster for reading several types of flash memory cards with or without a PC
CN101399957A (zh) * 2007-09-28 2009-04-01 上海摩威电子科技有限公司 机卡分离的移动数字电视的条件接收系统接入方法
US20100125689A1 (en) * 2008-11-20 2010-05-20 Mediatek Inc. Electronic apparatus capable of receiving different types of memory cards
CN107070472A (zh) * 2017-03-24 2017-08-18 上海摩软通讯技术有限公司 接口卡座组件及包含其的移动终端
CN109426726B (zh) * 2017-08-23 2021-01-15 普天信息技术有限公司 一种兼具通信和存储功能的MicroSD卡及其加密方法
CN109948767A (zh) * 2018-02-01 2019-06-28 华为技术有限公司 存储卡和终端
CN108401043A (zh) * 2018-02-28 2018-08-14 上海与德科技有限公司 基于单刀双掷开关的防烧卡电路、方法和移动终端

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207965941U (zh) * 2018-02-01 2018-10-12 华为技术有限公司 存储卡和终端
CN109983706A (zh) * 2018-02-01 2019-07-05 华为技术有限公司 一种电子设备
CN209640862U (zh) * 2019-05-24 2019-11-15 北京小米移动软件有限公司 存储卡和终端

Also Published As

Publication number Publication date
CN113033222B (zh) 2022-09-23
CN113033222A (zh) 2021-06-25

Similar Documents

Publication Publication Date Title
US9420409B2 (en) Near field communication device
US10110031B2 (en) Charging method and charging apparatus for electronic device
KR102461761B1 (ko) 전자 장치
CN106990912B (zh) 控制sim卡和sd卡的方法以及实现该卡的电子设备
US8626066B2 (en) Near field communication device
US8070067B2 (en) Receptacles for removable electrical interface devices
EP2860638B1 (en) Serial communication over communication control pin
US20170255585A1 (en) Method and system for switching role of usb otg device and otg device thereof
US20070145154A1 (en) Interface for a removable electrical card
US20080257955A1 (en) Nonvolatile Memory Card Adaptable to Plural Specifications
US8533380B2 (en) Apparatus for peer-to-peer communication over a universal serial bus link
KR102605960B1 (ko) 메모리 카드, 메모리 카드 어댑터 및 단말 장치
US20160157033A1 (en) Method and apparatus for identifying foreign substances in connectors
US10423566B2 (en) Electronic device and method for controlling external electronic device connected to USB type-C connector
CN104063348B (zh) 实现兼容usb通讯与音频通讯的装置及方法
CN113675636A (zh) 电子设备和电子设备识别外部设备的连接端子的方法
CN112041827B (zh) 自动usb主机检测和端口配置方法及装置
TWI760615B (zh) 用於進行記憶裝置之寫保護指令之偵測控制的方法、控制晶片以及電子裝置
CN107943260A (zh) 半导体设备、控制半导体设备的方法和半导体系统
WO2021115202A1 (zh) 电子设备、用户身份识别卡与存储卡的识别方法
CN112310756A (zh) 防止usb装置损坏的电子装置及其操作方法
TW201531928A (zh) 具有多個接合墊及/或發射器的單一輸入/輸出單元
KR20150072248A (ko) Usb otg 메모리 장치
CN105743538A (zh) 双通道移动终端及射频校准系统
US20110264958A1 (en) Test framework for a notebook computer

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20898584

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20898584

Country of ref document: EP

Kind code of ref document: A1