CN114780029B - Device identification method and related device - Google Patents

Device identification method and related device Download PDF

Info

Publication number
CN114780029B
CN114780029B CN202210380036.1A CN202210380036A CN114780029B CN 114780029 B CN114780029 B CN 114780029B CN 202210380036 A CN202210380036 A CN 202210380036A CN 114780029 B CN114780029 B CN 114780029B
Authority
CN
China
Prior art keywords
slave device
model
value
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.)
Active
Application number
CN202210380036.1A
Other languages
Chinese (zh)
Other versions
CN114780029A (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/CN116909474A/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

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 which stores a corresponding relation, and a slave device which is connected with the master device through an SPI bus, wherein 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 the value of a register in the slave device based on the slave device model and the corresponding relation to obtain a first value and a second value corresponding to the first slave device model; 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 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, the value of a register corresponding to a second address corresponding to the model of the first slave device in the slave device is a fixed value. And performing verification and identification twice based on the two addresses, so that device model misidentification caused by the fact that the values of registers of the same address are the same is reduced, and 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 (serial peripheral interface, SPI) bus system is a synchronous serial peripheral interface that is widely used in products such as integrated circuits and electronic devices. Illustratively, a processor (CPU) in the electronic device may communicate with the peripheral device in a serial fashion through an SPI interface to exchange information, thereby obtaining information from or controlling the peripheral device to implement one or more functions of the electronic device. Peripheral devices include, but are not limited to: touch panels, sensors or displays, etc.
At present, a processor (CPU) in an electronic device can be compatibly connected with peripheral devices of a plurality of types through a group of SPI interfaces, so that the multiplexing rate of the SPI interfaces is improved. 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 identification process, misidentification may occur, so that the slave device is configured incorrectly in an initialization manner, and the peripheral device cannot be used, thereby deteriorating 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 the numerical values of two different registers in a slave device based on an identification register address and an additional register address, so as to obtain corresponding two values for verification. Device identification was successful when both values were expected. Therefore, secondary identification is performed, the situation that the device model is misidentified due to the fact that the corresponding values of the registers with the same addresses in the slave devices with different models are the same is reduced, and then the slave device configuration failure is initialized, and user experience is optimized. In addition, the embodiment of the application does not change the hardware structure of the electronic equipment, is friendly in cost, improves the flexibility of system design, and improves the stability of product material supply.
In a first aspect, embodiments of the present application provide a device identification method. The method is applied to electronic equipment, the electronic equipment comprises a master device and slave devices, the master device is connected with the slave devices through a serial peripheral interface SPI bus, the master device stores corresponding relations, the corresponding relations comprise relations among slave device models, first addresses, first preset values, second addresses and second preset values, and any slave device model in the corresponding relations corresponds to one first address, one first preset value, one second address and one second preset value.
The device identification method comprises the following steps: the master device reads the numerical value of a 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 corresponding to the first slave device model is the same as the first preset value corresponding to the first slave device model, and the second value corresponding to the first slave device model is the same as the 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, the third value is a fixed value, and the third value is a value of a value register of a register corresponding to a 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 of a review register. Therefore, the device model misidentification caused by the fact that the corresponding values of the registers with the same addresses in the slave devices with different models are the same can be reduced by performing verification identification twice based on the two register addresses, the situation that the slave devices are failed in configuration is reduced, and user experience is optimized. In addition, the embodiment of the application does not change the hardware structure of the electronic equipment, is friendly in cost, improves the flexibility of system design, and improves the stability of product material supply.
Optionally, the master device reads the value of the register in the slave device based on the model and the corresponding relation of the first slave device, and obtains 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, including: 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 first slave device model to obtain a second value.
Optionally, the master device reads a value of a register in the slave device based on a second type address corresponding to the model of the first slave device, to obtain a second value, including: 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 value of a 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 the second value. Therefore, when the first value is different from the first preset value, the second value does not need to be judged, and calculation resources are saved.
Optionally, the method further comprises: when the master device determines that the first value is inconsistent with a first preset value corresponding to the first slave device model, or the master device determines that the second value is inconsistent with a second 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 the second slave device model and the corresponding relation.
In this way, the model of the slave device can 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, and the preset model is any slave device model in the corresponding relationship.
In this way, the master device may successfully configure the slave device based on the preset model, so that the slave device can operate normally, and the probability of the master device successfully configuring the slave device is improved.
Optionally, the master device configures the slave device based on the first slave device model, including: and the master device writes the adjustment parameters corresponding to the model of the first slave device into a register of the slave device.
In this way, the adjustment parameters corresponding to the first slave device model are written into the register of the slave device, so that the slave device operates based on the adjustment parameters.
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 reset.
In this way, the reset from the device restores the value of the register in the slave device to the default value, so that the recognition failure or the false recognition caused by the condition that the value corresponding to the review register is rewritten and the like can be reduced.
Alternatively, the fixed value is not zero.
It will be appreciated that the register report value is 0 after a power-on reset of most registers, and that the register exception report value is typically 0. Thus, the selection of the non-zero register can further reduce misrecognition and improve the stability of the embodiment of the application.
Optionally, the register corresponding to the second type of address includes: and a control register with a fixed read value and which is not subjected to read-write operation.
Thus, the situation of recognition failure caused by the change of the value in the register can be reduced, and the success rate of recognition is improved.
Optionally, before the master device reads the value of the register in the slave device based on the first slave device model and the correspondence relationship, the method includes: the main device is switched from a second state to a first state, the second state is a power-down state, and the first state is a power-up state; alternatively, the master device detects that the slave device switches from the second state to the first state.
Optionally, the correspondence is stored in the master device in the form of a table.
Alternatively, the master device includes, but is not limited to: a processor CPU or a 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 communication system 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, keys, a motor, an indicator, a camera, a display screen and a user identification module.
The device identification method can be suitable for various master devices and slave devices, and has wide application range.
Optionally, the preset model may be a model corresponding to the slave device with the largest number of times of use in the electronic device. In this way, the likelihood of the master device successfully configuring the slave device is increased.
Optionally, the master device verifies the model number of the slave device based on the first type address and/or the second type address multiple times. In this way, the false recognition situation 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, where the terminal device may be: a cell phone, tablet, laptop, personal digital assistant (personal digitalassistant, PDA), mobile internet appliance (mobile internet device, MID), wearable device, consumer electronics, notebook, desktop, automobile, industrial control robot, industrial electronic equipment, or the like.
An electronic device includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to cause the processor to perform the method of the first aspect described above.
The advantages of the electronic device according to the second aspect and the possible designs of the second aspect may be referred to the advantages brought by the possible structures of the first aspect and the first aspect, and are not described herein.
In a third aspect, embodiments of the present application provide a computer readable storage medium having stored therein a computer program or instructions which, when executed, implement the method of the first aspect described above.
The advantages of the third aspect and the computer readable storage medium provided in each possible design of the third aspect may be referred to the advantages brought by each possible structure of the first aspect and the first aspect, and are not described herein.
In a fourth aspect, embodiments of the present application provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement the method of the first aspect described above.
The advantages of the computer program product provided in the fourth aspect and in the possible designs of the fourth aspect may be referred to as the advantages brought by the possible structures of the first aspect and the first aspect, and are not described herein.
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 diagram of a slave device structure according to an embodiment of the present application;
fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
FIG. 5 is a flow chart of a device identification method in a possible design;
FIG. 6 is a flow chart of a device identification method in a possible design;
FIG. 7 is a schematic flow chart of a device misrecognition in a possible design;
fig. 8 is a schematic flow chart of a device identification method according to an embodiment of the present application;
fig. 9 is a schematic flow chart of a device identification method according to an embodiment of the present application.
Detailed Description
In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first device and the second device are merely for distinguishing between different devices, and are not limited in their order of precedence. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
In this application, the terms "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
It should be noted that, the network architecture and the service scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application, and those skilled in the art can know that, with the evolution of the network architecture and the appearance of the new service scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
It is understood that the term "plurality" herein refers to two or more. The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship; in the formula, the character "/" indicates that the front and rear associated objects are a "division" relationship.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present application are merely for ease of description and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiments of the present application, the sequence number of each process described above does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not constitute any limitation on the implementation process of the embodiments of the present application.
For ease of understanding, the description of the concepts related to the embodiments of the present application is given in part by way of example for reference.
1. SPI bus: a high-speed full duplex synchronous serial communication interface, SPI bus, may enable a processor to communicate with various peripheral devices in a serial fashion to exchange data. The data transfer rate is faster than other serial interfaces, such as an asynchronous data transceiver interface (universal asynchronous receiver/transmitter, UART) or an inter-integrated circuit (I2C) bus, which can reach around 10 megabits per second (megabits per second, mbps).
The SPI bus operates in a master-slave manner, and a master device may be connected to one or more slave devices through the SPI bus. Illustratively, the processor may be connected to one or more slave devices in a sensor, touch panel, display screen, etc. through an SPI bus.
It should be noted that, during the communication process of 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 does not feed back a message to the master indicating receipt of the request.
In one possible design, the SPI bus includes 4 transmission lines, namely, a Serial Clock Line (SCLK), a master in/slave out data line (MISO), a master out/slave in data line (MOSI), and a low active slave select line (CS).
MISO is the data input of the main device, the data output of the slave device; MISO may also be referred to as SOMI or SDO, etc. MOSI is the data output of the main device, and the data input of the auxiliary device; MOSI may also be referred to as SIMO or SDO, etc. SCLK is the clock signal, generated by the master device; CS is an enabling signal of the slave device, and is controlled by the master device; CS may also be referred to as SS or SSEL, etc. The embodiments of the present application are not limited in this regard.
In a second possible design, the SPI bus includes 3 transmission lines, namely a Serial Clock Line (SCLK), a master output/master input data line (MOMI), and an active low slave select line (CS).
MOMI may also be referred to as SISO. SCLK is the clock signal, generated by the master device; CS is an enabling signal of the slave device, and is controlled by the master device; CS may also be referred to as SS or SSEL, etc. The embodiments of the present application are not limited in this regard.
It will be appreciated that in both of the above possible designs, the SPI bus may omit the CS transmission line and connect the pin used to connect the CS transmission line to ground.
In this embodiment, the master device may connect to the slave devices through a four-wire SPI interface (as shown by a and b in fig. 1), and may also connect to the slave devices through a three-wire SPI interface (as shown by c and d in fig. 1). In the embodiment of the application, the master device may also connect 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 connects the slave devices through a set 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 of the group of SPI interfaces corresponding to the connected slave devices is in an enabled state at the same time, and may be enabled.
It will be appreciated that a group of SPI interfaces may reserve multiple slave device locations for connection to multiple slave devices, or may reserve a slave device location for connection to a slave device (possibly of a different model but packaged identical slave devices attached to that location).
It should be noted that, the master device may be compatible with slave device connections of the same type and different types through the SPI interface, and may also be compatible with slave device connections of different types. Therefore, the availability of product materials can be improved, and the interface multiplexing rate is improved.
It can be appreciated that, due to differences in device principles, internal structures, software implementation and the like in devices of different models, when the SPI interface is compatible with multiple slave device connections, 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. Poll (polling): is a way for a master device to decide how to provide slave services. Specifically, the master device sends out an inquiry, and the slave device is identified according to the possible model of the slave device; if the master device identifies the slave device based on the first slave device model, initializing configuration is carried out based on the first slave device model; if the slave device is not identified based on the first slave device model, the slave device is identified based on the second slave device model, and then the process is repeated until the slave device is identified or the slave device is identified based on the last model. Polling may also be referred to as "programmed input output" (programmed I/O).
In the embodiment of the application, the master device sends out an inquiry to the slave devices according to the sequence of the prestored 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): refers to the process that when the device is powered up for the first time or powered down, the registers in the device return to the initial state. For example, when the electronic device is started up, both the master device and the slave device may be in an initial state, and work from the initial state.
The application scenario of the embodiments of the present application is described below with reference to the accompanying drawings.
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 configured to obtain data of the slave device 102 through the SPI bus and/or control the slave device 102, so as to implement one or more functions of the electronic apparatus. Illustratively, taking a master device as a CPU and a slave device as a temperature sensor as an example, the CPU obtains the temperature detected by the temperature sensor through an SPI bus and executes a temperature processing policy based on the temperature. The CPU can also adjust the detection frequency of the temperature sensor through the SPI bus.
In the embodiment of the application, the master device 101 can be compatible with slave device connection of multiple models through the SPI bus. And the slave devices of different models have differences in the device principle, internal structure, software implementation and the like. Therefore, after the master device is powered up or the slave device is powered up, the master device needs to identify the model of the slave device so as to perform initialization configuration on the slave device, thereby realizing one or more functions of the electronic device.
Specifically, the master device 101 may read or rewrite the value of the register in the slave device 102 through the SPI bus, so as to implement identification of the model of the slave device 102, acquisition of data, control, and the like.
For ease of understanding, the structure of the slave device 102 is described below in connection with fig. 3.
A plurality of registers are included in slave device 102. The registers include, but are not limited to, control class registers, status class registers, functional class registers, and identification registers.
A control class register for controlling and determining the operation mode of the slave device, the characteristics of the operation of the slave device, and the like.
The status register is used for storing two types of information: one type of information is various state information (condition codes) showing the execution result of the instruction, such as carry (CF bit), overflow (OV bit), result positive and negative (SF bit), result zero (ZF bit), parity flag bit (P bit) and the like; another type of information is control information, such as interrupt enable (IF bit), tracking flag (TF bit), etc.
The function class register is used for storing control commands, states or data of corresponding functional components.
The identification register is used for storing device identifications so as to facilitate the master device to distinguish the types of the slave devices.
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 01 register, 02 register, 03 register, and so on. Taking a slave device as a temperature sensor as an example, the 01 register can be a state register for storing state information of whether the temperature is abnormal or not; the 02 register can be a control type register used for storing the detected frequency; the 03 register may be an identification register for storing device identifications. The slave device shown in fig. 3 may further include a functional class register for storing the sensed temperature.
Furthermore, the number of registers corresponding to different models of slave devices may be different. Registers corresponding to the same address may be different. Illustratively, the 01 register in FIG. 3 may be an identification register for storing device identifications. The 02 register can be a state type 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 frequency of detection. The embodiment of the application does not limit the specific function of the register in the slave device and the address of the register corresponding to each function.
In the embodiment of the present application, the master device 101 may be a processor (central processing unit, CPU), a System On Chip (SOC), a microcontroller (micro control unit, MCU), a Microprocessor (MPU), a programmable system on chip (SOPC), or the like in an electronic apparatus.
Slave device 102 may be a peripheral device in an electronic device. The peripheral device may be specifically described with reference to the following hardware architecture of the electronic device in fig. 4, which is not described herein.
Fig. 4 is a schematic 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 (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a user identification module (subscriberidentification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity 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 structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processingunit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in 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 the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C or IIC) interface, a serial peripheral interface (serial peripheral interface, SPI), an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The SPI interface is a high-speed synchronous serial communication bus, and specific structure can be referred to in the description of the related concepts. In some embodiments, processor 110 may contain multiple sets of SPI buses. The processor 110 may be coupled to peripheral devices such as a temperature sensor 180J, a charger, a flash, a camera 193, etc. through different SPI bus interfaces, respectively. For example: the processor 110 may be coupled to the temperature sensor 180J through an SPI interface, so that the processor 110 and the temperature sensor 180J communicate through an SPI bus interface, and the electronic device 100 executes a temperature processing policy based on the temperature detected by the temperature sensor 180J, thereby implementing a temperature adjustment function.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain 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 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a 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 for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically 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 an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (displayserial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or 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, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically 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 transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is illustrative, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger.
The power management module 141 is used for connecting the battery 142, and the charge 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 to power 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 configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may 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. Antennas in electronic device 100 may be used to cover single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wirelesslocal area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used for displaying images, displaying videos, receiving sliding operations, and the like. The display 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to naked eyes. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. In some embodiments, 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 other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
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 enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. 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 (universal flash storage, UFS), and the like. The processor 110 performs 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 through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. 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 a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to 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, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may 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 is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. 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 touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding 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 cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are 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 may be detected when the electronic device 100 is stationary. The method can also be used for identifying the gesture 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, the electronic device 100 may range using the distance sensor 180F to achieve quick 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 outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as 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 for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may parse out a voice signal based on the vibration signal of the vocal part vibration bone piece obtained by the bone conduction sensor 180M, and implement a voice function. The application processor can analyze heart rate information based on the blood pressure beat signals acquired by the bone conduction sensor 180M, so that a heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. 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 Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: 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, a charge 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 key 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriberidentification module, SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity 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 interface. The electronic device comprises a terminal device. The 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, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), 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), or the like.
By way of example, and not limitation, in embodiments of the present application, the terminal device may also be a wearable device. The wearable device can also be called as a wearable intelligent device, and is a generic name for intelligently designing daily wear by applying wearable technology and developing wearable devices, such as glasses, gloves, watches, clothes, shoes and the like. The 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 can realize a powerful function through software support, data interaction and cloud interaction. The generalized wearable intelligent device includes full functionality, large size, and may not rely on the smart phone to implement complete or partial functionality, such as: smart watches or smart glasses, etc., and focus on only certain types of application functions, and need to be used in combination with other devices, such as smart phones, for example, various smart bracelets, smart jewelry, etc. for physical sign monitoring.
In addition, in the embodiment of the application, the terminal device may also be a terminal device in an internet of things (internet of things, ioT) system, and the IoT is an important component of future information technology development, and the main technical characteristic of the terminal device is that the article is connected with a network through a communication technology, so that an intelligent network for man-machine interconnection and internet of things interconnection is realized.
The embodiment of the application does not limit the specific technology and the specific equipment form adopted by the terminal equipment.
When the electronic equipment receives the operation for indicating the start-up, a processor in the electronic equipment needs to identify the type of the 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, and further corresponding functions of the electronic equipment are realized.
In a possible design, the processor reads the device identifier (chip id) of the peripheral device in a polling manner to identify the model of the peripheral device, and then performs corresponding initialization configuration on the peripheral device. Specifically, when the electronic device receives an operation for indicating start-up, the master device polling order and the correspondence relation read the values stored in the corresponding registers in the slave devices. When the value read by the master device is the same as the preset value, the master device recognizes the slave device. When the master device reads a value 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 device is identified or polled to the last slave device. When the last slave is polled, no slave is identified, and the slave fails to identify.
By way of example, fig. 5 is a flow chart of a method of device identification in a possible design. As shown in fig. 5, the method includes:
s401, when the electronic equipment receives an operation for indicating start-up, the master device reads the numerical value of a register in the slave device based on the model order and the corresponding relation.
It will be appreciated that a master device may be compatible with multiple slave device connections via the SPI bus. The master device reads the values of the corresponding registers in the slave devices according to the order and the corresponding relation of the preset models so as to confirm the models of the slave devices.
In the embodiment of the present application, the correspondence is a relationship among a slave device model, an identification (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. The correspondence between the slave device model, the identification register address, and the preset value is shown in table 1, for example.
Table 1 correspondence table
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 a model is 0×00, that is, the identification register corresponding to the a model is 0×00, and the preset value is 11. It is understood that the master device may identify whether the slave device is a type based on the value corresponding to the slave device 0 x 00 register and the preset value. When the master device is 11 based on the value corresponding to the slave device 0×00 register, identifying the slave device as a type a; when the master device is not 11 based on the value corresponding to the slave device 0×00 register, it is recognized that the slave device is not a model a.
The identification register corresponding to the B model is a 0 multiplied by 01 register, namely the identification register corresponding to the B model is a 0 multiplied by 01 register preset value is 12. It is understood that the master device may identify whether the slave device is a B model based on the value corresponding to the slave device 0×01 register and a preset value. When the master device is 12 based on the value corresponding to the slave device 0×01 register, identifying the slave device as a B model; when the master device is not 12 based on the value corresponding to the slave device 0×01 register, it is recognized that the slave device is not the B model.
S402, when the value read by the master device is the same as a preset value, the master device identifies the slave device.
Adaptively, the master device performs initialization configuration on the slave device after identifying the slave device.
Illustratively, taking the slave device as the temperature sensor as an example, 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, etc.
S403, when the value of the slave device read by the master device is different from a preset value, the master device confirms whether the polling is completed.
When the master does not poll the last model slave, the master performs S401. When the master polls the last model of slave, the master identifies that the slave failed.
For example, the slave devices compatible with the SPI interface are a type and B type, as shown in fig. 6, and the identification flow is as follows:
s501, when the electronic equipment receives an operation for indicating starting, the master device reads the numerical value of a register in the slave device based on the register address corresponding to the A model.
Illustratively, the master reads the identification register corresponding to model A, i.e., the 0X 00 register.
S502, when the value read by the master device is the same as the preset value corresponding to the A model, the master device identifies the slave device as the A model.
Adaptively, the master device performs initialization setting on the slave device based on the A model.
S503, when the value read by the master device is different from the preset value corresponding to the A model, the master device reads the value of the register in the slave device based on the register address corresponding to the B model.
S504, when the value read by the master device is the same as the preset value corresponding to the model B, the master device identifies the slave device as the model B.
Adaptive, master device based on B model pair
The slave device performs an initialization setting.
S505, when the value read by the master device is different from the preset value corresponding to the model B, the master device identifies the slave device to fail.
The master device reads the numerical value of a corresponding register in the slave device based on the identification register address corresponding to the model of the first slave device; and when the value read by the master device is the same as the preset value in the corresponding relation, the master device recognizes that the slave device is the first slave device model. 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 polled to the last slave device. When the last model of slave device is polled, the master device does not identify the slave device, and the slave device fails to identify.
However, in the processes shown in fig. 5 and fig. 6, the master device may make an error when identifying 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.
Illustratively, taking the example that the master device compatibly connects the a-type slave device and the B-type slave device through the SPI interface, the master device may identify the B-type slave device as the a-type slave device. Specifically, when the master device reads the 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 exemplarily given.
Table 2 register list
Model number Register address Value of
A 0×00 11
0×01 13
B 0×00 Reservation (reserved)
0×01 12
It should be noted that, a part of registers in the slave device are reserved (reserved) registers, which can be understood as registers that are not disclosed. The reserved (reserved) registers may be registers that are only used for debugging during the device design development phase; it is also possible to design a device with a function, but due to problems of production process and the like, a register or the like where the corresponding function cannot be realized.
It is understood that the value corresponding to the reserved register may be 1 fixed value, may be a random value, or may correspond to a plurality of fixed values.
The misrecognition process is described below in conjunction with table 2 and fig. 7. Illustratively, taking the model of the slave device as the model B, the master device identifies the slave device according to the sequence of the model A and the model B as an example, and the identification flow comprises:
s601, when the electronic equipment receives an operation for indicating starting, the master device reads the numerical value of a register in the slave device based on the register address corresponding to the A model.
Illustratively, the master reads the identification register corresponding to model A, i.e., the 0X 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 main device performs initialization setting based on the A model.
For example, when the slave device is a type B, 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, which is the same as the preset value corresponding to the type a, and the master device erroneously identifies the slave device as the type a.
When the master device performs initialization configuration based on the A model, the slave device may be in an error initialization configuration, and further the slave device cannot normally operate, so that corresponding functions fail.
In view of this, the embodiment of the present application provides a device identification method, where a master device may read values of two different registers in a slave device, obtain corresponding two values, and verify that device identification is successful when both values meet expectations. Therefore, secondary identification is performed, the situation that the device is erroneously identified to initialize configuration failure due to the fact that the corresponding values of the same address registers 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.
The device identification method provided in the embodiment of the application is described below with reference to the accompanying drawings.
Fig. 8 is a schematic flow chart of a slave device identification method according to an embodiment of the present application, as shown in fig. 8, where 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 correspondence includes a relationship between 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 is switched from a power-down state to a power-up state, and the slave device starts to be identified.
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 storing the identification of the device and is used for distinguishing the model of the device. The review register is used for verifying the device model.
For example, taking the slave device model as a model A and a model B as examples, the identification register address corresponding to the model A is 0 multiplied by 00, and the first preset value is 11; the address of the review register corresponding to the A model 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 0 multiplied by 01 register, and the first preset value is 12; the review register address 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 above correspondence may be stored in the master device in the form of a table. Exemplary, as shown in table 3.
TABLE 3 correspondence table
Model number Identifying register addresses A first preset value Review register addresses A 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 the first value and the second value. In the embodiment of the application, the master device may first read the value of the register in the slave device based on the first address to obtain the first value; the second value may also be derived by first reading the value of a register in the slave device based on the second address. And are not limited herein.
In this embodiment of the present application, the second addresses corresponding to the slave devices of different models may be the same or different, which is not limited in this embodiment of the present application.
It will be appreciated that a master device may be compatible with multiple slave device connections via the SPI bus. The master device reads the values of the corresponding registers in the slave devices according to the order and the corresponding relation of the preset models so as to confirm the models of the slave devices.
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, the slave device is configured in an initializing mode based on the model, and the second value is set before the master device configures the slave device.
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 completed.
Illustratively, the master confirms whether the 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, the polling is not completed, and the master device performs S701 until the slave device is identified or the polling is completed. When the master device reads the value of the register in the slave device based on the last model and the corresponding relation, the polling is completed, and the master device identifies the failure of the slave device.
In a possible implementation manner, the master device configures the slave device based on a preset model when identifying the slave device fails.
In a possible implementation manner, the master device controls the slave device to reset before reading the values of the registers in the slave device to obtain the second values based on the model order and the correspondence.
In summary, the master device performs verification 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 slave devices of different models are the same is reduced, and the situation of device misrecognition is reduced. 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.
The device identification method in the process of initializing the electronic device by turning on will be described with reference to fig. 9. As shown in fig. 9, for example,
s801, when the electronic equipment receives an operation for indicating start-up, the master device reads the numerical value of a register in the slave device based on the identification register address corresponding to the A model, and a first value corresponding to the A model is obtained.
It is understood that the master device is connected to a plurality of slave devices through an SPI bus. The master device confirms the model of the slave device in a polling mode according to a preset polling sequence and a corresponding relation. The corresponding relation is the relation among the slave device model, the identification register address, the first preset value, the review 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. Illustratively, the correspondence 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 a model is 0×00, and the first preset value is 11; the address of the review register corresponding to the A model 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 0 multiplied by 01 register, and the first preset value is 12; the review register address corresponding to the type B is 0 multiplied by 02, and the second preset value is 14.
It will be appreciated that the slave device is model a when the master device reads the value of the slave device's 0 x 00 register to a first value of 11 and the master device reads the value of the slave device's 0 x 01 register to a second value of 13. When the master reads the value of the 0×01 register of the slave, the first value obtained is 12, and the master reads the second value obtained from the value of the 0×02 register of the slave is 14, the slave is type B.
In the embodiment of the present application, a double check (double check) register is different from an identification register. The address corresponding to the double check register is different from the address corresponding to the identification register.
In the embodiment of the present application, addresses of review registers corresponding to slave devices of different models may be the same or different, which is not limited in the embodiment of the present application.
In a possible implementation manner, addresses of review registers corresponding to the slave devices of different models are the same, and corresponding second preset values are different.
Thus, the addresses of the review registers are the same, and the master device can distinguish slave devices of different models by reading the registers once. In addition, the risk of false recognition can be reduced.
In this embodiment of the present application, a double check (double check) register may be a stable register after power-up, or may be an unstable register.
It will be appreciated that the unstable registers may be reserved registers and registers whose values are modified, etc.
Some registers may be read and written during device operation, resulting in 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 condition, or the like.
Illustratively, taking a temperature sensor as an example, the unstable register may be: registers for storing the detected temperature, unpublished reserved registers, etc.
The stable registers may be: registers whose values are unmodified, such as control registers whose values are fixed and which have not been read and written from the device during use, etc.
Illustratively, taking a temperature sensor as an example, the stable registers may be: the interrupt control register is used for controlling the enabling of an interrupt function, and the processor does not operate the interrupt control register, so that the register can be expected to be fixed after the temperature sensor is electrified and stable.
In a possible implementation, the double check register is a stable register after power up. Thus, the situation of recognition failure caused by the change of the value in the register can be reduced, and the success rate of recognition is improved.
In a possible implementation, the review register is a non-zero register. It will be appreciated that the register report value is 0 after a power-on reset of most registers, and that the register exception report value is typically 0. Thus, the selection of the non-zero register can further reduce misrecognition and improve the stability of the embodiment of the application.
In a possible implementation, the review register is a register with a fixed and non-zero value reported after power-up. Thus, the situation of recognition failure caused by the change of the value in the register can be reduced, and the success rate of recognition is improved.
S802, when the first value corresponding to the A model is the same as the first preset value corresponding to the A model, the master device reads the numerical value of the register in the slave device based on the review register address corresponding to the A model, and a second value corresponding to the A model is obtained.
S803, when the second value corresponding to the A model is the same as the second preset value corresponding to the A model, the master device identifies the slave device as the A model.
Adaptively, the master device configures the slave device based on the a model.
S804, when the first value corresponding to the A model is different from the first preset value corresponding to the A model, or the second value corresponding to the A model is different from the second preset value corresponding to the A model, the master device confirms whether the polling is completed.
When the A model is not the last model, the polling is not completed, and the master device reads the numerical value of the register in the slave device based on the identification register address corresponding to the B model to obtain a first value corresponding to the B model.
When the A model is the last model, the master device identifies the slave device as failed.
In summary, when the 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 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. S805, the master device controls the slave device to reset before the master device reads the value of the register in the slave device based on the review register address.
It should be noted that, during the use of the electronic device, the value corresponding to a part of registers in the slave device may change. For example, taking the slave device as a temperature sensor, a register for storing the detected temperature may be rewritten a plurality of times to store the temperature detected last time. 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.
In this way, the reset from the device restores the value of the register in the slave device to the default value, so that the recognition failure or the false recognition caused by the condition that the value corresponding to the review register is rewritten and the like can be reduced.
On the basis of the above embodiment, the method further includes S806. S806, when the master device fails to identify the slave device, configuring the slave device based on the preset model. Therefore, the master device may successfully configure the slave device based on the preset model, so that the slave device can normally operate, and the function of the electronic equipment is further realized.
In a possible implementation manner, the preset model may be a model corresponding to the slave device with the largest number of times of use in the electronic device. In this way, the likelihood of the master device successfully configuring the 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 review register address multiple times. In this way, the false recognition situation is further reduced.
It can be understood that the above-mentioned slave devices with SPI interfaces compatible with a type and B type in the flow shown in fig. 9 are only examples, and in practical application, the SPI interfaces may also be compatible with slave devices with more types, and the types and types of the slave devices compatible with the SPI interfaces are not limited in this embodiment of the present application.
In the above embodiment, the slave devices compatible with the SPI interface may be different types of slave devices of the same type, or may be different types of slave devices. The embodiments of the present application are not limited in this regard.
When the electronic device is turned on or restarted, the master device is switched from a power-down state to a power-up 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 the generation can also be suitable for the process of powering up the slave device after power-down. For example, a software system of an electronic device may have a problem resulting in power up after power down from a device, or a latch-up (latch-up) from a device may result in power up after power down from a device.
The device identification method according to the embodiment of the present application has been described above, and the related apparatus for performing the device identification method according to the embodiment of the present application is described below. Those skilled in the art will appreciate that the methods and apparatus may be combined and referred to, and that the related apparatus provided in the embodiments of the present application may perform the steps of the device identification method described above.
Embodiments of the present application also provide 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 can include computer storage media and communication media and can include any medium that can transfer a computer program from one place to another. The storage media may be any target media that is accessible by a computer.
In one possible implementation, the computer readable medium may include RAM, ROM, compact disk-read only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium targeted for carrying or storing the desired program code in the form of instructions or data structures and accessible 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 (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 optical disc, laser disc, optical disc, digital versatile 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 foregoing detailed description of the invention has been presented for purposes of illustration and description, and it should be understood that the foregoing is by way of illustration and description only, and is not intended to limit the scope of the invention.

Claims (13)

1. The device identification method is characterized by being 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 a slave device model, 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 a first address, a first preset value, a second address and a second preset value, and the method comprises the following steps:
the master device reads the numerical value of a 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;
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, and the method comprises the following steps:
the master device reads the numerical value of a register in the slave device based on a 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 model of the first slave device to obtain the second value.
2. The method of claim 1, wherein the master device reads a value of a register in the slave device based on a second address corresponding to the first slave device model, the second value comprising:
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 the second value.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
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 the value of a register in the slave device based on a first address corresponding to the second 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 second slave device model to obtain the second value.
4. A method according to claim 3, characterized in that the method further comprises:
when the numerical 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, configuring the slave device by the master device based on a preset model, wherein the preset model is any slave device model in the corresponding relation;
or when the numerical 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 slave device model, the master device configures the slave device based on the preset model.
5. The method according to any one of claims 1 or 2, wherein the master device configures the slave device based on the first slave device model, comprising:
and the master device writes the adjustment parameters corresponding to the model of the first slave device into a register of the slave device.
6. The method according to claim 1 or 2, 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.
7. A method according to claim 1 or 2, characterized in that the fixed value is non-zero.
8. The method according to claim 1 or 2, wherein the register corresponding to the second address comprises: and a control register with a fixed read value and which is not subjected to read-write operation.
9. The method according to claim 1 or 2, 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, comprising:
the main device is switched from a second state to a first state, the second state is a power-down state, and the first state is a power-up state;
Or the master device detects that the slave device is switched from the second state to the first state.
10. A method according to claim 1 or 2, characterized in that the correspondence is stored in the master device in the form of a table.
11. The method of claim 1 or 2, wherein the master device includes, but is not limited to: a processor CPU or a 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 communication system 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, keys, a motor, an indicator, a camera, a display screen and a user identification module.
12. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-11.
13. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program or instructions, which when executed, implement the method of any of claims 1-11.
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 CN116909474A (en) 2022-04-12 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 CN116909474A (en) 2022-04-12 2022-04-12 Device identification method and related device

Publications (2)

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

Family

ID=82429638

Family Applications (2)

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

Family Applications After (1)

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

Country Status (2)

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

Families Citing this family (1)

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

Citations (3)

* 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
WO2014209415A1 (en) * 2013-06-27 2014-12-31 Microsoft Corporation Broker for evaluating application requests to access peripheral devices
CN108052094A (en) * 2017-12-20 2018-05-18 深圳市英威腾电气股份有限公司 A kind of extension card identification method, device and frequency converter

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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)
DE102010029349A1 (en) * 2010-05-27 2011-12-01 Robert Bosch Gmbh Control unit for exchanging data with a peripheral unit, peripheral unit, and method for data exchange
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
KR102128406B1 (en) * 2014-09-26 2020-07-10 삼성전자주식회사 Storage device and operating emthod of storage device
CN105388805B (en) * 2015-11-01 2018-04-06 四川泛华航空仪表电器有限公司 Measurement and Control System based on spi bus
CN106982246A (en) * 2017-02-21 2017-07-25 普奥云信息科技(北京)有限公司 Smart machine
US10360164B1 (en) * 2018-01-19 2019-07-23 Microchip Technology Incorporated Direct memory access adapter
KR20210045241A (en) * 2019-10-16 2021-04-26 삼성전자주식회사 Electronic device and method for sharing voice command thereof
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 (3)

* 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
WO2014209415A1 (en) * 2013-06-27 2014-12-31 Microsoft Corporation Broker for evaluating application requests to access peripheral devices
CN108052094A (en) * 2017-12-20 2018-05-18 深圳市英威腾电气股份有限公司 A kind of extension card identification method, device and frequency converter

Also Published As

Publication number Publication date
WO2023197709A1 (en) 2023-10-19
CN114780029A (en) 2022-07-22
CN116909474A (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN112771900B (en) Data transmission method and electronic equipment
CN113498124B (en) SIM card and eSIM card switching method and electronic equipment
CN110798568B (en) Display control method of electronic equipment with folding screen and electronic equipment
CN111475077A (en) Display control method and electronic equipment
CN110742580A (en) Sleep state identification method and device
CN115589051B (en) Charging method and terminal equipment
CN114490174B (en) File system detection method, electronic device and computer readable storage medium
CN113704205A (en) Log storage method, chip, electronic device and readable storage medium
CN114880251B (en) Memory cell access method, memory cell access device and terminal equipment
CN113504887A (en) Volume setting method and electronic equipment
CN114780029B (en) Device identification method and related device
CN111492678B (en) File transmission method and electronic equipment
CN116048358B (en) Method and related device for controlling suspension ball
CN113407300B (en) Application false killing evaluation method and related equipment
WO2022022466A1 (en) Method and apparatus for determining file storage position, and terminal
CN117093068A (en) Vibration feedback method and system based on wearable device, wearable device and electronic device
CN114077519B (en) System service recovery method and device and electronic equipment
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
CN110806994B (en) Signal transmission method and device
CN114690849A (en) Clock skew determination method, device and storage medium
CN114153638A (en) Application exception exit repairing method and device and electronic equipment
CN113645595A (en) Equipment interaction method and device
CN116346982B (en) Method for processing audio, electronic device and readable storage medium
CN113050864B (en) Screen capturing method and related equipment
CN117130959A (en) Bus control method, electronic device and computer 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