[go: up one dir, main page]

CN111324498A - Hardware information detection device, identification device and method - Google Patents

Hardware information detection device, identification device and method Download PDF

Info

Publication number
CN111324498A
CN111324498A CN202010120777.7A CN202010120777A CN111324498A CN 111324498 A CN111324498 A CN 111324498A CN 202010120777 A CN202010120777 A CN 202010120777A CN 111324498 A CN111324498 A CN 111324498A
Authority
CN
China
Prior art keywords
level
hardware
resistor
capacitor
circuit
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.)
Pending
Application number
CN202010120777.7A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010120777.7A priority Critical patent/CN111324498A/en
Publication of CN111324498A publication Critical patent/CN111324498A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a hardware information detection device, a hardware information identification device and a hardware information identification method. The hardware information detection device includes: the processing device comprises a detection port, the detection port is used for being connected to a resistance-capacitance circuit of hardware to be detected, the default level of the connection point of the detection port and the resistance-capacitance circuit in the hardware to be detected is a first level, wherein the processing device executes the following processing: setting a level of the connection point to a second level through the detection port, wherein the second level is different from the first level; setting the detection port to an interrupt mode triggered by a first level; detecting the time required for the level value of the detection port to change from the second level to the first level, wherein the time is the trigger time required for triggering interruption; and determining the information of the hardware to be detected based on the trigger time.

Description

硬件信息检测装置、标识装置及方法Hardware information detection device, identification device and method

技术领域technical field

本发明实施例涉及通信技术领域,尤其涉及一种硬件信息检测装置、 硬件信息标识装置及硬件信息检测方法。Embodiments of the present invention relate to the field of communication technologies, and in particular, to a hardware information detection device, a hardware information identification device, and a hardware information detection method.

背景技术Background technique

目前,电子产品的发展越来越全球化,并且,电子产品的更新节奏越 来越快。此外,电子产品的适配外设也越来越多。因此,在生产活动中需 要识别电子产品的硬件版本信息,和/或识别外设的产品信息。At present, the development of electronic products is becoming more and more globalized, and the update rhythm of electronic products is getting faster and faster. In addition, there are more and more adaptable peripherals for electronic products. Therefore, it is necessary to identify hardware version information of electronic products, and/or identify product information of peripheral devices in production activities.

例如,一种电子产品需要供应给许多国家的用户。不同国家的用户有 不同的定制需求。因此,针对不同的国家,设计不同版本的硬件。此外, 在产品更新时,软件需要识别硬件的版本,以便进行相应的配置。当产品 更新较快时,需要设置和标识硬件的多个不同版本。此外,电子产品所能 够连接的外设也越来越多,因此,需要识别不同外设的产品信息,例如, 该外设是摄像头、耳机、充电器等,或者摄像头、耳机、充电器的型号。For example, an electronic product needs to be supplied to users in many countries. Users in different countries have different customization needs. Therefore, different versions of hardware are designed for different countries. In addition, when the product is updated, the software needs to identify the version of the hardware in order to configure it accordingly. When products are updated quickly, multiple different versions of hardware need to be set up and identified. In addition, more and more peripherals can be connected to electronic products. Therefore, it is necessary to identify the product information of different peripherals. For example, the peripheral is a camera, earphone, charger, etc., or the model of the camera, earphone, and charger. .

现在,主要有两种识别硬件版本的方法。Now, there are mainly two ways to identify the hardware version.

在第一种方法中,使用CPU的GPIO(通用输入输出)接口和预设的 上下拉电阻来识别硬件版本。具体来说,如图1所示,在电源VCC和接地 之间可以设置4个电阻位置R1、R2、R3、R4。R1、R2串联在电源VCC 和接地之间,CPU的第一个GPIO接口GPIO 1连接到R1、R2之间。R3、 R4串联在电源VCC和接地之间,CPU的第二个GPIO接口GPIO 2连接到 R1、R4之间。由此,通过GPIO 1和GPIO 2接口可以检测到不同的高低 电平,从而确定硬件的版本。表1示出了R1、R2、R3、R4的不同设置、 GPIO 1和GPIO 2所检测到的电平以及相应的硬件版本1-4。In the first method, use the CPU's GPIO (General Purpose Input Output) interface and preset pull-up and pull-down resistors to identify the hardware version. Specifically, as shown in Figure 1, four resistor locations R1, R2, R3, R4 can be placed between the power supply VCC and ground. R1 and R2 are connected in series between the power supply VCC and the ground, and the first GPIO interface GPIO 1 of the CPU is connected between R1 and R2. R3 and R4 are connected in series between the power supply VCC and the ground, and the second GPIO interface GPIO 2 of the CPU is connected between R1 and R4. Therefore, different high and low levels can be detected through the GPIO 1 and GPIO 2 interfaces to determine the version of the hardware. Table 1 shows the different settings of R1, R2, R3, R4, the levels detected by GPIO 1 and GPIO 2, and the corresponding hardware versions 1-4.

表1Table 1

R1R1 R2R2 R3R3 R4R4 GPIO 1GPIO 1 GPIO 2GPIO 2 硬件版本1Hardware version 1 10KΩ10KΩ 不贴don't post 10KΩ10KΩ 不贴don't post high high 硬件版本2Hardware version 2 不贴don't post 10KΩ10KΩ 不贴don't post 10KΩ10KΩ Low Low 硬件版本3Hardware version 3 不贴don't post 10KΩ10KΩ 10KΩ10KΩ 不贴don't post Low high 硬件版本4Hardware version 4 10KΩ10KΩ 不贴don't post 不贴don't post 10KΩ10KΩ high Low

在第一种方法中,如果需要检测多个硬件版本,那么需要多个GPIO (通用输入输出)接口以及多组上拉和下拉电阻。这种方法会浪费有限的 GPIO端口资源。此外,多组上拉和下拉电阻会影响器件布局和走线。In the first method, if multiple hardware versions need to be detected, then multiple GPIO (General Purpose Input Output) interfaces and multiple sets of pull-up and pull-down resistors are required. This approach wastes limited GPIO port resources. Additionally, multiple sets of pull-up and pull-down resistors can affect device placement and routing.

在第二种方法中,使用CPU的ADC(模拟数字转换)端口可以检测 不同分压值,从而确定硬件版本。如图2所示,在电源VCC和接地之间串 联电阻R5、R6,ADC端口连接在R5和R6之间。通过设置不同的R5、 R6,可以在ADC端口产生不同的分压值。由ADC端口所检测的分压值可 以代表不同的硬件版本。作为示例,下面的表2示出了硬件版本1-4以及 相应的电阻R5、R6的阻值。In the second method, using the ADC (analog-to-digital conversion) port of the CPU can detect different voltage divider values to determine the hardware version. As shown in Figure 2, resistors R5 and R6 are connected in series between the power supply VCC and ground, and the ADC port is connected between R5 and R6. Different voltage divider values can be generated at the ADC port by setting different R5 and R6. The voltage divider value detected by the ADC port can represent different hardware versions. As an example, Table 2 below shows hardware versions 1-4 and the corresponding values of resistors R5, R6.

表2Table 2

R5R5 R6R6 硬件版本1Hardware version 1 1KΩ1KΩ 10KΩ10KΩ 硬件版本2Hardware version 2 2KΩ2KΩ 10KΩ10KΩ 硬件版本3Hardware version 3 3KΩ3KΩ 10KΩ10KΩ 硬件版本4Hardware version 4 4KΩ4KΩ 10KΩ 10KΩ

一般来说,在诸如CPU的处理装置中,ADC(模拟数字转换)端口/ 引脚比较少,资源有限。因此,通常没有多余的ADC引脚供硬件版本检测 使用。此外,模拟数字转换处理较为复杂且占用较多的处理资源,因此, 将模拟数字转换处理用于硬件版本检测,在一定程度上造成资源浪费。Generally, in a processing device such as a CPU, ADC (analog to digital conversion) ports/pins are relatively few and resources are limited. Therefore, there are usually no spare ADC pins for hardware revision detection. In addition, the analog-to-digital conversion processing is relatively complex and takes up more processing resources. Therefore, using the analog-to-digital conversion processing for hardware version detection results in a waste of resources to a certain extent.

因此,需要一种新的检测和标识硬件版本或产品信息的技术方案。Therefore, a new technical solution for detecting and identifying hardware versions or product information is required.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种一种硬件信息检测装置、硬件信息标识装置及 硬件信息检测方法,以解决如何高效检测硬件信息的技术问题。Embodiments of the present invention provide a hardware information detection device, a hardware information identification device, and a hardware information detection method to solve the technical problem of how to efficiently detect hardware information.

为了解决上述技术问题,本发明是这样实现的。In order to solve the above-mentioned technical problems, the present invention is realized in this way.

第一方面,本发明实施例提供了一种硬件信息检测装置,包括:处理 装置,该处理装置包括检测端口,该检测端口用于连接到待检测硬件的电 阻-电容电路,该检测端口与电阻-电容电路的连接点在待检测硬件中的默认 电平是第一电平,其中,该处理装置执行如下处理:通过检测端口将所述 连接点的电平设置为第二电平,其中,第二电平不同于第一电平;将所述 检测端口设置为由第一电平触发的中断模式;检测所述检测端口电平值由所述第二电平变化至所述第一电平所需的时间,所述时间即为触发中断所 需的触发时间;以及基于所述触发时间确定所述待检测硬件的信息。In a first aspect, an embodiment of the present invention provides a hardware information detection device, including: a processing device, the processing device includes a detection port, the detection port is used for connecting to a resistor-capacitor circuit of the hardware to be detected, and the detection port is connected to a resistor - the default level of the connection point of the capacitive circuit in the hardware to be detected is the first level, wherein the processing device performs the following processing: setting the level of the connection point to the second level through the detection port, wherein, The second level is different from the first level; the detection port is set to an interrupt mode triggered by the first level; the detection port level value changes from the second level to the first level The time required for an interrupt is determined, and the time is the trigger time required to trigger an interrupt; and the information of the hardware to be detected is determined based on the trigger time.

第二方面,本发明实施例提供了一种硬件信息标识装置,包括电阻- 电容电路,该电阻-电容电路包括用于连接到检测端口的连接点,该连接点 在待检测硬件中的默认电平是第一电平,所述电阻-电容电路的电阻和电容 被设置成使得该电阻-电容电路从第二电平转换到第一电平的时间标识待 检测硬件的信息。In a second aspect, an embodiment of the present invention provides a hardware information identification device, including a resistor-capacitor circuit, where the resistor-capacitor circuit includes a connection point for connecting to a detection port, and the connection point is at a default power level in the hardware to be detected. level is the first level, and the resistance and capacitance of the resistor-capacitor circuit are set such that the time at which the resistor-capacitor circuit transitions from the second level to the first level identifies information of the hardware to be detected.

第三方面,本发明实施例提供了一种硬件信息检测方法,包括:通过 检测端口将该检测端口与电阻-电容电路的连接点的电平设置为不同于第 一电平的第二电平,其中,第一电平是该连接点在待检测硬件中的默认电 平;将所述检测端口设置为由第一电平触发的中断模式;检测所述检测端 口电平值由所述第二电平变化至所述第一电平所需的时间,所述时间即为 触发中断所需的触发时间;以及基于所述触发时间确定所述待检测硬件的 信息。In a third aspect, an embodiment of the present invention provides a method for detecting hardware information, including: setting a level of a connection point between the detection port and the resistor-capacitor circuit to a second level different from the first level by using the detection port , where the first level is the default level of the connection point in the hardware to be detected; the detection port is set to an interrupt mode triggered by the first level; the detection port level value is determined by the first level The time required for the second level to change to the first level, the time being the trigger time required to trigger an interrupt; and the information of the hardware to be detected is determined based on the trigger time.

在本发明实施例中,通过利用RC电路的不同放电时间来确定硬件信 息,从而能够高效地检测和标识硬件信息。In this embodiment of the present invention, hardware information can be efficiently detected and identified by using different discharge times of the RC circuit to determine hardware information.

通过以下参照附图对本发明的示例性实施例的详细描述,本发明的其 它特征及其优点将会变得清楚。Other features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings.

附图说明Description of drawings

被结合在说明书中并构成说明书的一部分的附图示出了本发明的实 施例,并且连同其说明一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention.

图1示出了现有技术的一种检测硬件版本的装置的电路图。FIG. 1 shows a circuit diagram of an apparatus for detecting a hardware version in the prior art.

图2示出了现有技术的另一种检测硬件版本的装置的电路图。FIG. 2 shows a circuit diagram of another device for detecting a hardware version in the prior art.

图3示出了实现本发明各个实施例的一种电子设备的硬件结构示意图。FIG. 3 shows a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.

图4示出了RC电路中电压和时间的关系图。Figure 4 shows a graph of voltage versus time in an RC circuit.

图5示出了根据第一实施例的检测硬件信息的系统的电路图。FIG. 5 shows a circuit diagram of a system for detecting hardware information according to the first embodiment.

图6示出了根据第二实施例的检测硬件信息的系统的电路图。FIG. 6 shows a circuit diagram of a system for detecting hardware information according to the second embodiment.

图7示出了根据第三实施例的检测硬件信息的系统的电路图。FIG. 7 shows a circuit diagram of a system for detecting hardware information according to a third embodiment.

图8示出了根据第四实施例的检测硬件信息的系统的电路图。FIG. 8 shows a circuit diagram of a system for detecting hardware information according to a fourth embodiment.

图9示出了根据第六实施例的检测硬件信息的方法的示意性流程图。FIG. 9 shows a schematic flowchart of a method for detecting hardware information according to a sixth embodiment.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进 行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而 不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有 作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范 围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

图1为可用于实现本发明各个实施例的一种电子设备的硬件结构示意 图。FIG. 1 is a schematic diagram of a hardware structure of an electronic device that can be used to implement various embodiments of the present invention.

该电子设备100包括但不限于:射频单元101、网络模块102、音频 输出单元103、输入单元104、传感器105、显示单元106、用户输入单元 107、接口单元108、存储器109、处理器110、以及电源111等部件。本 领域技术人员可以理解,图1中示出的电子设备结构并不构成对电子设备 的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件, 或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、 平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、计步器、家 用电器、医疗设备、网络设备等。The electronic device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and Power 111 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 1 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or different components. layout. In this embodiment of the present invention, electronic devices include but are not limited to mobile phones, tablet computers, notebook computers, handheld computers, vehicle-mounted terminals, wearable devices, pedometers, household appliances, medical devices, network devices, and the like.

应理解的是,本发明实施例中,射频单元101可用于收发信息或通话 过程中,信号的接收和发送。具体地,射频单元101将来自基站的下行数 据接收后,给处理器110处理。另外,将上行的数据发送给基站。通常, 射频单元101包括但不限于天线、至少一个放大器、收发信机、耦合器、 低噪声放大器、双工器等。此外,射频单元101还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during sending and receiving of information or during a call. Specifically, after the radio frequency unit 101 receives the downlink data from the base station, the processor 110 processes it. In addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with the network and other devices through a wireless communication system.

电子设备通过网络模块102为用户提供了无线的宽带互联网访问,如 帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device provides the user with wireless broadband Internet access through the network module 102, such as helping the user to send and receive emails, browse web pages, access streaming media, and the like.

音频输出单元103可以将射频单元101或网络模块102接收的或者在 存储器109中存储的音频数据转换成音频信号并且输出为声音。而且,音 频输出单元103还可以提供与电子设备100执行的特定功能相关的音频输 出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元103包括 扬声器、蜂鸣器以及受话器等。The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into audio signals and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the electronic device 100 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.

输入单元104用于接收音频或视频信号。输入单元104可以包括图形 处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理 器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头) 获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在 显示单元106上。经图形处理器1041处理后的图像帧可以存储在存储器 109(或其它存储介质)中或者经由射频单元101或网络模块102进行发送。麦克风1042可以接收声音,并且能够将这样的声音处理为音频数据。处理 后的音频数据可以在电话通话模式的情况下转换为可经由射频单元101发 送到移动通信基站的格式输出。The input unit 104 is used to receive audio or video signals. The input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042. The graphics processor 1041 captures images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode data is processed. The processed image frames can be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 for output in the case of a telephone conversation mode.

电子设备100还包括至少一种传感器105,比如光传感器、运动传感 器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器, 其中,环境光传感器可根据环境光线的明暗来调节显示面板1061的亮度, 接近传感器可在电子设备100移动到耳边时,关闭显示面板1061和/或背 光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三 轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子 设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相 关功能(比如计步器、敲击)等;传感器105还可以包括指纹传感器、压 力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、 红外线传感器等,在此不再赘述。The electronic device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and the proximity sensor when the electronic device 100 is moved to the ear. / or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games , magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 105 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, Infrared sensors, etc., are not repeated here.

显示单元106用于显示由用户输入的信息或提供给用户的信息。显示 单元106可包括显示面板1061,可以采用液晶显示器(Liquid Crystal Display, LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来 配置显示面板1061。The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

用户输入单元107可用于接收输入的数字或字符信息,以及产生与电 子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单 元107包括触控面板1071以及其他输入设备1072。触控面板1071,也称 为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触 笔等任何适合的物体或附件在触控面板1071上或在触控面板1071附近的 操作)。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其中, 触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号 传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它 转换成触点坐标,再送给处理器110,接收处理器110发来的命令并加以 执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型 实现触控面板1071。除了触控面板1071,用户输入单元107还可以包括其 他输入设备1072。具体地,其他输入设备1072可以包括但不限于物理键 盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆, 在此不再赘述。The user input unit 107 may be used to receive input numerical or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or attachment on or near the touch panel 1071). operate). The touch panel 1071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the touch controller. To the processor 110, the command sent by the processor 110 is received and executed. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

进一步的,触控面板1071可覆盖在显示面板1061上,当触控面板1071 检测到在其上或附近的触摸操作后,传送给处理器110以确定触摸事件的 类型,随后处理器110根据触摸事件的类型在显示面板1061上提供相应的 视觉输出。虽然在图3中,触控面板1071与显示面板1061是作为两个独 立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以 将触控面板1071与显示面板1061集成而实现电子设备的输入和输出功能, 具体此处不做限定。Further, the touch panel 1071 can be covered on the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits it to the processor 110 to determine the type of the touch event, and then the processor 110 determines the type of the touch event according to the touch The type of event provides corresponding visual output on display panel 1061 . Although in FIG. 3 , the touch panel 1071 and the display panel 1061 are used as two independent components to realize the input and output functions of the electronic device, but in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated The implementation of the input and output functions of the electronic device is not specifically limited here.

接口单元108为外部装置与电子设备100连接的接口。例如,外部装 置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有 线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、 音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元108可 以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到 的输入传输到电子设备100内的一个或多个元件或者可以用于在电子设备100和外部装置之间传输数据。The interface unit 108 is an interface for connecting an external device to the electronic device 100 . For example, external devices may include wired or wireless headset ports, external power (or battery charger) ports, wired or wireless data ports, memory card ports, ports for connecting devices with identification modules, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 108 may be used to receive input (eg, data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 100 or may be used between the electronic device 100 and external Transfer data between devices.

存储器109可用于存储软件程序以及各种数据。存储器109可主要包 括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一 个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储 数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等) 等。此外,存储器109可以包括高速随机存取存储器,还可以包括非易失 性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存 储器件。The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

处理器110作为处理装置,是电子设备的控制中心,利用各种接口和 线路连接整个电子设备的各个部分,通过运行或执行存储在存储器109内 的软件程序和/或模块,以及调用存储在存储器109内的数据,执行电子设 备的各种功能和处理数据,从而对电子设备进行整体监控。处理器110可 包括一个或多个处理单元;优选的,处理器110可集成应用处理器和调制 解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序 等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处 理器也可以不集成到处理器110中。As a processing device, the processor 110 is the control center of the electronic equipment, and uses various interfaces and lines to connect various parts of the entire electronic equipment, by running or executing the software programs and/or modules stored in the memory 109, and calling the stored in the memory. 109, perform various functions of the electronic device and process data, so as to monitor the electronic device as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 110.

处理器110通常包括多种端口(管脚),例如,多个GPIO端口。可 以利用GPIO端口来检测诸如电子设备100的硬件版本的硬件信息。此外, 当诸如打印机、摄像头等外设连接到电子设备100时,处理器110可以通 过GPIO端口检测该外设的硬件信息,从而识别该外设。The processor 110 typically includes various ports (pins), eg, multiple GPIO ports. Hardware information such as the hardware version of electronic device 100 can be detected using the GPIO ports. In addition, when a peripheral device such as a printer, a camera, etc. is connected to the electronic device 100, the processor 110 can detect the hardware information of the peripheral device through the GPIO port, thereby identifying the peripheral device.

电子设备100还可以包括给各个部件供电的电源111(比如电池), 优选的,电源111可以通过电源管理系统与处理器110逻辑相连,从而通 过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system and other functions.

另外,电子设备100包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 100 includes some functional modules not shown, which will not be repeated here.

在这里提出使用带中断功能的GPIO端口,利用电阻-电容电路(RC 电路)不同放电时间,检测硬件信息。在RC电路中,通过将电阻的阻值 和电容的容值设置为不同的值,RC电路的放电时间会不同。RC电路的时 间常数τ越大,放电所需时间越长。It is proposed to use the GPIO port with the interrupt function, and use the resistance-capacitor circuit (RC circuit) to detect the hardware information with different discharge times. In the RC circuit, by setting the resistance value of the resistor and the capacitance value of the capacitor to different values, the discharge time of the RC circuit will be different. The larger the time constant τ of the RC circuit, the longer the time required for discharge.

图4示出了RC电路中电压和时间的关系图。在图4中,对RC电路 中的电压Uc进行了归一化处理。如图4所示,经过时间τ,电压Uc下降 到0.37Uc。经过时间2.3τ,电压Uc下降到0.10Uc。Figure 4 shows a graph of voltage versus time in an RC circuit. In Figure 4, the voltage Uc in the RC circuit is normalized. As shown in Fig. 4, the voltage Uc drops to 0.37Uc with the elapse of time τ. After time 2.3τ, the voltage Uc drops to 0.10Uc.

因此,可以通过检测RC电路的不同放电时间来检测不同的硬件信息。 这里,可以提供一种硬件信息检测装置,包括:处理装置,该处理装置包 括检测端口,该检测端口用于连接到待检测硬件的电阻-电容电路,该检测 端口与电阻-电容电路的连接点在待检测硬件中的默认电平是第一电平。该 处理装置执行如下处理:通过检测端口将所述连接点的电平设置为第二电 平,其中,第二电平不同于第一电平;将所述检测端口设置为由第一电平触发的中断模式;检测所述检测端口电平值由所述第二电平变化至所述第 一电平所需的时间,所述时间即为触发中断所需的触发时间;以及基于所 述触发时间确定所述待检测硬件的信息。Therefore, different hardware information can be detected by detecting different discharge times of the RC circuit. Here, a hardware information detection device can be provided, including: a processing device, the processing device includes a detection port, the detection port is used to connect to a resistance-capacitance circuit of the hardware to be detected, and the detection port is connected to the resistance-capacitance circuit. The default level in the hardware to be detected is the first level. The processing device performs the following processing: setting the level of the connection point to a second level through the detection port, wherein the second level is different from the first level; setting the detection port to be controlled by the first level Triggered interrupt mode; detecting the time required for the detection port level value to change from the second level to the first level, the time is the trigger time required to trigger an interrupt; and based on the The trigger time determines the information of the hardware to be detected.

例如,所述检测端口是处理装置的GPIO端口。For example, the detection port is a GPIO port of the processing device.

为了保证RC电路在第二电平达到稳定状态,可以使得处理装置通过 检测端口将连接点的电平设置为第二电平之后,硬件检测装置需等待大于 100ms的时间。In order to ensure that the RC circuit reaches a stable state at the second level, after the processing device sets the level of the connection point to the second level through the detection port, the hardware detection device needs to wait for a time greater than 100ms.

待检测硬件的信息可以包括所述待检测硬件的版本信息、所述待检测 硬件的产品信息等。The information of the hardware to be detected may include version information of the hardware to be detected, product information of the hardware to be detected, and the like.

根据电路设置的不同,第一电平和第二电平可以分别是高电平和低电 平、或者低电平和高电平、或者通过专门器件在高电平和低电平之间设置 的两个电平。默认电平指的是这样的电平:在没有外部电路影响的情况下, 当待检测硬件加电时,在稳定情况下,检测端口与RC电路的连接点的电 平为默认电平。According to different circuit settings, the first level and the second level can be respectively a high level and a low level, or a low level and a high level, or two power levels set between the high level and the low level by a special device. flat. The default level refers to such a level: under the condition of no external circuit influence, when the hardware to be detected is powered on, under stable conditions, the level of the connection point between the detection port and the RC circuit is the default level.

由于通过设置不同的电阻值、电容值,可以设置不同的RC时间常数, 从而可以表示多种不同的硬件信息,因此,在这里仅通过一个GPIO端口 就可以检测多种硬件信息。Since different RC time constants can be set by setting different resistance and capacitance values, various hardware information can be represented. Therefore, only one GPIO port can detect various hardware information here.

此外,由于不需要设置多组上拉和下拉电阻,因此,可以节省硬件中 的布线资源,减小布线之间产生相互干扰的可能性。In addition, since there is no need to set up multiple groups of pull-up and pull-down resistors, wiring resources in hardware can be saved, and the possibility of mutual interference between wirings can be reduced.

另外,这种方式也不需要占用有限的ADC资源。In addition, this method does not need to occupy limited ADC resources.

下面参照图5-9分别说明各个不同实施例。Each of the different embodiments will be described below with reference to FIGS. 5-9 .

【第一实施例】[First Embodiment]

图5示出了根据第一实施例的检测硬件信息的系统的电路图。FIG. 5 shows a circuit diagram of a system for detecting hardware information according to the first embodiment.

图5示出了硬件信息检测装置110和硬件信息标识装置120。硬件信 息检测装置110和硬件信息标识装置120可以位于同一个电子设备中,也 可以位于不同的电子设备中,例如,分别位于主电子设备和外设中。FIG. 5 shows the hardware information detection device 110 and the hardware information identification device 120 . The hardware information detection device 110 and the hardware information identification device 120 may be located in the same electronic device, or may be located in different electronic devices, for example, in the main electronic device and the peripheral device, respectively.

硬件信息检测装置110包括处理装置10。处理装置10可以是中央处 理器,并且包括检测端口,例如,GPIO端口GPIOA。处理装置10中还可 以包括计时器11,用于记录触发时间。The hardware information detection device 110 includes the processing device 10 . The processing device 10 may be a central processing unit and includes a detection port, for example, a GPIO port GPIOA. The processing device 10 may also include a timer 11 for recording the trigger time.

在图5中,硬件信息标识装置120中的电阻-电容电路是电阻-电容并 联电路Ra、Ca。该电阻-电容并联电路的一端接地。该电阻-电容并联电路 的另一端连接到检测端口(GPIOA),作为所述连接点A。在这种情况下, 第一电平为低电平,以及所述第二电平为高电平。In Fig. 5, the resistor-capacitor circuits in the hardware information identification device 120 are resistor-capacitor parallel circuits Ra, Ca. One end of the resistor-capacitor parallel circuit is grounded. The other end of the resistor-capacitor parallel circuit is connected to the detection port (GPIOA) as the connection point A. In this case, the first level is a low level, and the second level is a high level.

当开始检测硬件信息时,把端口GPIOA置为输出高电平。此时。连 接点A的电平为高。例如,等待100ms,以使得RC并联电路达到稳定状 态。When starting to detect hardware information, set port GPIOA to output high level. at this time. The level of connection point A is high. For example, wait 100ms for the RC parallel circuit to stabilize.

接着,把端口GPIOA设置为低电平触发中断模式,并打开定时器11。Next, set port GPIOA to low-level trigger interrupt mode and turn on timer 11.

当端口GPIOA触发中断时,读出定时器的时间,作为触发时间。可 以设置不同的Ra和Ca值,从而使得触发时间不同。可以基于不同的触发 时间来确定不同的硬件信息。例如,下面的表3示出了电阻值、电容值及 其对应的触发时间。When the port GPIOA triggers an interrupt, the time of the timer is read out as the trigger time. Different Ra and Ca values can be set, resulting in different trigger times. Different hardware information can be determined based on different trigger times. For example, Table 3 below shows the resistor values, capacitor values and their corresponding trigger times.

表3table 3

Figure BDA0002392896600000091
Figure BDA0002392896600000091

Figure BDA0002392896600000101
Figure BDA0002392896600000101

【第二实施例】[Second Embodiment]

图6示出了根据第二实施例的检测硬件信息的系统的电路图。FIG. 6 shows a circuit diagram of a system for detecting hardware information according to the second embodiment.

图6示出了硬件信息检测装置210和硬件信息标识装置220。FIG. 6 shows the hardware information detection device 210 and the hardware information identification device 220 .

硬件信息检测装置210包括处理装置20。处理装置20可以是中央处 理器,并且包括检测端口,例如,GPIO端口GPIOB。处理装置20中还可 以包括计时器21,用于计算触发时间。The hardware information detection device 210 includes a processing device 20 . The processing device 20 may be a central processing unit and includes a detection port, such as a GPIO port GPIOB. The processing device 20 may also include a timer 21 for calculating the trigger time.

在图6中,硬件信息标识装置220中的电阻-电容电路是电阻-电容并 联电路Rb、Cb。该电阻-电容并联电路的一端连接电源VCC。该电阻-电容 并联电路的另一端连接到检测端口(GPIOA),作为所述连接点A。在这 种情况下,第一电平为高电平,以及第二电平为低电平。In Fig. 6, the resistor-capacitor circuits in the hardware information identification device 220 are resistor-capacitor parallel circuits Rb, Cb. One end of the resistor-capacitor parallel circuit is connected to the power supply VCC. The other end of the resistor-capacitor parallel circuit is connected to the detection port (GPIOA) as the connection point A. In this case, the first level is a high level, and the second level is a low level.

当开始检测硬件信息时,把端口GPIOB置为输出低电平。此时。连 接点B的电平为低。例如,等待100ms,以使得RC并联电路达到稳定状 态。When starting to detect hardware information, set the port GPIOB to output low level. at this time. The level of connection point B is low. For example, wait 100ms for the RC parallel circuit to stabilize.

接着,把端口GPIOB设置为高电平触发中断模式,并打开定时器21。Next, set port GPIOB to high-level trigger interrupt mode, and turn on timer 21.

当端口GPIOB触发中断时,读出定时器的时间,作为触发时间。可 以设置不同的Rb和Cb值,从而使得触发时间不同。可以基于不同的触发 时间来确定不同的硬件信息。When the port GPIOB triggers an interrupt, the time of the timer is read out as the trigger time. Different Rb and Cb values can be set, resulting in different trigger times. Different hardware information can be determined based on different trigger times.

在第二实施例中,由于不需要GPIO端口来设置高电平,因此,可以 减小处理装置的功率负担。In the second embodiment, since a GPIO port is not required to set a high level, the power burden on the processing device can be reduced.

此外,这里可以通过设置VCC的电平,在一定程度上调整用于触发 GPIOB端口所需的电平。In addition, the level required to trigger the GPIOB port can be adjusted to a certain extent by setting the level of VCC.

【第三实施例】[Third Embodiment]

图7示出了根据第三实施例的检测硬件信息的系统的电路图。FIG. 7 shows a circuit diagram of a system for detecting hardware information according to a third embodiment.

图7示出了硬件信息检测装置310和硬件信息标识装置320。FIG. 7 shows the hardware information detection device 310 and the hardware information identification device 320 .

硬件信息检测装置310包括处理装置30。处理装置30可以是中央处 理器,并且包括检测端口,例如,GPIO端口GPIOC。处理装置30中还可 以包括计时器31,用于计算触发时间。The hardware information detection device 310 includes a processing device 30 . The processing device 30 may be a central processing unit and includes a detection port, such as a GPIO port GPIOC. A timer 31 may also be included in the processing device 30 for calculating the trigger time.

在图7中,硬件信息标识装置320中的电阻-电容电路是电阻-电容串 联电路Rc、Cc。电阻-电容串联电路的电阻端Rc连接电源,电阻-电容串 联电路的电容端Cc接地。检测端口(GPIOC)连接到电阻-电容串联电路 中的电容Cc和电阻Rc之间,作为所述连接点C。在这种情况下,所述第 一电平为高电平,以及所述第二电平为低电平。In Fig. 7, the resistor-capacitor circuits in the hardware information identification device 320 are resistor-capacitor series circuits Rc, Cc. The resistor terminal Rc of the resistor-capacitor series circuit is connected to the power supply, and the capacitor terminal Cc of the resistor-capacitor series circuit is grounded. The detection port (GPIOC) is connected between the capacitor Cc and the resistor Rc in the resistor-capacitor series circuit as the connection point C. In this case, the first level is a high level, and the second level is a low level.

当开始检测硬件信息时,把端口GPIOC置为输出低电平。此时。连 接点C的电平为低。例如,等待100ms,以使得RC串联电路达到稳定状 态。When starting to detect hardware information, the port GPIOC is set to output low level. at this time. The level of connection point C is low. For example, wait 100ms for the RC series circuit to stabilize.

接着,把端口GPIOC设置为高电平触发中断模式,并打开定时器31。Next, set the port GPIOC to high-level trigger interrupt mode, and turn on the timer 31.

当端口GPIOC触发中断时,读出定时器的时间,作为触发时间。可 以设置不同的Rc和Cc值,从而使得触发时间不同。可以基于不同的触发 时间来确定不同的硬件信息。例如,下面的表4示出了电阻值、电容值及 其对应的触发时间。When the port GPIOC triggers an interrupt, the time of the timer is read out as the trigger time. Different Rc and Cc values can be set, resulting in different trigger times. Different hardware information can be determined based on different trigger times. For example, Table 4 below shows the resistor values, capacitor values and their corresponding trigger times.

表4Table 4

R1R1 C1C1 时间time 硬件版本1Hardware version 1 1KΩ1KΩ 0.1uF0.1uF 0.1ms0.1ms 硬件版本2Hardware version 2 5KΩ5KΩ 0.1uF0.1uF 0.5ms0.5ms 硬件版本3Hardware version 3 10KΩ10KΩ 0.1uF0.1uF 1ms1ms 硬件版本4Hardware version 4 15KΩ15KΩ 0.1uF0.1uF 1.5ms1.5ms 硬件版本5Hardware version 5 20KΩ20KΩ 0.1uF0.1uF 2ms2ms 硬件版本6Hardware version 6 25KΩ25KΩ 0.1uF0.1uF 2.5ms2.5ms 硬件版本7Hardware version 7 30KΩ30KΩ 0.1uF0.1uF 3.0ms3.0ms 硬件版本8Hardware version 8 35KΩ35KΩ 0.1uF0.1uF 3.5ms3.5ms 硬件版本9Hardware version 9 40KΩ40KΩ 0.1uF0.1uF 4.0ms4.0ms 硬件版本10Hardware version 10 45KΩ45KΩ 0.1uF0.1uF 4.5ms4.5ms 硬件版本11Hardware version 11 50KΩ50KΩ 0.1uF0.1uF 5.0ms5.0ms 硬件版本12Hardware version 12 55KΩ55KΩ 0.1uF0.1uF 5.5ms5.5ms 硬件版本13Hardware version 13 60KΩ60KΩ 0.1uF0.1uF 6.0ms6.0ms 硬件版本14Hardware version 14 65KΩ65KΩ 0.1uF0.1uF 6.5ms6.5ms 硬件版本15Hardware version 15 70KΩ70KΩ 0.1uF0.1uF 7.0ms7.0ms 硬件版本16Hardware version 16 75KΩ75KΩ 0.1uF0.1uF 7.5ms7.5ms 硬件版本17Hardware version 17 80KΩ80KΩ 0.1uF0.1uF 8.0ms8.0ms 硬件版本18Hardware version 18 85KΩ85KΩ 0.1uF0.1uF 8.5ms8.5ms 硬件版本19Hardware version 19 90KΩ90KΩ 0.1uF0.1uF 9.0ms9.0ms 硬件版本20Hardware version 20 95KΩ95KΩ 0.1uF0.1uF 9.5ms9.5ms 硬件版本21Hardware version 21 100KΩ100KΩ 0.1uF0.1uF 10.0ms 10.0ms

【第四实施例】[Fourth Embodiment]

图8示出了根据第四实施例的检测硬件信息的系统的电路图。FIG. 8 shows a circuit diagram of a system for detecting hardware information according to a fourth embodiment.

图8示出了硬件信息检测装置410和硬件信息标识装置420。FIG. 8 shows the hardware information detection device 410 and the hardware information identification device 420 .

硬件信息检测装置410包括处理装置40。处理装置40可以是中央处 理器,并且包括检测端口,例如,GPIO端口GPIOD。处理装置40中还可 以包括计时器41,用于计算触发时间。The hardware information detection device 410 includes a processing device 40 . The processing device 40 may be a central processing unit and includes a detection port, such as a GPIO port GPIOD. The processing device 40 may also include a timer 41 for calculating the trigger time.

在图8中,硬件信息标识装置420中的电阻-电容电路是电阻-电容串 联电路Rd、Cd。电阻-电容串联电路的电阻端Rd接地,电阻-电容串联电 路的电容端Cd连接电源。检测端口(GPIOD)连接到电阻-电容串联电路 中的电容Cd和电阻Rd之间,作为所述连接点D。在这种情况下,所述第 一电平为低电平,以及所述第二电平为高电平。In Fig. 8, the resistor-capacitor circuits in the hardware information identification device 420 are resistor-capacitor series circuits Rd, Cd. The resistor terminal Rd of the resistor-capacitor series circuit is grounded, and the capacitor terminal Cd of the resistor-capacitor series circuit is connected to the power supply. The detection port (GPIOD) is connected between the capacitor Cd and the resistor Rd in the resistor-capacitor series circuit as the connection point D. In this case, the first level is a low level, and the second level is a high level.

当开始检测硬件信息时,把端口GPIOD置为输出高电平。此时。连 接点D的电平为高。例如,等待100ms,以使得RC串联电路达到稳定状 态。When starting to detect hardware information, the port GPIOD is set to output high level. at this time. The level of connection point D is high. For example, wait 100ms for the RC series circuit to stabilize.

接着,把端口GPIOD设置为低电平触发中断模式,并打开定时器41。Next, the port GPIOD is set to low level trigger interrupt mode, and the timer 41 is turned on.

当端口GPIOD触发中断时,读出定时器的时间,作为触发时间。可 以设置不同的Rd和Cd值,从而使得触发时间不同。可以基于不同的触发 时间来确定不同的硬件信息。When the port GPIOD triggers an interrupt, the time of the timer is read out as the trigger time. Different Rd and Cd values can be set, resulting in different trigger times. Different hardware information can be determined based on different trigger times.

【第五实施例】[Fifth Embodiment]

如图5-8所示,这里公开的实施例还包括一种硬件信息标识装置,包 括电阻-电容电路,例如,RC串联电路或RC并联电路。该电阻-电容电路 包括用于连接到检测端口的连接点,该连接点在待检测硬件中的默认电平 是第一电平,所述电阻-电容电路的电阻和电容被设置成使得该电阻-电容电 路从第二电平转换到第一电平的时间标识待检测硬件的信息。如上面的表 3、4所示,可以通过不同的电阻值和电容值设置不同的转换时间(触发时间)。As shown in Figures 5-8, the embodiments disclosed herein also include a hardware information identification device including a resistor-capacitor circuit, such as an RC series circuit or an RC parallel circuit. The resistor-capacitor circuit includes a connection point for connection to the detection port, the default level of the connection point in the hardware to be detected is the first level, and the resistance and capacitance of the resistor-capacitor circuit are set such that the resistance - The time at which the capacitive circuit transitions from the second level to the first level identifies the information of the hardware to be detected. As shown in Tables 3 and 4 above, different transition times (trigger times) can be set with different resistor and capacitor values.

【第六实施例】[Sixth Embodiment]

图9示出了根据第六实施例的检测硬件信息的方法的示意性流程图。FIG. 9 shows a schematic flowchart of a method for detecting hardware information according to a sixth embodiment.

如图9所示,在步骤S2,通过检测端口将该检测端口与电阻-电容电 路的连接点的电平设置为不同于第一电平的第二电平,其中,第一电平是 该连接点在待检测硬件中的默认电平。As shown in FIG. 9, in step S2, the level of the connection point between the detection port and the resistor-capacitor circuit is set to a second level different from the first level by the detection port, wherein the first level is the The default level of the connection point in the hardware to be detected.

在步骤S4,将检测端口设置为由第一电平触发的中断模式。In step S4, the detection port is set to the interrupt mode triggered by the first level.

在步骤S6,检测检测端口电平值由第二电平变化至第一电平所需的 时间,该时间即为触发中断所需的触发时间。In step S6, the time required for the level value of the detection port to change from the second level to the first level is detected, and this time is the trigger time required for triggering the interrupt.

在步骤S8,基于所述触发时间确定所述待检测硬件的信息。In step S8, the information of the hardware to be detected is determined based on the trigger time.

上面的各个实施例可以相互参考,在关于后面的实施例的描述中,省 略与前面实施例中相同或类似元素的描述。The above embodiments may refer to each other, and in descriptions about the following embodiments, descriptions of the same or similar elements as those in the previous embodiments are omitted.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他 变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、 物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素, 或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更 多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括 该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于 上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制 性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和 权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护 之内。The embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of the present invention, without departing from the spirit of the present invention and the scope protected by the claims, many forms can be made, which all belong to the protection of the present invention.

Claims (10)

1. A hardware information detection apparatus comprising:
processing means comprising a detection port for connection to a resistor-capacitor circuit of the hardware to be detected, a default level of a connection point of the detection port and the resistor-capacitor circuit in the hardware to be detected being a first level,
wherein the processing device executes the following processing:
setting a level of the connection point to a second level through the detection port, wherein the second level is different from the first level;
setting the detection port to an interrupt mode triggered by a first level;
detecting the time required for the level value of the detection port to change from the second level to the first level, wherein the time is the trigger time required for triggering interruption; and
and determining the information of the hardware to be detected based on the trigger time.
2. The hardware detection device according to claim 1, wherein, in a case where the resistor-capacitor circuit is a resistor-capacitor parallel circuit, one end of the resistor-capacitor parallel circuit is grounded, and the other end of the resistor-capacitor parallel circuit is connected to the detection port as a connection point, the first level is a low level, and the second level is a high level.
3. The hardware detection device according to claim 1, wherein, in a case where the resistor-capacitor circuit is a resistor-capacitor parallel circuit, one end of the resistor-capacitor parallel circuit is connected to a power supply, and the other end of the resistor-capacitor parallel circuit is connected to the detection port as a connection point, the first level is a high level, and the second level is a low level.
4. The hardware detection device according to claim 1, wherein, in a case where the resistor-capacitor circuit is a resistor-capacitor series circuit, a resistor end of the resistor-capacitor series circuit is connected to a power supply, a capacitor end of the resistor-capacitor series circuit is connected to ground, and the detection port is connected between a capacitor and a resistor in the resistor-capacitor series circuit as the connection point, the first level is a high level, and the second level is a low level.
5. The hardware detection device according to claim 1, wherein, in a case where the resistor-capacitor circuit is a resistor-capacitor series circuit, a resistor end of the resistor-capacitor series circuit is grounded, a capacitor end of the resistor-capacitor series circuit is connected to a power supply, and the detection port is connected between a capacitor and a resistor in the resistor-capacitor series circuit as the connection point, the first level is a low level, and the second level is a high level.
6. The hardware detection device according to claim 1, wherein the information of the hardware to be detected includes at least one of version information of the hardware to be detected and product information of the hardware to be detected.
7. The hardware detection device of claim 1, wherein the detection port is a GPIO port of the processing device.
8. The hardware detection device of claim 1, wherein the hardware detection device waits more than 100ms after the processing device sets the level of the connection point to the second level through the detection port.
9. A hardware information identification apparatus comprising a resistor-capacitor circuit comprising a connection point for connection to a detection port, the connection point having a default level in hardware to be detected which is a first level, the resistor and capacitor of the resistor-capacitor circuit being arranged such that: the time at which the resistor-capacitor circuit transitions from the second level to the first level is used to identify information about the hardware to be tested.
10. A hardware information detection method comprises the following steps:
setting the level of a connection point of the detection port and the resistor-capacitor circuit to a second level different from a first level through the detection port, wherein the first level is a default level of the connection point in the hardware to be detected;
setting the detection port to an interrupt mode triggered by a first level;
detecting the time required for the level value of the detection port to change from the second level to the first level, wherein the time is the trigger time required for triggering interruption; and
and determining the information of the hardware to be detected based on the trigger time.
CN202010120777.7A 2020-02-26 2020-02-26 Hardware information detection device, identification device and method Pending CN111324498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010120777.7A CN111324498A (en) 2020-02-26 2020-02-26 Hardware information detection device, identification device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010120777.7A CN111324498A (en) 2020-02-26 2020-02-26 Hardware information detection device, identification device and method

Publications (1)

Publication Number Publication Date
CN111324498A true CN111324498A (en) 2020-06-23

Family

ID=71168036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010120777.7A Pending CN111324498A (en) 2020-02-26 2020-02-26 Hardware information detection device, identification device and method

Country Status (1)

Country Link
CN (1) CN111324498A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4231102A1 (en) * 2022-02-18 2023-08-23 Yokogawa Electric Corporation Identification circuit and identification method
CN116644011A (en) * 2023-05-31 2023-08-25 合芯科技有限公司 Quick identification method, device and equipment of I2C equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080042701A1 (en) * 2006-07-24 2008-02-21 Raphael Weiss Resistor/Capacitor Based Identification Detection
CN101788609A (en) * 2010-02-09 2010-07-28 华为终端有限公司 Resistance value measuring method and device or capacitance value measuring method and device
CN102216918A (en) * 2011-05-30 2011-10-12 华为终端有限公司 Method and device for obtaining equipment identification information
CN108768379A (en) * 2018-05-31 2018-11-06 华勤通讯技术有限公司 Polymorphic recognition methods, system and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080042701A1 (en) * 2006-07-24 2008-02-21 Raphael Weiss Resistor/Capacitor Based Identification Detection
CN101788609A (en) * 2010-02-09 2010-07-28 华为终端有限公司 Resistance value measuring method and device or capacitance value measuring method and device
CN102216918A (en) * 2011-05-30 2011-10-12 华为终端有限公司 Method and device for obtaining equipment identification information
CN108768379A (en) * 2018-05-31 2018-11-06 华勤通讯技术有限公司 Polymorphic recognition methods, system and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4231102A1 (en) * 2022-02-18 2023-08-23 Yokogawa Electric Corporation Identification circuit and identification method
CN116644011A (en) * 2023-05-31 2023-08-25 合芯科技有限公司 Quick identification method, device and equipment of I2C equipment and storage medium
CN116644011B (en) * 2023-05-31 2023-11-03 合芯科技有限公司 A quick identification method, device, equipment and storage medium for I2C devices

Similar Documents

Publication Publication Date Title
CN111106821B (en) Touch control method and wearable device
CN109101327B (en) Switching of light application and mobile terminal
CN107911445A (en) A kind of information push method, mobile terminal and storage medium
CN110471559B (en) False touch prevention method and mobile terminal
CN107635073A (en) Method for operating a mobile terminal and the mobile terminal
CN107887947B (en) A charging port protection method and mobile terminal
CN109002245A (en) Method for operating application interface and mobile terminal
CN108388400B (en) An operation processing method and mobile terminal
CN111651387B (en) Interface Circuits and Electronic Equipment
CN108536349B (en) Icon management method and mobile terminal
CN111324498A (en) Hardware information detection device, identification device and method
CN109151143B (en) Foreign matter detection structure and method and mobile terminal
CN108008892A (en) The method and terminal that a kind of function enables
CN107861786A (en) The reminding method and mobile terminal of a kind of notice
CN108595352B (en) Protection method and device for mobile terminal
CN108540642B (en) Operation method of mobile terminal and mobile terminal
CN110764650A (en) Button trigger detection method and electronic device
CN110190641B (en) Charging control circuit, terminal equipment and data cable
CN108900942B (en) A playback control method and electronic device
CN110673761A (en) Detection method of touch key and terminal equipment thereof
CN111310165A (en) Account switching or registering method and electronic equipment
CN107995372A (en) A kind of false touch ground connection identifying processing method, circuit and mobile terminal
CN110825682B (en) USB control method and electronic equipment
CN108668005A (en) A terminal detection method and terminal
CN108196744A (en) The method of adjustment and mobile terminal of a kind of task interface

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200623