CN114780029A - Device identification method and related device - Google Patents

Device identification method and related device Download PDF

Info

Publication number
CN114780029A
CN114780029A CN202210380036.1A CN202210380036A CN114780029A CN 114780029 A CN114780029 A CN 114780029A CN 202210380036 A CN202210380036 A CN 202210380036A CN 114780029 A CN114780029 A CN 114780029A
Authority
CN
China
Prior art keywords
slave device
value
model
register
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210380036.1A
Other languages
Chinese (zh)
Other versions
CN114780029B (en
Inventor
段杨森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310481771.6A priority Critical patent/CN116909474B/en
Priority to CN202210380036.1A priority patent/CN114780029B/en
Publication of CN114780029A publication Critical patent/CN114780029A/en
Priority to PCT/CN2023/071238 priority patent/WO2023197709A1/en
Application granted granted Critical
Publication of CN114780029B publication Critical patent/CN114780029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/24Resetting means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a device identification method and a related device, which are applied to electronic equipment. The electronic equipment comprises a master device and a slave device, wherein the master device stores a corresponding relation, the slave device is connected with the master device through an SPI bus, and the corresponding relation comprises the relation among the model of the slave device, a first address, a first preset value, a second address and a second preset value. The method comprises the following steps: the master device reads a value of a register in the slave device to obtain a first value and a second value corresponding to the first slave device model based on the slave device model and the corresponding relation; if the first value and the second value are respectively the same as a first preset value and a second preset value corresponding to the model of the first slave device, the master device configures the slave device based on the model of the first slave device; before the master device configures the slave devices, the value of a register corresponding to a second address corresponding to a first slave device model in the slave devices is a fixed value. And the verification and identification are performed twice based on the two addresses, so that the device model misidentification caused by the same value of the register of the same address is reduced, and the configuration failure is reduced.

Description

Device identification method and related device
Technical Field
The application relates to the technical field of terminals, in particular to a device identification method and a related device.
Background
A Serial Peripheral Interface (SPI) bus system is a synchronous SPI and is widely used in products such as integrated circuits and electronic devices. For example, a processor (CPU) and a peripheral device in the electronic device may communicate in a serial manner via the SPI interface to exchange information and thereby obtain information from or control the peripheral device to implement one or more functions of the electronic device. Peripheral devices include, but are not limited to: touch panel, sensor or display screen, etc.
At present, a processor (CPU) in an electronic device can be compatibly connected with a plurality of types of peripheral devices through a set of SPI interfaces, so as to improve the reuse rate of the SPI interfaces. Therefore, the processor needs to identify the model of the peripheral device connected through the SPI interface, and then perform corresponding initialization configuration based on the model.
However, in the recognition process, there may be a false recognition, which results in a false initialization configuration of the slave device, and the peripheral device cannot be used, thus deteriorating the user experience.
Disclosure of Invention
The embodiment of the application provides a device identification method and a related device, wherein a master device can read numerical values of two different registers in a slave device based on an identification register address and an additional register address to obtain two corresponding values for verification. When both values are expected, the device identification is successful. Therefore, secondary identification is carried out, the condition that the slave devices are initialized and configured to fail due to the fact that the model numbers of the devices are mistakenly identified because the corresponding values of the registers of the same address in the slave devices of different models are the same is reduced, and user experience is optimized. In addition, the hardware structure of the electronic equipment is not changed, the cost is friendly, the system design flexibility is improved, and the stability of product material supply is improved.
In a first aspect, an embodiment of the present application provides a device identification method. The method is applied to electronic equipment, the electronic equipment comprises a master device and a slave device, the master device is connected with the slave device through a Serial Peripheral Interface (SPI) bus, the master device stores a corresponding relation, the corresponding relation comprises the relation among slave device models, a first address, a first preset value, a second address and a second preset value, and any slave device model in the corresponding relation corresponds to the first address, the first preset value, the second address and the second preset value.
The device identification method comprises the following steps: the master device reads the numerical value of the register in the slave device based on the model of the first slave device and the corresponding relation to obtain a first value corresponding to the model of the first slave device and a second value corresponding to the model of the first slave device; when the master device determines that a first value corresponding to the model of the first slave device is the same as a first preset value corresponding to the model of the first slave device, and a second value corresponding to the model of the first slave device is the same as a second preset value corresponding to the model of the first slave device, the master device configures the slave device based on the model of the first slave device; before the master device configures the slave device based on the first slave device model, the third value is a fixed value, and the third value is a numerical value of a value register of a register corresponding to the second type address corresponding to the first slave device model in the slave device.
The first address may be an address identifying a register and the second address may be an address reviewing a register. Therefore, verification and identification are carried out twice based on the two register addresses, device model misidentification caused by the fact that corresponding values of registers of the same address in slave devices of different models are the same can be reduced, the situation of slave device configuration failure is reduced, and user experience is optimized. In addition, the hardware structure of the electronic equipment is not changed, the cost is friendly, the flexibility of system design is improved, and the stability of product material supply is improved.
Optionally, the reading, by the master device, the value of the register in the slave device based on the model of the first slave device and the corresponding relationship to obtain a first value corresponding to the model of the first slave device and a second value corresponding to the model of the first slave device, includes: the master device reads the numerical value of a register in the slave device based on a first address corresponding to the model of the first slave device to obtain a first value; and the master device reads the numerical value of the register in the slave device based on the second type address corresponding to the model of the first slave device to obtain a second value.
Optionally, the reading, by the master device, the value of the register in the slave device based on the second type address corresponding to the model of the first slave device to obtain a second value includes: when the master device determines that the first value is the same as a first preset value corresponding to the first slave device model, the master device reads the numerical value of the register in the slave device based on a second address corresponding to the first slave device model to obtain a second value.
And when the first value is the same as the first preset value, the master device reads to obtain a second value. Therefore, when the first value is different from the first preset value, the second value does not need to be judged, and the computing resource is saved.
Optionally, the method further comprises: and when the master device determines that the first value is inconsistent with a first preset value corresponding to the model of the first slave device or the master device determines that the second value is inconsistent with a second preset value corresponding to the model of the first slave device, the master device reads the numerical value of the register in the slave device based on the model of the second slave device and the corresponding relation.
In this way, the model of the slave device may also be verified based on the second slave device model.
Optionally, when the second slave device model is the last model in the corresponding relationship and the master device does not recognize that the slave device is the second slave device model, the master device configures the slave device based on a preset model, where the preset model is any one of the slave device models in the corresponding relationship.
Therefore, the master device can successfully configure the slave device based on the preset model, so that the slave device can normally operate, and the possibility that the master device successfully configures the slave device is improved.
Optionally, the configuring, by the master device, the slave device based on the first slave device model includes: and the master device writes the adjustment parameters corresponding to the first slave device model into a register of the slave device.
In this way, the tuning parameter corresponding to the first slave device model is written in the register of the slave device, so that the slave device operates based on the tuning parameter.
Optionally, before the master device reads the value of the register in the slave device based on the second address corresponding to the model of the first slave device, the method further includes: the master device controls the slave device to reset.
Thus, the value of the register in the slave device is restored to the default value by resetting the slave device, and the recognition failure or the recognition error caused by the rewriting of the value corresponding to the review register can be reduced.
Optionally, the fixed value is not zero.
It will be appreciated that most registers have a register predicate value of 0 after power-on reset, and that register exception predicates typically 0. Therefore, the non-zero register is selected, so that the false recognition can be further reduced, and the stability of the embodiment of the application is improved.
Optionally, the register corresponding to the second type address includes: and the control register with a fixed read value and not subjected to read-write operation.
Therefore, the condition of identification failure caused by changing the value in the register can be reduced, and the success rate of identification is improved.
Optionally, before the master device reads the value of the register in the slave device based on the model of the first slave device and the corresponding relationship, the method includes: the main device is switched to a first state from a second state, the second state is a power-off state, and the first state is a power-on state; alternatively, the master device detects that the slave device is switched from the second state to the first state.
Optionally, the correspondence is stored in the master device in the form of a table.
Optionally, the master devices include, but are not limited to: a processor CPU or system on chip SOC, a microcontroller MCU, a microprocessor MPU or a programmable system on chip SOPC; slave devices include, but are not limited to: the mobile phone comprises a sensor, a battery, an antenna, a mobile communication module, a wireless communication module, an audio module, a loudspeaker, a receiver, a microphone, an earphone, a key, a motor, an indicator, a camera, a display screen and a user identification module.
The device identification method can be applied to various master devices and slave devices, and is wide in application range.
Optionally, the preset model may be a model corresponding to a slave device that is used for the most times in the electronic device. In this way, the likelihood of a master device successfully configuring a slave device is increased.
Optionally, the master device verifies the model of the slave device based on the first type address and/or the second type address multiple times. In this way, misrecognition can be further reduced.
In a second aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a terminal device, and the terminal device may be: mobile phones, tablet computers, laptop computers, Personal Digital Assistants (PDAs), Mobile Internet Devices (MIDs), wearable devices, consumer electronics, notebook computers, desktop computers, automobiles, industrial control robots, or industrial electronic equipment, and the like.
The electronic device includes: a processor and a memory; the memory stores computer execution instructions; the processor executes computer-executable instructions stored by the memory to cause the processor to perform the method of the first aspect described above.
The beneficial effects of the electronic device provided in the second aspect and each possible design of the second aspect may refer to the beneficial effects brought by each possible structure of the first aspect and the second aspect, which are not described herein again.
In a third aspect, embodiments of the present application provide a computer-readable storage medium, in which a computer program or instructions are stored, and when the computer program or instructions are executed, the method of the first aspect is implemented.
The advantages of the computer-readable storage medium provided in the third aspect and in each possible design of the third aspect may refer to the advantages brought by each possible structure of the first aspect and the first aspect, and are not described herein again.
In a fourth aspect, embodiments of the present application provide a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the method of the first aspect is implemented.
The beneficial effects of the computer program product provided in the fourth aspect and the possible designs of the fourth aspect may refer to the beneficial effects brought by the possible structures of the first aspect and the first aspect, and are not described herein again.
Drawings
Fig. 1 is a schematic diagram of connection between a master device and a slave device according to an embodiment of the present application;
fig. 2 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a slave device according to an embodiment of the present application;
fig. 4 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart of a device identification method in a possible design;
FIG. 6 is a schematic flow chart of a device identification method in a possible design;
FIG. 7 is a schematic flow chart of a device misidentification in a possible design;
fig. 8 is a schematic flowchart of a device identification method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of a device identification method according to an embodiment of the present application.
Detailed Description
In order to facilitate clear description of technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish identical items or similar items with substantially the same functions and actions. For example, the first device and the second device are only used for distinguishing different devices, and the order of the devices is not limited. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
It is noted that, in the present application, words such as "exemplary" or "for example" are used to mean exemplary, illustrative, or descriptive. Any embodiment or design described herein as "exemplary" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present relevant concepts in a concrete fashion.
It should be noted that the network architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not constitute a limitation to the technical solution provided in the embodiment of the present application, and it is known by a person of ordinary skill in the art that, with the evolution of the network architecture and the occurrence of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
It is understood that the term "plurality" herein refers to two or more. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and succeeding related objects are in a relationship of "division".
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for convenience of description and distinction and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiment of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
For ease of understanding, the examples are given in part for illustration of concepts related to embodiments of the present application.
1. SPI bus: a high speed full duplex synchronous serial communications interface, the SPI bus enables a processor to communicate serially with various peripheral devices to exchange data. The data transmission speed is faster than that of other serial interfaces, such as an asynchronous receiver/transmitter (UART) or an inter-integrated circuit (I2C) bus, and can reach about 10 megabits per second (Mbps).
The SPI bus operates in a master-slave fashion, and a master device may be connected to one or more slave devices through the SPI bus. For example, the processor may be connected to one or more slave devices in a sensor, touch panel, display screen, etc. via the SPI bus.
It should be noted that, during the communication process between the master device and the slave device through the SPI bus, there is no response mechanism between the master device and the slave device. Specifically, the slave device in the enabled state transmits information to the master device after receiving a request from the master device; the slave device does not feed back a message to the master device indicating receipt of the request.
In one possible design, the SPI bus includes 4 transmission lines, which are a Serial Clock Line (SCLK), a master in/slave out data line (MISO), a master out/slave in data line (MOSI), and a chip select line (CS).
MISO is the main device data input, and the slave device data output; MISO may also be referred to as SOMI or SDO, etc. MOSI is the data output of a main device and the data input of a slave device; MOSI may also be referred to as SIMO, SDO, or the like. SCLK is a clock signal, generated by the master device; CS is an enable signal of the slave device, controlled by the master device; CS may also be referred to as SS or SSEL, etc. The embodiment of the present application does not limit this.
In a second possible design, the SPI bus includes 3 transmission lines, which are a Serial Clock Line (SCLK), a master output/master input data line (MOMI), and a chip select line (CS).
MOMI may also be referred to as SISO. SCLK is a clock signal, generated by the master device; CS is an enable signal of the slave device, controlled by the master device; CS may also be referred to as SS or SSEL, etc. The embodiment of the present application does not limit this.
It will be appreciated that in both of the above possible designs, the SPI bus may omit the CS transmission line, and the pin for connecting the CS transmission line is grounded.
In the embodiment of the present application, the master device may be connected to the slave device through a four-wire SPI interface (as shown in a and b in fig. 1), or may be connected to the slave device through a three-wire SPI interface (as shown in c and d in fig. 1). In the embodiment of the present application, the master device may also be connected to one or more slave devices through a set of SPI interfaces (as shown by e and f in fig. 1).
It should be noted that, when the master device is connected to the slave device through a group of SPI interfaces, the master device may selectively enable different slave devices connected through the SPI interfaces through different CS signals. However, only one slave device in the slave devices connected to a group of SPI interfaces at a time is enabled.
It is understood that a group of SPI interfaces may reserve multiple slave device sites for connection to multiple slave devices, or may reserve a slave device site for connection to a slave device (where slave devices of different models may be attached but packaged in the same package).
It should be noted that the master device may be connected to the slave devices of the same type and different models through the SPI interface, and may also be connected to the slave devices of different types. Therefore, the supply of product materials can be improved, and the interface reuse rate is improved.
It can be understood that, because there are differences in device principles, internal structures, software implementation, and the like among devices of different models, when an SPI interface can be connected with multiple slave devices, the master device needs to identify the type, model, and the like of the slave device connected to the SPI interface before configuring the slave device, and perform initialization configuration based on the type, model, and the like of the slave device.
2. Polling (polling): is a way for the master to decide how to provide the slave services. Specifically, the master device sends out a query to identify the slave device according to the possible models of the slave device; if the master device identifies the slave device based on the model number of the first slave device, performing initialization configuration based on the model number of the first slave device; if the slave device is not identified based on the first slave device model number, the slave device is identified based on the second slave device model number, and then the process is repeated until the slave device is identified or the slave device is identified based on the last model number. Polling may also be referred to as "programmed input/output" (programmed I/O).
In the embodiment of the application, the master device sends out queries to the slave devices according to the sequence of the pre-stored identification registers, and when the value of the slave device read by the master device is consistent with the preset value corresponding to the device identification, the master device identifies the slave device and configures the slave device.
3. Reset (power on reset, por): the method refers to a process that when the device is powered on for the first time or after the device is powered off, registers in the device return to the initial state. For example, when the electronic device is powered on and started, the master device and the slave device may be in an initial state, and start to operate from the initial state.
An application scenario of the embodiment of the present application is described below with reference to the drawings.
Exemplarily, fig. 2 is a schematic view of an application scenario provided in an embodiment of the present application. As shown in fig. 2, the electronic apparatus includes a master device 101 and a slave device 102. Master device 101 and slave device 102 are connected by an SPI bus.
The master device 101 is used for acquiring data of the slave device 102 and/or controlling the slave device 102 through the SPI bus, and the like, thereby implementing one or more functions of the electronic device. Illustratively, taking the master device as a CPU and the slave device as a temperature sensor as an example, the CPU obtains the temperature detected by the temperature sensor through the SPI bus and executes a temperature processing strategy based on the temperature. The CPU can also adjust the detection frequency of the temperature sensor through the SPI bus.
In this embodiment, the master device 101 may be connected to a plurality of types of slave devices through an SPI bus. And the slave devices of different models have different corresponding device principles, internal structures, software implementation and the like. Therefore, after the master device is powered on or the slave device is powered on, the master device needs to identify the model of the slave device to perform initial configuration on the slave device, so as to implement one or more functions of the electronic device.
Specifically, the master device 101 may read or rewrite a register value in the slave device 102 through the SPI bus to identify the model of the slave device 102, obtain data, control the slave device 102, and the like.
For ease of understanding, the structure of the slave device 102 is described below in conjunction with fig. 3.
A plurality of registers are included in the slave device 102. Registers include, but are not limited to, control class registers, status class registers, function class registers, and identification registers.
And the control class register is used for controlling and determining the operation mode of the slave device, the working characteristics of the slave device and the like.
The state type register is used for storing two types of information: one type of information is various state information (condition codes) which embody the result of instruction execution, such as whether carry bit (CF bit), overflow bit (OV bit), result plus or minus (SF bit), whether result is zero (ZF bit), parity bit (P bit), etc.; another type of information is control information such as enable interrupts (IF bits), tracking flags (TF bits), etc.
The function class register is used for storing control commands, states or data of the corresponding functional unit.
The identification register is used for storage device identification to facilitate the master device to distinguish the type of slave device.
It will be appreciated that each register in the slave device corresponds to an address, and that registers corresponding to different addresses correspond to different functions. Illustratively, as shown in fig. 3, the slave device includes a plurality of registers, respectively, a 01 register, a 02 register, a 03 register, and so on. Taking the slave device as a temperature sensor as an example, the 01 register may be a status register for storing status information of whether the temperature is abnormal; the 02 register can be a control register and is used for storing the detection frequency; the 03 register may be an identification register for storing a device identification. The slave device shown in fig. 3 may also include a function class register for storing the sensed temperature.
In addition, the number of registers corresponding to different models of slave devices may be different. The registers corresponding to the same address may be different. Illustratively, the 01 register in fig. 3 may be an identification register for storing a device identification. The 02 register can be a state register and is used for storing state information of whether the temperature is abnormal or not; the 03 register may be a control class register for storing the detected frequency. The embodiment of the present application does not limit the specific functions of the registers in the slave device and the addresses of the registers corresponding to each function.
In the embodiment of the present application, the main device 101 may be a processor (CPU), a System On Chip (SOC), a Micro Controller Unit (MCU), a microprocessor unit (MPU), a system-on-a-programmable-on-chip (SOPC), or the like in an electronic device.
The slave device 102 may be a peripheral device in an electronic device. The peripheral device may specifically refer to the following description of the hardware architecture of the electronic device in fig. 4, which is not described herein again.
Exemplarily, fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processor (NPU), among others. The different processing units may be separate devices or may be integrated into one or more processors.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it may be called from memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C or IIC) interface, a Serial Peripheral Interface (SPI), an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The SPI interface is a high-speed synchronous serial communication bus, and the specific structure can be referred to the description of the related concepts above. In some embodiments, processor 110 may include multiple sets of SPI buses. The processor 110 may be coupled to the temperature sensor 180J, the charger, the flash, the camera 193, and other peripheral devices through different SPI bus interfaces. For example: the processor 110 may be coupled to the temperature sensor 180J through the SPI interface, so that the processor 110 and the temperature sensor 180J communicate through the SPI bus interface, thereby implementing a temperature processing policy based on the temperature detected by the temperature sensor 180J by the electronic device 100, and implementing a temperature adjusting function.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to receive phone calls through the bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, audio module 170 and wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit the audio signal to the wireless communication module 160 through the PCM interface, so as to implement the function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a display screen serial interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. Processor 110 and display screen 194 communicate via a DSI interface to implement display functions of electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules illustrated in the embodiment of the present application is an illustrative description, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive a charging input from a charger. The charger can be a wireless charger or a wired charger.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In other embodiments, the power management module 141 may be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used for displaying images, displaying videos, receiving slide operations, and the like. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a user takes a picture, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, an optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and converting the electric signal into an image visible to the naked eye. In some embodiments, the ISP may be located in camera 193.
The camera 193 is used to capture still images or video. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, and the like) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into analog audio signals for output, and also used to convert analog audio inputs into digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association) standard interface of the USA.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but have different touch operation intensities may correspond to different operation instructions.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C to assist in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the terminal equipment, and is applied to application programs such as horizontal and vertical screen switching, pedometers and the like.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocking and locking the screen.
The ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting thereon or nearby. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the electronic device 100 at a different position than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human body pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor 180M, and the heart rate detection function is achieved.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
In the electronic device shown in fig. 4, the master device may be a processor, and the slave devices may be peripheral devices, for example, the charging management module 140, the power management module 141, the battery 142, the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, the sensor module 180, the buttons 190, the motor 191, the indicator 192, the camera 193, the display screen 194, and the Subscriber Identity Module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The device identification method provided by the embodiment of the application can be applied to electronic equipment with an SPI (serial peripheral interface). The electronic device includes a terminal device. A terminal device may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), etc. The terminal device may be a mobile phone (mobile phone), a smart television, a wearable device, a tablet computer (Pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving (self-driving), a wireless terminal in remote surgery (remote medical supply), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), and the like.
By way of example and not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable equipment can also be called wearable intelligent equipment, is the general term of applying wearable technique to carry out intelligent design, develop the equipment that can dress to daily wearing, like glasses, gloves, wrist-watch, dress and shoes etc.. A wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction and cloud interaction. The generalized wearable smart device has full functions and large size, and can realize complete or partial functions without depending on a smart phone, for example: smart watches or smart glasses and the like, and only focus on a certain type of application function, and need to be matched with other equipment such as a smart phone for use, such as various smart bracelets for physical sign monitoring, smart jewelry and the like.
In addition, in the embodiment of the present application, the terminal device may also be a terminal device in an internet of things (IoT) system, where IoT is an important component of future information technology development, and the main technical feature of the present application is to connect an article with a network through a communication technology, so as to implement an intelligent network with human-computer interconnection and object-object interconnection.
The embodiment of the present application does not limit the specific technology and the specific device form adopted by the terminal device.
When the electronic device receives an operation for instructing startup, a processor in the electronic device needs to identify the type of a peripheral device connected through the SPI bus, so as to perform corresponding initialization configuration on the peripheral device based on the device type and the like, thereby realizing a corresponding function of the electronic device.
In possible design, the processor reads a device identifier (chip id) of the peripheral device in a polling mode to realize model identification of the peripheral device, and then performs corresponding initialization configuration on the peripheral device. Specifically, when the electronic device receives an operation for instructing power-on, the master device reads the values stored in the corresponding registers in the slave devices according to the polling sequence and the corresponding relationship. When the value read by the master device is the same as the preset value, the master device recognizes the slave device. When the value read by the master device is different from the preset value, the registers of the next type of corresponding slave devices are read based on the polling order until the slave devices are identified or polled to the last slave device. When polling to the last slave device, the slave device is not identified and the slave device fails to identify.
For example, fig. 5 is a schematic flow chart of a possible design device identification method. As shown in fig. 5, the method includes:
s401, when the electronic equipment receives an operation for indicating startup, the master device reads the numerical value of the register in the slave device based on the model sequence and the corresponding relation.
It will be appreciated that a master device may be compatible with multiple slave devices connected via the SPI bus. And the master device reads the numerical value of the corresponding register in the slave device according to the preset order and the corresponding relation of the model to confirm the model of the slave device.
In the embodiment of the present application, the corresponding relationship is a relationship between a slave device model, a chip id register address, and a preset value. The polling order corresponds to the slave device model.
In a possible implementation, the correspondence may be stored in the master device in the form of a table. Illustratively, the correspondence between the slave device model, the identification register address, and the preset value is shown in table 1.
TABLE 1 table of correspondences
Model number Identifying register addresses Preset value
A 0×00 11
B 0×01 12
As can be seen from table 1, the address of the identification register corresponding to the model a is 0 × 00, that is, the identification register corresponding to the model a is a 0 × 00 register, and the preset value is 11. It is understood that the master device can identify whether the slave device is the a model based on the value corresponding to the slave device 0 × 00 register and the preset value. When the master device is based on the slave device 0 multiplied by 00 register, the corresponding value is 11, the slave device is identified as the A model; when the master device does not have a value of 11 based on the slave device 0 × 00 register, it is recognized that the slave device is not the a model.
The identification register corresponding to the model B is a 0 multiplied by 01 register, namely the identification register corresponding to the model B is a 0 multiplied by 01 register, and the preset value is 12. It is understood that the master device can identify whether the slave device is the B-model based on the value corresponding to the slave device 0 × 01 register and the preset value. When the master device is 12 based on the value corresponding to the 0 x 01 register of the slave device, identifying the slave device as a B model; when the master device does not have a value of 12 based on the slave device 0 × 01 register, it is recognized that the slave device is not the B model.
And S402, when the value read by the master device is the same as the preset value, the master device identifies the slave device.
Adaptively, the master device performs initialization configuration on the slave device after recognizing the slave device.
For example, taking the slave device as a temperature sensor, the master device configures a new value in a register in the temperature sensor, for example, the value is used to indicate the frequency at which the temperature sensor collects the temperature in the environment.
And S403, when the value of the slave device read by the master device is different from the preset value, the master device confirms whether the polling is finished.
When the master device does not poll to the last model of slave device, the master device performs S401. When the master device polls to the last model of slave device, the master device fails to identify the slave device.
Illustratively, taking slave devices compatible and connected with the SPI interface as an a model and a B model as an example, as shown in fig. 6, the identification process is as follows:
s501, when the electronic equipment receives an operation for indicating starting, the master device reads a numerical value of a register in the slave device based on a register address corresponding to the model A.
Illustratively, the master device reads the identification register corresponding to model a, i.e., the 0 × 00 register.
And S502, when the value read by the master device is the same as the preset value corresponding to the model A, the master device identifies that the slave device is the model A.
Adaptively, the master device performs initialization setting on the slave device based on the type A.
And S503, when the value read by the master device is different from the preset value corresponding to the model A, the master device reads the numerical value of the register in the slave device based on the register address corresponding to the model B.
And S504, when the value read by the master device is the same as the preset value corresponding to the B model, the master device identifies that the slave device is the B model.
Adaptively, the master device performs initialization setting on the slave device based on the type B.
And S505, when the value read by the master device is different from the preset value corresponding to the model B, the master device fails to identify the slave device.
The master device reads the numerical value of a corresponding register in the slave device based on the identification register address corresponding to the first slave device model; and when the value read by the master device is the same as the preset value in the corresponding relation, the master device identifies that the slave device is the first slave device model. And when the read value of the master device is different from the preset value in the corresponding relation, the master device reads the numerical value of the corresponding register in the slave device based on the identification register address corresponding to the next model until the slave device is identified or the last slave device is polled. When polling to the last model of slave device, the master device does not recognize the slave device, and the slave device fails to recognize.
However, in the flows shown in fig. 5 and fig. 6, an error may occur when the master device identifies the slave device, so that the slave device cannot be used, the corresponding function of the electronic device cannot be used, and the user experience is poor.
For example, taking the master device compatibly connecting the slave device of model a and the slave device of model B through the SPI interface, the master device may identify the slave device of model B as a slave device of model a. Specifically, when the master device reads the numerical value of the register in the slave device based on the register address corresponding to the model a, the value corresponding to the corresponding register in the slave device of the model B is the same as the preset value corresponding to the model a.
For ease of understanding, a list of registers corresponding to two models in a slave device is given as an example.
TABLE 2 register List
Type number Register address Value of
A 0×00 11
0×01 13
B 0×00 Retention (reserved)
0×01 12
It should be noted that, some registers in the slave device are reserved (reserved) registers, and may be understood as registers that are not disclosed. A reserved (reset) register may be a register that is only used for debugging in the device design development stage; registers, etc. may also be designed for devices that have functions, but the corresponding functions cannot be implemented due to problems in manufacturing processes, etc.
It will be appreciated that the value corresponding to the reserved register may be 1 fixed value, may be a random value, and may correspond to a plurality of fixed values.
The misrecognition process is described below with reference to table 2 and fig. 7. Illustratively, taking the model of the slave device as the model B, and the master device identifies the slave device according to the sequence of the model a and the model B, the identification process includes:
s601, when the electronic equipment receives an operation for indicating startup, the master device reads the numerical value of the register in the slave device based on the register address corresponding to the model A.
Illustratively, the master device reads the identification register corresponding to model a, i.e., the 0 × 00 register.
And S602, when the value fed back by the slave device is the same as the preset value corresponding to the model A, the master device identifies the slave device as the model A.
Adaptively, the master device performs initialization settings based on model a.
For example, when the slave device is the B model, the 0 × 00 register is a reserved register, and the corresponding value may also be 11, so that the value fed back by the slave device is 11, and the master device misidentifies the slave device as the a model, which is the same as the preset value corresponding to the a model.
When the master device performs initialization configuration based on the type a, an initialization configuration error of the slave device may be caused, and the slave device may not operate normally, so that a corresponding function may fail.
In view of this, the embodiments of the present application provide a device identification method, where a master device may read values of two different registers in a slave device to obtain two corresponding values, and verify that the device identification is successful when the two values both meet expectations. Therefore, secondary identification is carried out, the condition that the device misrecognition initialization configuration fails due to the fact that values corresponding to the same address register in slave devices of different models are the same is reduced, and user experience is optimized. In addition, the hardware structure of the electronic equipment is not changed, the cost is friendly, the flexibility of system design is improved, and the stability of product material supply is improved.
The following describes a device identification method provided in an embodiment of the present application with reference to the drawings.
Fig. 8 is a schematic flow chart of a slave device identification method provided in an embodiment of the present application, and as shown in fig. 8, the method includes:
s701, when the electronic equipment is started and initialized, the master device reads the numerical value of a register in the slave device based on the model sequence and the corresponding relation of the slave device to obtain a first value and/or a second value; the corresponding relationship includes a relationship among the slave device model, the first address, the first preset value, the second address, and the second preset value.
It can be understood that, when the electronic device is turned on, the master device switches from a power-off state to a power-on state, and starts to identify the slave device.
In this embodiment of the present application, the first address may be an address corresponding to an identification register corresponding to a slave device of a different model, and the second address may be an address corresponding to a review register corresponding to a slave device of a different model. The identification register is a register for identifying the storage device and is used for distinguishing the model of the device. And the review register is used for verifying the device model.
Illustratively, taking slave device models as a model a and a model B as examples, the address of the identification register corresponding to the model a is 0 × 00, and the first preset value is 11; the address of the review register corresponding to the model A is 0 multiplied by 01, and the second preset value is 12. The address of the identification register corresponding to the type B is a register of 0 multiplied by 01, and the first preset value is 12; the address of the review register corresponding to the type B is 0 multiplied by 02, and the second preset value is 14.
It will be appreciated that one of the registers in the slave device may be identified by an address, which may also be understood as a register number.
In a possible implementation manner, the correspondence relationship may be stored in the master device in a table form. Exemplary, as shown in table 3.
TABLE 3 corresponding relation table
Model number Identifying register addresses First preset value Rechecking the address of a register Second preset value
A 0×00 11 0×01 13
B 0×01 12 0×02 14
It will be appreciated that the master device reads the value of the register in the slave device based on the first address and the second address, resulting in a first value and a second value. In the embodiment of the application, the master device may first read the numerical value of the register in the slave device based on the first address to obtain a first value; the second value may also be obtained by first reading the value of a register in the slave device based on the second address. And is not limited herein.
In this embodiment of the present application, the second addresses corresponding to the slave devices of different types may be the same or different, and this is not limited in this embodiment of the present application.
It is understood that a master device may be compatible with multiple slave devices connected via an SPI bus. And the master device reads the numerical value of the corresponding register in the slave device according to the preset model sequence and the corresponding relation so as to confirm the model of the slave device.
S702, when the first value is the same as the first preset value and the second value is the same as the second preset value, the master device identifies the slave device and performs initialization configuration on the slave device based on the model, and the second value is a fixed value before the master device configures the slave device.
And S703, when the first value is different from the first preset value or the second value is different from the second preset value, the master device confirms whether the polling is finished.
Illustratively, the master confirms whether polling is complete based on the model order. When the master device does not read the value of the register in the slave device based on the last model and the correspondence, polling is not completed, and the master device performs S701 until the slave device is identified or polling is completed. When the master reads the value of the register in the slave based on the last model and the correspondence, the polling is completed and the master fails to identify the slave.
In a possible implementation, the master device configures the slave device based on a preset model when the master device fails to identify the slave device.
In a possible implementation, the master device controls the slave device to reset before reading the value of the register in the slave device based on the model order and the correspondence to obtain the second value.
In summary, the master device verifies by reading the values of two different registers in the slave device. Therefore, the probability that the corresponding values of the same address registers in the slave devices of different models are the same is reduced, and the condition of device misrecognition is reduced. In addition, the hardware structure of the electronic equipment is not changed, the cost is friendly, the flexibility of system design is improved, and the stability of product material supply is improved.
The following describes a method for identifying devices during the power-on initialization process of the electronic device with reference to fig. 9. Illustratively, as shown in FIG. 9,
s801, when the electronic equipment receives an operation for indicating startup, the master device reads the numerical value of the register in the slave device based on the identification register address corresponding to the model A to obtain a first value corresponding to the model A.
It will be appreciated that the master device is connected to a plurality of slave devices via the SPI bus. And the master device confirms the model of the slave device in a polling mode according to the preset polling sequence and the corresponding relation. The corresponding relation is the relation among the slave device model, the identification register address, the first preset value, the rechecking register address and the second preset value. The polling order corresponds to the slave device model.
In a possible implementation, the correspondence may be stored in the master device in the form of a table. For example, the correspondence relationship between the slave device model, the identification register address, the first preset value, the review register address, and the second preset value may be as shown in table 3 above.
As can be seen from table 3, the address of the identification register corresponding to the model a is 0 × 00, and the first preset value is 11; the address of the review register corresponding to the model A is 0 multiplied by 01, and the second preset value is 12. The address of the identification register corresponding to the type B is a register of 0 multiplied by 01, and the first preset value is 12; the address of the review register corresponding to the type B is 0 multiplied by 02, and the second preset value is 14.
It will be appreciated that when the master reads the value of the slave's 0 x 00 register, resulting in a first value of 11, and the master reads the value of the slave's 0 x 01 register, resulting in a second value of 13, the slave is type a. When the master device reads the value of the slave device's 0 x 01 register, the resulting first value is 12, and the master device reads the value of the slave device's 0 x 02 register, the resulting second value is 14, the slave device is type B.
In the embodiment of the present application, a double check register is different from the flag register. The address corresponding to the double check register is different from the address corresponding to the identification register.
In this embodiment of the present application, addresses of review registers corresponding to slave devices of different types may be the same or different, and this is not limited in this embodiment of the present application.
In a possible implementation manner, addresses of the review registers corresponding to the slave devices of different models are the same, and corresponding second preset values are different.
Therefore, the addresses of the rechecking registers are the same, and the master device reads the registers once, so that the slave devices with different models can be distinguished. In addition, the risk of misidentification can be reduced.
In this embodiment of the present application, the double check register may be a register that is stable after being powered on, and may also be an unstable register.
It will be appreciated that the unstable register may be a reserved register, a register whose value is modified, etc.
Some registers may be read and written during the device operation, resulting in the modification of the corresponding values of the registers. The register may be a register for data output, a register for indicating mode switching, a register for indicating an abnormal situation, and the like.
For example, taking a temperature sensor as an example, the unstable register may be: a register for storing the detected temperature, an undisclosed reserved register, etc.
The stable register may be: and the register with unmodified value, such as a control register with fixed report value and not subjected to read-write operation in the use process of the slave device, and the like.
For example, taking a temperature sensor as an example, the stable register may be: the interrupt control register is used for controlling the enabling of an interrupt function, the interrupt control register is not operated by the processor, and the register value is expected to be fixed after the temperature sensor is electrified and stabilized.
In a possible implementation, the double check register is a register that is stable after power-on. Therefore, the condition of identification failure caused by changing the value in the register can be reduced, and the success rate of identification is improved.
In a possible implementation, the review register is a non-zero register. It will be appreciated that most registers have a register predicate value of 0 after power-on reset, and that register exception predicates typically 0. Therefore, the non-zero register is selected, so that false recognition can be further reduced, and the stability of the embodiment of the application is improved.
In a possible implementation manner, the review register is a register with a fixed and non-zero report value after being powered on. Therefore, the condition of identification failure caused by the change of the value in the register can be reduced, and the success rate of identification is improved.
S802, when the first value corresponding to the model A is the same as the first preset value corresponding to the model A, the main device reads the numerical value of the register in the slave device based on the address of the rechecking register corresponding to the model A to obtain a second value corresponding to the model A.
And S803, when the second value corresponding to the model A is the same as the second preset value corresponding to the model A, the master device identifies that the slave device is the model A.
Adaptively, the master configures the slave based on model a.
S804, when the first value corresponding to the model A is different from the first preset value corresponding to the model A, or the second value corresponding to the model A is different from the second preset value corresponding to the model A, the master device confirms whether the polling is finished or not.
And when the model A is not the last model, the polling is not finished, and the master device reads the numerical value of the register in the slave device based on the identification register address corresponding to the model B to obtain a first value corresponding to the model B.
When the a model is the last model, the master device fails to recognize the slave device.
In summary, when a slave device is identified based on the first slave device model, the values of two different registers in the slave device are read for verification. Therefore, the probability that the corresponding values of the same address registers in the slave devices of different models are the same is reduced, and the situation of device misrecognition is reduced.
On the basis of the above embodiment, the method further includes S805. And S805, before the master device reads the numerical value of the register in the slave device based on the address of the rechecking register, the master device controls the slave device to reset.
It should be noted that, during the use of the electronic device, the corresponding values of some registers in the slave device may change. For example, in the case of a slave device as a temperature sensor, a register for storing the detected temperature may be rewritten a plurality of times to store the last detected temperature. Taking the default value of 20 and the detected temperature of 30 as an example, the value corresponding to the register for storing the detected temperature may be rewritten from 20 to 30.
Thus, the slave device is reset to restore the value of the slave device register to the default value, so that the failure of recognition or false recognition caused by the condition that the value corresponding to the check register is rewritten can be reduced.
On the basis of the above embodiment, the method further includes S806. And S806, when the master device fails to identify the slave device, configuring the slave device based on the preset model. In this way, the master device may successfully configure the slave device based on the preset model, so that the slave device may normally operate, thereby implementing the function of the electronic device.
In a possible implementation manner, the preset model may be a model corresponding to a slave device that is used for the most times in the electronic device. In this way, the likelihood of a master device successfully configuring a slave device is increased.
Based on the above embodiments, the master device may verify the model of the slave device based on the identification register address and/or the recheck register address multiple times. In this way, misrecognition is further reduced.
It can be understood that, in the above-described flow shown in fig. 9, the slave devices whose SPI interfaces are compatible with the types a and B are only examples, and in practical applications, the SPI interfaces may also be compatible with more types of slave devices.
In the above embodiment, the slave devices compatible with the SPI interface may be the same type of slave devices with different models, or may be different types of slave devices. The embodiments of the present application do not limit this.
It should be noted that, when the electronic device is turned on or restarted, the master device is switched from the power-off state to the power-on state, and the master device needs to identify and configure the slave device. The master device also needs to identify and configure the slave device when the slave device switches from a powered down state to a powered up state.
The method provided by the embodiment of the application can be also suitable for the situation that the slave device is switched from the power-down state to the power-up state, and can also be suitable for the process of power-up after the power-down of the slave device. For example, a problem with the software system of the electronic device results in power-up after power-down from the device, or latch-up (land-up) from the device results in power-up after power-down from the device.
The device identification method of the embodiment of the present application has been described above, and the following describes a related apparatus for performing the device identification method provided by the embodiment of the present application. Those skilled in the art will appreciate that the methods and apparatus may be combined and referred to, and that the apparatus provided in the embodiments of the present application may perform the steps of the device identification methods described above.
The embodiment of the application also provides a computer readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media may include computer storage media and communication media, and may include any medium that can communicate a computer program from one place to another. A storage medium may be any target medium that can be accessed by a computer.
In one possible implementation, the computer-readable medium may include RAM, ROM, a compact disk read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes disc, laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above embodiments are only for illustrating the embodiments of the present invention and are not to be construed as limiting the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the embodiments of the present invention shall be included in the scope of the present invention.

Claims (15)

1. A device identification method is applied to electronic equipment, the electronic equipment comprises a master device and a slave device, the master device is connected with the slave device through a Serial Peripheral Interface (SPI) bus, the master device stores a corresponding relation, the corresponding relation comprises the relations among slave device models, first addresses, first preset values, second addresses and second preset values, any slave device model in the corresponding relation corresponds to one first address, one first preset value, one second address and one second preset value, and the method comprises the following steps:
the master device reads the numerical value of the register in the slave device based on the model of the first slave device and the corresponding relation to obtain a first value corresponding to the model of the first slave device and a second value corresponding to the model of the first slave device;
when the master device determines that the first value is the same as a first preset value corresponding to the first slave device model and the second value is the same as a second preset value corresponding to the first slave device model, the master device configures the slave device based on the first slave device model;
before the master device configures the slave device based on the first slave device model, a third value is a fixed value, and the third value is a numerical value of a register corresponding to a second address corresponding to the first slave device model in the slave device.
2. The method of claim 1, wherein the master device reads the value of the register in the slave device based on a first slave device model and the corresponding relationship to obtain a first value corresponding to the first slave device model and a second value corresponding to the first slave device model, and the method comprises:
the master device reads the numerical value of the register in the slave device based on the first address corresponding to the first slave device model to obtain the first value;
and the master device reads the numerical value of the register in the slave device based on a second address corresponding to the first slave device model to obtain the second value.
3. The method of claim 2, wherein the master device reads the value of the register in the slave device based on a second address corresponding to the first slave device model to obtain the second value, and the method comprises:
and when the master device determines that the first value is the same as a first preset value corresponding to the first slave device model, the master device reads the numerical value of the register in the slave device based on a second address corresponding to the first slave device model to obtain a second value.
4. The method according to any one of claims 1-3, further comprising:
when the master device determines that the first value is different from a first preset value corresponding to the first slave device model, or the master device determines that the second value is different from a second preset value corresponding to the first slave device model, the master device reads a value of a register in the slave device based on a second slave device model and the corresponding relation.
5. The method of claim 4, further comprising:
when the value of a register in the slave device read by the master device based on the second slave device model and the corresponding relation is different from a first preset value corresponding to the second slave device model, the master device configures the slave device based on a preset model, wherein the preset model is any slave device model in the corresponding relation;
or, when the value of the register in the slave device read by the master device based on the second slave device model and the corresponding relation is different from a second preset value corresponding to the second model, the master device configures the slave device based on the preset model.
6. The method of any of claims 1-5, wherein the master device configuring the slave device based on the first slave device model comprises:
and the master device writes the adjustment parameter corresponding to the first slave device model into a register of the slave device.
7. The method of any of claims 2-5, wherein before the master device reads the value of the register in the slave device based on the second address corresponding to the first slave device model, the method further comprises:
the master device controls the slave device to reset.
8. The method according to any of claims 1-7, characterized in that the fixed value is not zero.
9. The method according to any of claims 1-8, wherein the register to which the second address corresponds comprises: and the control register with a fixed read value and not subjected to read-write operation.
10. The method according to any one of claims 1 to 9, wherein before the master device reads the value of the register in the slave device based on the first slave device model and the correspondence, the method comprises:
the main device is switched from a second state to a first state, the second state is a power-off state, and the first state is a power-on state;
alternatively, the master device detects that the slave device switches from the second state to the first state.
11. The method according to any one of claims 1-10, wherein the correspondence is stored in the master device in a table form.
12. The method of any of claims 1-11, wherein the master device includes, but is not limited to: a processor CPU or system on chip SOC, a microcontroller MCU, a microprocessor MPU or a programmable system on chip SOPC;
the slave devices include, but are not limited to: the mobile phone comprises a sensor, a battery, an antenna, a mobile communication module, a wireless communication module, an audio module, a loudspeaker, a receiver, a microphone, an earphone, a key, a motor, an indicator, a camera, a display screen and a user identification module.
13. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executing the computer-executable instructions stored by the memory causes the processor to perform the method of any of claims 1-12.
14. A computer-readable storage medium, in which a computer program or instructions are stored which, when executed, implement the method of any one of claims 1-12.
15. A computer program product comprising a computer program or instructions for implementing the method of any one of claims 1-12 when executed by a processor.
CN202210380036.1A 2022-04-12 2022-04-12 Device identification method and related device Active CN114780029B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202310481771.6A CN116909474B (en) 2022-04-12 Device identification method and related device
CN202210380036.1A CN114780029B (en) 2022-04-12 2022-04-12 Device identification method and related device
PCT/CN2023/071238 WO2023197709A1 (en) 2022-04-12 2023-01-09 Device identification method and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210380036.1A CN114780029B (en) 2022-04-12 2022-04-12 Device identification method and related device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310481771.6A Division CN116909474B (en) 2022-04-12 Device identification method and related device

Publications (2)

Publication Number Publication Date
CN114780029A true CN114780029A (en) 2022-07-22
CN114780029B CN114780029B (en) 2023-05-09

Family

ID=82429638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210380036.1A Active CN114780029B (en) 2022-04-12 2022-04-12 Device identification method and related device

Country Status (2)

Country Link
CN (1) CN114780029B (en)
WO (1) WO2023197709A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023197709A1 (en) * 2022-04-12 2023-10-19 荣耀终端有限公司 Device identification method and related apparatus

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4313162A (en) * 1979-12-14 1982-01-26 Burroughs Corporation I/O Subsystem using data link processors
US5938742A (en) * 1995-08-18 1999-08-17 General Magic, Inc. Method for configuring an intelligent low power serial bus
CN201063161Y (en) * 2007-06-08 2008-05-21 威盛电子股份有限公司 Primary device for serial peripheral interface
US7425843B1 (en) * 2007-08-07 2008-09-16 Xilinx, Inc. Programmable logic device multi-boot state machine for serial peripheral interface (SPI) programmable read only memory (PROM)
EP0901081B1 (en) * 1997-07-08 2010-04-07 Texas Instruments Inc. A digital signal processor with peripheral devices and external interfaces
CN102263634A (en) * 2010-05-27 2011-11-30 罗伯特·博世有限公司 Peripheral unit, control unit for the exchange of data with a peripheral unit, and method for data exchange
US8596529B1 (en) * 2001-03-26 2013-12-03 Usa Technologies, Inc. Interactive interface effectuated vending
WO2014209415A1 (en) * 2013-06-27 2014-12-31 Microsoft Corporation Broker for evaluating application requests to access peripheral devices
CN105388805A (en) * 2015-11-01 2016-03-09 四川泛华航空仪表电器有限公司 SPI (Serial Peripheral Interface) bus-based measurement control system
US20160093394A1 (en) * 2014-09-26 2016-03-31 Ju Seok Lee Storage device and operating method of storage device
CN108052094A (en) * 2017-12-20 2018-05-18 深圳市英威腾电气股份有限公司 A kind of extension card identification method, device and frequency converter
US10360164B1 (en) * 2018-01-19 2019-07-23 Microchip Technology Incorporated Direct memory access adapter
US20210117151A1 (en) * 2019-10-16 2021-04-22 Samsung Electronics Co., Ltd. Electronic device and method for sharing voice command thereof

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4463658B2 (en) * 2004-10-28 2010-05-19 日本電産サンキョー株式会社 Subordinate apparatus of information processing system, operation control program for subordinate apparatus, and operation control method for subordinate apparatus
CN100472440C (en) * 2005-11-09 2009-03-25 中兴通讯股份有限公司 A method for hardware drive program of intelligent loading mobile phone
US8825908B2 (en) * 2010-06-15 2014-09-02 Intel Mobile Communications GmbH Method of identifying devices on a bus and apparatus
KR102224156B1 (en) * 2014-04-02 2021-03-08 엘지전자 주식회사 Mobile terminal and method for controlling the same
CN106982246A (en) * 2017-02-21 2017-07-25 普奥云信息科技(北京)有限公司 Smart machine
CN110958602A (en) * 2019-11-14 2020-04-03 深圳奇未智能科技有限公司 Firmware compatibility method and device for Bluetooth equipment
CN114780029B (en) * 2022-04-12 2023-05-09 荣耀终端有限公司 Device identification method and related device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4313162A (en) * 1979-12-14 1982-01-26 Burroughs Corporation I/O Subsystem using data link processors
US5938742A (en) * 1995-08-18 1999-08-17 General Magic, Inc. Method for configuring an intelligent low power serial bus
EP0901081B1 (en) * 1997-07-08 2010-04-07 Texas Instruments Inc. A digital signal processor with peripheral devices and external interfaces
US8596529B1 (en) * 2001-03-26 2013-12-03 Usa Technologies, Inc. Interactive interface effectuated vending
CN201063161Y (en) * 2007-06-08 2008-05-21 威盛电子股份有限公司 Primary device for serial peripheral interface
US7425843B1 (en) * 2007-08-07 2008-09-16 Xilinx, Inc. Programmable logic device multi-boot state machine for serial peripheral interface (SPI) programmable read only memory (PROM)
CN102263634A (en) * 2010-05-27 2011-11-30 罗伯特·博世有限公司 Peripheral unit, control unit for the exchange of data with a peripheral unit, and method for data exchange
WO2014209415A1 (en) * 2013-06-27 2014-12-31 Microsoft Corporation Broker for evaluating application requests to access peripheral devices
US20160093394A1 (en) * 2014-09-26 2016-03-31 Ju Seok Lee Storage device and operating method of storage device
CN105388805A (en) * 2015-11-01 2016-03-09 四川泛华航空仪表电器有限公司 SPI (Serial Peripheral Interface) bus-based measurement control system
CN108052094A (en) * 2017-12-20 2018-05-18 深圳市英威腾电气股份有限公司 A kind of extension card identification method, device and frequency converter
US10360164B1 (en) * 2018-01-19 2019-07-23 Microchip Technology Incorporated Direct memory access adapter
US20210117151A1 (en) * 2019-10-16 2021-04-22 Samsung Electronics Co., Ltd. Electronic device and method for sharing voice command thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张连举等: "数字视频控制芯片的设计", 《电视技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023197709A1 (en) * 2022-04-12 2023-10-19 荣耀终端有限公司 Device identification method and related apparatus

Also Published As

Publication number Publication date
CN114780029B (en) 2023-05-09
CN116909474A (en) 2023-10-20
WO2023197709A1 (en) 2023-10-19

Similar Documents

Publication Publication Date Title
US20210084595A1 (en) Electronic device and power saving method thereof
CN110347269B (en) Empty mouse mode realization method and related equipment
EP2955907B1 (en) Wearable electronic device, system and control method
CN113498124B (en) SIM card and eSIM card switching method and electronic equipment
CN110515646B (en) Differential upgrading method and related equipment
CN112468979B (en) SIM card drop recovery method of electronic equipment and electronic equipment
CN112751954B (en) Operation prompting method and electronic equipment
CN111262975A (en) Bright screen control method and electronic equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN112529564A (en) Method and electronic equipment for near field wireless communication
CN112214294B (en) Method for calling hardware interface and electronic equipment
CN115589051B (en) Charging method and terminal equipment
CN110658975A (en) Mobile terminal control method and device
CN114995715B (en) Control method of floating ball and related device
CN113728295A (en) Screen control method, device, equipment and storage medium
CN113472861B (en) File transmission method and electronic equipment
CN114780029B (en) Device identification method and related device
CN114077519B (en) System service recovery method and device and electronic equipment
CN113901485B (en) Application program loading method, electronic device and storage medium
CN113407300B (en) Application false killing evaluation method and related equipment
CN116909474B (en) Device identification method and related device
CN110806994B (en) Signal transmission method and device
CN117130959B (en) Bus control method, electronic device and computer storage medium
CN115906033A (en) Voiceprint authentication response method and system and electronic equipment
CN115016666A (en) Touch processing method, terminal device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant