A connection state determination method and apparatus, chip, medium, and program product
By introducing multiple pull-up and pull-down resistors into the chip, using configuration information to control the on/off state of the switching transistor, and obtaining voltage signals to determine the connection status, the high cost of detecting multiple states with a single pin is solved, and low-cost multi-state detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-09
Smart Images

Figure CN122171978A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip technology, and in particular to a method, apparatus, chip, medium, and program product for determining connection status. Background Technology
[0002] The interaction between the chip and external devices (such as batteries and memory cards) is crucial. In this process, the chip needs to quickly and accurately identify the connection status between the chip and the external hardware, such as determining whether the connection status between the chip and the external device is in a pull-up or pull-down state, in order to configure the corresponding driver strategy or functional mode.
[0003] In related technologies, chips can only detect two connection states (pull-up and pull-down) through a single input / output pin. To identify more connection states, additional input / output pins are required. This results in high costs for the methods described in these technologies.
[0004] Therefore, there is an urgent need for a method that can detect multiple connection states between a chip and external devices using a single input / output pin. Summary of the Invention
[0005] This application provides a method, apparatus, chip, medium, and program product for determining connection status, which can detect multiple connection statuses between the chip and external devices using a single input / output pin.
[0006] In a first aspect, embodiments of this application provide a method for determining a connection state, applied to a chip. The chip includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to a power supply through the switching transistors corresponding to the pull-up resistors and the pull-up resistors; the input / output pins are connected to ground through the switching transistors corresponding to the pull-down resistors and the pull-down resistors.
[0007] The methods include:
[0008] Acquire the current voltage signal corresponding to multiple configuration information; wherein, the current voltage signal is the voltage signal of the input and output pins when the on / off state of each switch is controlled based on the configuration information; the target on / off state of each switch is different indicated by different configuration information;
[0009] Based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal, determine the connection status of the input and output pins.
[0010] In one implementation, the current voltage signal corresponding to multiple configuration information is obtained, including:
[0011] Obtain the first current voltage signal corresponding to the initial configuration information from multiple configuration information; the initial configuration information indicates that the target on / off state of each switch is off.
[0012] Determine whether the first current voltage signal is a high voltage signal in the preset voltage signals;
[0013] If the first current voltage signal is determined to be a high voltage signal, the current voltage signal corresponding to at least one drop-down configuration information is obtained; the drop-down configuration information belongs to multiple configuration information.
[0014] or,
[0015] If it is determined that the first current voltage signal is not a high voltage signal, the current voltage signal corresponding to at least one pull-up configuration information is obtained; the pull-up configuration information belongs to multiple configuration information.
[0016] In one implementation, the multiple pull-down resistors include strong pull-down resistors and weak pull-down resistors; obtaining the current voltage signal corresponding to at least one pull-down configuration information includes:
[0017] Obtain the second current voltage signal corresponding to the first pull-down configuration information; the first pull-down configuration information indicates that the target on / off state of the switch corresponding to the strong pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-down resistor and the switch corresponding to each pull-up resistor is open; the first pull-down configuration information belongs to at least one pull-down configuration information;
[0018] Based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal, determine the connection status of the input and output pins, including:
[0019] Determine whether the second current voltage signal is a high voltage signal in the preset voltage signals;
[0020] If the second current voltage signal is determined to be a high voltage signal, the connection state is determined to be a strong pull-up state.
[0021] In one implementation, the method also includes:
[0022] If it is determined that the second current voltage signal is not a high voltage signal, the third current voltage signal corresponding to the second pull-down configuration information is obtained; the second pull-down configuration information indicates that the target on / off state of the switch corresponding to the weak pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-down resistor and the switch corresponding to each pull-up resistor is open; the second pull-down configuration information belongs to at least one pull-down configuration information.
[0023] Determine whether the third current voltage signal is a high voltage signal;
[0024] If the third current voltage signal is determined to be a high voltage signal, the connection state is determined to be a weak pull-up state; or,
[0025] If it is determined that the third current voltage signal is not a high voltage signal, the connection state is determined to be floating.
[0026] In one implementation, the multiple pull-up resistors include strong pull-up resistors and weak pull-up resistors; obtaining the current voltage signal corresponding to at least one pull-up configuration information includes:
[0027] Obtain the fourth current voltage signal corresponding to the first pull-up configuration information; the first pull-up configuration information indicates that the target on / off state of the switch corresponding to the strong pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-up resistor and the switch corresponding to each pull-down resistor is open; the first pull-up configuration information belongs to at least one pull-up configuration information;
[0028] Based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal, determine the connection status of the input and output pins, including:
[0029] Determine whether the fourth current voltage signal is a low voltage signal among the preset voltage signals;
[0030] If the fourth current voltage signal is determined to be a low voltage signal, the connection state is determined to be a strong pull-down state.
[0031] In one implementation, the method also includes:
[0032] If it is determined that the fourth current voltage signal is not a low voltage signal, the fifth current voltage signal corresponding to the second pull-up configuration information is obtained; the second pull-up configuration information indicates that the target on / off state of the switch corresponding to the weak pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-up resistor and the switch corresponding to each pull-down resistor is open; the second pull-up configuration information belongs to at least one pull-up configuration information.
[0033] Determine whether the fifth current voltage signal is a low voltage signal;
[0034] If the fifth current voltage signal is determined to be a low voltage signal, the connection state is determined to be a weak pull-down state; or,
[0035] If it is determined that the fifth current voltage signal is not a low voltage signal, the connection state is determined to be floating.
[0036] Secondly, embodiments of this application provide a connection state determination device applied to a chip. The chip includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to a power supply through the switching transistors corresponding to the pull-up resistors and the pull-up resistors. The input / output pins are connected to ground through the switching transistors corresponding to the pull-down resistors and the pull-down resistors.
[0037] The device includes:
[0038] The acquisition module is used to acquire the current voltage signal corresponding to multiple configuration information; wherein, the current voltage signal is the voltage signal of the input and output pins when the on / off state of each switch is controlled based on the configuration information; different configuration information indicates different target on / off states of each switch.
[0039] The processing module is used to determine the connection status of the input and output pins based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal.
[0040] In one implementation, the acquisition module is specifically used for:
[0041] Obtain the first current voltage signal corresponding to the initial configuration information from multiple configuration information; the initial configuration information indicates that the target on / off state of each switch is off.
[0042] Determine whether the first current voltage signal is a high voltage signal in the preset voltage signals;
[0043] If the first current voltage signal is determined to be a high voltage signal, the current voltage signal corresponding to at least one drop-down configuration information is obtained; the drop-down configuration information belongs to multiple configuration information.
[0044] or,
[0045] If it is determined that the first current voltage signal is not a high voltage signal, the current voltage signal corresponding to at least one pull-up configuration information is obtained; the pull-up configuration information belongs to multiple configuration information.
[0046] In one implementation, the multiple pull-down resistors include strong pull-down resistors and weak pull-down resistors; the acquisition module is specifically used for:
[0047] Obtain the second current voltage signal corresponding to the first pull-down configuration information; the first pull-down configuration information indicates that the target on / off state of the switch corresponding to the strong pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-down resistor and the switch corresponding to each pull-up resistor is open; the first pull-down configuration information belongs to at least one pull-down configuration information;
[0048] The processing module is specifically used for:
[0049] Determine whether the second current voltage signal is a high voltage signal in the preset voltage signals;
[0050] If the second current voltage signal is determined to be a high voltage signal, the connection state is determined to be a strong pull-up state.
[0051] In one implementation,
[0052] The acquisition module is further configured to acquire a third current voltage signal corresponding to the second pull-down configuration information when it is determined that the second current voltage signal is not a high voltage signal; the second pull-down configuration information indicates that the target on / off state of the switch corresponding to the weak pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-down resistor and the switch corresponding to each pull-up resistor is open; the second pull-down configuration information belongs to at least one pull-down configuration information.
[0053] The processing module is also used to determine whether the third current voltage signal is a high voltage signal;
[0054] The processing module is also used to determine the connection state as a weak pull-up state when it is determined that the third current voltage signal is a high voltage signal; or,
[0055] The processing module is also used to determine that the connection state is floating if it is determined that the third current voltage signal is not a high voltage signal.
[0056] In one implementation, the multiple pull-up resistors include strong pull-up resistors and weak pull-up resistors; the acquisition module is specifically used for:
[0057] Obtain the fourth current voltage signal corresponding to the first pull-up configuration information; the first pull-up configuration information indicates that the target on / off state of the switch corresponding to the strong pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-up resistor and the switch corresponding to each pull-down resistor is open; the first pull-up configuration information belongs to at least one pull-up configuration information;
[0058] The processing module is specifically used for:
[0059] Determine whether the fourth current voltage signal is a low voltage signal among the preset voltage signals;
[0060] If the fourth current voltage signal is determined to be a low voltage signal, the connection state is determined to be a strong pull-down state.
[0061] In one implementation,
[0062] The acquisition module is further configured to acquire the fifth current voltage signal corresponding to the second pull-up configuration information when it is determined that the fourth current voltage signal is not a low voltage signal; the second pull-up configuration information indicates that the target on / off state of the switch corresponding to the weak pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-up resistor and the switch corresponding to each pull-down resistor is open; the second pull-up configuration information belongs to at least one pull-up configuration information.
[0063] The processing module is also used to determine whether the fifth current voltage signal is a low voltage signal;
[0064] The processing module is also used to determine, when the fifth current voltage signal is determined to be a low voltage signal, the connection state as a weak pull-down state; or,
[0065] The processing module is also used to determine that the connection state is floating if it is determined that the fifth current voltage signal is not a low voltage signal.
[0066] Thirdly, embodiments of this application provide a chip, comprising:
[0067] Input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor; the input / output pins are connected to the power supply through the switching transistors corresponding to the pull-up resistors and the pull-up resistors; the input / output pins are connected to ground through the switching transistors corresponding to the pull-down resistors and the pull-down resistors.
[0068] The chip is used to perform the method as described in the first aspect.
[0069] Fourthly, this application provides a chip module on which a computer program is stored. When the computer program is executed by the chip module, it implements the method as described in any of the first aspects.
[0070] Fifthly, embodiments of this application provide an electronic device, which includes a chip;
[0071] The chip is used to perform the method as described in the first aspect.
[0072] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method of the first aspect.
[0073] In a seventh aspect, embodiments of this application provide a computer program product, including computer execution instructions, which, when executed by a processor, cause the method of the first aspect to be performed.
[0074] This application provides a method, apparatus, chip, medium, and program product for determining connection status. The chip includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to a power supply via the switching transistors corresponding to the pull-up resistors and the pull-up resistors themselves; the input / output pins are connected to ground via the switching transistors corresponding to the pull-down resistors and the pull-down resistors themselves. The chip can acquire current voltage signals corresponding to multiple configuration information; wherein, the current voltage signal is the voltage signal of the input / output pins when the on / off state of each switching transistor is controlled based on the configuration information; different configuration information indicates different target on / off states for each switching transistor. The chip can determine the connection status corresponding to the input / output pins based on the current voltage signals corresponding to multiple configuration information and a preset voltage signal. In other words, using the above method, multiple connection statuses between the chip and external devices can be detected using only one input / output pin, reducing detection costs. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1a A schematic diagram illustrating an application scenario provided in an embodiment of this application;
[0077] Figure 1b This is a schematic diagram of the structure of a chip provided in an embodiment of this application;
[0078] Figure 2 A flowchart illustrating a method for determining connection status according to an embodiment of this application;
[0079] Figure 3 A flowchart illustrating a second embodiment of a method for determining connection status provided in this application;
[0080] Figure 4 A flowchart illustrating a third embodiment of a method for determining connection status provided in this application;
[0081] Figure 5 This is a schematic diagram of a connection state determination device provided in an embodiment of this application. Detailed Implementation
[0082] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0083] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0084] In this application, "at least one" refers to one or more, and "multiple" refers to two or more. Furthermore, the word "equal to" in this application can be used with either "greater than" or "less than". When "equal to" and "greater than" are used together, the technical solution using "greater than" is adopted; when "equal to" and "less than" are used together, the technical solution using "less than" is adopted.
[0085] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0086] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0087] Figure 1a This is a schematic diagram illustrating an application scenario provided in an embodiment of this application.
[0088] Please see Figure 1a This application scenario may include electronic devices 10. It should be noted that the electronic device may be a mobile phone, a laptop, an IoT device, a television, or other devices; this application embodiment does not limit this.
[0089] Electronic device 10 may include chip 20 and external device 30. For example, the external device may be a battery, or more specifically, a memory card.
[0090] The interaction between chip 20 and external device 30 is crucial. In this process, chip 20 needs to quickly and accurately identify the connection status between chip 20 and external device 30, such as determining whether the connection status between chip 20 and external device 30 is in a pull-up or pull-down state, in order to configure the corresponding driver strategy or functional mode.
[0091] In related technologies, chip 20 can only detect two connection states (pull-up and pull-down) through a single input / output pin 20a. To identify more connection states, additional input / output pins are required. This results in the high cost of the methods described in related technologies.
[0092] Therefore, there is an urgent need for a method that can detect the connection status between a chip and an external device using a single input / output pin.
[0093] Based on this, this application provides a method for determining the connection state. The chip includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to the power supply through the switching transistors corresponding to the pull-up resistors and the pull-up resistors themselves; the input / output pins are connected to ground through the switching transistors corresponding to the pull-down resistors and the pull-down resistors themselves. The chip can acquire current voltage signals corresponding to multiple configuration information. The current voltage signal is the voltage signal of the input / output pins when the on / off state of each switching transistor is controlled based on the configuration information. Different configuration information indicates different target on / off states for each switching transistor. The chip can determine the connection state corresponding to the input / output pins based on the current voltage signals corresponding to multiple configuration information and a preset voltage signal.
[0094] In other words, by using the above method, multiple connection states between the chip and external devices can be detected using only one input / output pin, thus reducing detection costs.
[0095] Figure 1b This is a schematic diagram of the structure of a chip provided in an embodiment of this application.
[0096] Below, in conjunction with Figure 1b The chip will be explained.
[0097] like Figure 1b As shown, chip 20 may include input / output pins 20a, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor.
[0098] It should be noted that the resistance values of the multiple pull-up resistors are different, and the resistance values of the multiple pull-down resistors are also different. It should also be noted that the number of pull-up resistors and the number of pull-down resistors can be the same or different; this application does not impose any limitation on this.
[0099] Input / output pin 20a is connected to the power supply (VCC) through the corresponding switch and the pull-up resistor. Input / output pin 20a is connected to ground (GND) through the corresponding switch and the pull-down resistor.
[0100] For example, Figure 1b Two pull-up resistors are shown, namely pull-up resistor R1 and pull-up resistor R2. Additionally, Figure 1b The switch Q1 corresponding to pull-up resistor R1 and the switch Q2 corresponding to pull-up resistor R2 are also shown.
[0101] The input / output pin 20a is connected to the power supply (VCC) through the switch Q1 corresponding to the pull-up resistor R1 and the pull-up resistor R1.
[0102] The input / output pin 20a is connected to the power supply (VCC) through the switch Q2 corresponding to the pull-up resistor R2 and the pull-up resistor R2.
[0103] It should be noted that pull-up resistor R1 is a strong pull-up resistor, and pull-up resistor R2 is a weak pull-up resistor. It should also be noted that when pull-up resistor R1 is a strong pull-up resistor and pull-up resistor R2 is a weak pull-up resistor, the resistance value of pull-up resistor R1 is less than the resistance value of pull-up resistor R2. Furthermore, a strong pull-up resistor refers to a resistor with a resistance value less than a first preset resistance value. A weak pull-up resistor refers to a resistor with a resistance value greater than or equal to the first preset resistance value.
[0104] For example, Figure 1b Two pull-down resistors are shown: pull-down resistor R3 and pull-down resistor R4. Additionally, Figure 1b The switch Q3 corresponding to pull-down resistor R3 and the switch Q4 corresponding to pull-down resistor R4 are also shown.
[0105] The input / output pin 20a is connected to ground through the switch Q3 corresponding to the pull-down resistor R3 and the pull-down resistor R3.
[0106] The input / output pin 20a is connected to ground through the switch Q4 corresponding to the pull-down resistor R4 and the pull-down resistor R4.
[0107] It should be noted that pull-down resistor R3 is a strong pull-down resistor, and pull-down resistor R4 is a weak pull-down resistor. It should also be noted that when pull-down resistor R3 is a strong pull-down resistor and pull-down resistor R4 is a weak pull-down resistor, the resistance value of pull-down resistor R3 is less than the resistance value of pull-down resistor R4. Furthermore, a strong pull-down resistor refers to a resistor with a resistance value less than the second preset resistance value. A weak pull-down resistor refers to a resistor with a resistance value greater than or equal to the second preset resistance value.
[0108] The technical solutions shown in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; for identical or similar content, the description will not be repeated in different embodiments.
[0109] Figure 2 This is a flowchart illustrating a method for determining connection status according to an embodiment of this application. Please refer to... Figure 2 The method may include:
[0110] S201: Obtain the current voltage signal corresponding to multiple configuration information.
[0111] In this embodiment, the chip can acquire the current voltage signal corresponding to multiple configuration information. It should be noted that the number of configuration information items is related to the number of pull-up and pull-down resistors.
[0112] The current voltage signal refers to the voltage signal at the input and output pins when the on / off state of each switch is controlled based on the configuration information. It should be noted that the chip can control the on / off state of each switch by setting the values of the registers corresponding to each switch according to the configuration information.
[0113] It should be noted that the target on / off states of each switch are different depending on the configuration information. It should also be noted that for any given configuration information, the target on / off state of one switch is closed, while the target on / off state of the other switches is open.
[0114] In one implementation:
[0115] Multiple configuration information items include initial configuration information.
[0116] The chip can acquire the first current voltage signal corresponding to the initial configuration information from multiple configuration information sets. It should be noted that the initial configuration information indicates that the target on / off state of each switch is off. In other words, the chip can control the on / off state of each switch to be off based on the initial configuration information. When the on / off state of each switch is off, the chip can acquire the first current voltage signal (x1) of the input / output pins. It should also be noted that when the on / off state of each switch is off, the input / output pins are neither connected to the power supply through pull-up resistors nor to ground through pull-down resistors.
[0117] The chip can determine whether the first current voltage signal is a high voltage signal among preset voltage signals. If the chip determines that the first current voltage signal is a high voltage signal, it can acquire the current voltage signal corresponding to at least one pull-down configuration information; wherein the pull-down configuration information belongs to multiple configuration information. Alternatively, if the chip determines that the first current voltage signal is not a high voltage signal, it can acquire the current voltage signal corresponding to at least one pull-up configuration information; wherein the pull-up configuration information belongs to multiple configuration information.
[0118] In one implementation:
[0119] The chip can sort multiple configuration information entries to obtain a sequence number for each entry. Specifically, when the configuration information indicates that the switch corresponding to a pull-up resistor is in a closed state, the larger the resistance value of the pull-up resistor, the smaller the sequence number of the configuration information. Conversely, when the configuration information indicates that the switch corresponding to a pull-down resistor is in a closed state, the larger the resistance value of the pull-down resistor, the larger the sequence number of the configuration information.
[0120] For configuration information with sequence number j, the chip can obtain the current voltage signal corresponding to that configuration information. The chip can determine whether the current voltage signal corresponding to that configuration information is a low voltage signal among preset voltage signals. If so, the chip can determine the connection state corresponding to the input / output pin based on the connection state corresponding to that configuration information. If not, the chip can determine the current voltage signal corresponding to configuration information with sequence number j+1 from the current voltage signals corresponding to multiple configuration information.
[0121] Here, j takes values 1, 2, ..., up to M. M is the number of configuration information items.
[0122] In one implementation:
[0123] The chip can sort multiple configuration information entries to obtain a sequence number for each entry. Specifically, when the configuration information indicates that the switch corresponding to a pull-up resistor is in a closed state, the larger the resistance value of the pull-up resistor, the smaller the sequence number of the configuration information. Conversely, when the configuration information indicates that the switch corresponding to a pull-down resistor is in a closed state, the larger the resistance value of the pull-down resistor, the larger the sequence number of the configuration information.
[0124] For configuration information with sequence number k, the chip can obtain the current voltage signal corresponding to that configuration information. The chip can determine whether the current voltage signal corresponding to that configuration information is a high voltage signal among the preset voltage signals. If so, the chip can determine the connection state corresponding to the input / output pin based on the connection state corresponding to that configuration information. If not, the chip can determine the current voltage signal corresponding to configuration information with sequence number k-1 from the current voltage signals corresponding to multiple configuration information.
[0125] Where k takes values M, M-1, ..., up to 1. M is the number of configuration information items.
[0126] It should be noted that the chip may also use other sequences to obtain the current voltage signals corresponding to multiple configuration information, and this application embodiment does not limit this.
[0127] S202: Determine the connection status of the input / output pins based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal.
[0128] In this embodiment, the chip can determine the connection status of the input and output pins based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal.
[0129] In one implementation:
[0130] If the first current voltage signal is determined not to be a high voltage signal, the chip can sort the multiple pull-up resistors according to their resistance values to obtain a sorting sequence number. It should be noted that the larger the resistance value, the smaller the sorting sequence number.
[0131] For a pull-up resistor with sequence number i, the chip can determine the configuration information corresponding to the pull-up resistor with sequence number i, and whether the corresponding current voltage signal is a low voltage signal (a low voltage signal in the preset voltage signal).
[0132] If so, the chip can determine the connection status corresponding to the configuration information of the pull-up resistor with sequence number i as the connection status of the input / output pin.
[0133] If not, the chip can determine the current voltage signal corresponding to the pull-up resistor with the sorting sequence number i+1 from the current voltage signals corresponding to multiple configuration information.
[0134] Where i takes values of 1, 2, ..., up to N-1. N is the number of pull-up resistors.
[0135] It should be noted that for a pull-up resistor with sequence number N, the chip can determine the configuration information corresponding to the pull-up resistor with sequence number N, and whether the current voltage signal corresponding to it is a low voltage signal (a low voltage signal in the preset voltage signals). If so, the chip can determine the connection state corresponding to the configuration information of the pull-up resistor with sequence number N as the connection state corresponding to the input / output pin. If not, the chip can determine the floating state as the connection state corresponding to the input / output pin.
[0136] In one implementation:
[0137] Once the first current voltage signal is determined to be a high voltage signal, the chip can sort the multiple pull-down resistors according to their resistance values to obtain their sorting sequence numbers. It should be noted that the larger the resistance value, the smaller the sorting sequence number.
[0138] For a pull-down resistor with sorting number i, the chip can determine the configuration information corresponding to the pull-down resistor with sorting number i, and whether the corresponding current voltage signal is a high voltage signal (a high voltage signal in the preset voltage signal).
[0139] If so, the chip can determine the connection status corresponding to the configuration information of the pull-down resistor with sorting number i as the connection status of the input / output pin.
[0140] If not, the chip can determine the current voltage signal corresponding to the configuration information of the pull-down resistor with the sorting sequence number i+1 from the current voltage signals corresponding to multiple configuration information.
[0141] Where i takes values of 1, 2, ..., up to M-1. M is the number of pull-down resistors.
[0142] It should be noted that, for the pull-down resistor with sequence number M, the chip can determine the configuration information corresponding to the pull-down resistor with sequence number M and whether the current voltage signal corresponding to it is a high voltage signal (a high voltage signal in the preset voltage signals). If so, the chip can determine the connection state corresponding to the configuration information of the pull-down resistor with sequence number M as the connection state corresponding to the input / output pin. If not, the chip can determine the floating state as the connection state corresponding to the input / output pin.
[0143] In one implementation:
[0144] Multiple pull-down resistors include strong pull-down resistors and weak pull-down resistors.
[0145] The chip can determine whether the second current voltage signal corresponding to the first pull-down configuration information is a high voltage signal among preset voltage signals, provided that the first current voltage signal is determined to be a high voltage signal. Specifically, the first pull-down configuration information indicates that the target on / off state of the switch corresponding to the strong pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-down resistor and the switches corresponding to each pull-up resistor is open.
[0146] The chip can determine that the connection state is a strong pull-up state when it determines that the second current voltage signal is a high voltage signal.
[0147] If the chip determines that the second current voltage signal is not a high voltage signal, it can then determine whether the third current voltage signal corresponding to the second pull-down configuration information is a high voltage signal. Specifically, the second pull-down configuration information indicates that the target on / off state of the switch corresponding to the weak pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-down resistor and the switches corresponding to each pull-up resistor is open.
[0148] The chip can determine the connection state as a weak pull-up state if it determines that the third current voltage signal is a high voltage signal. Alternatively, the chip can determine the connection state as a floating state if it determines that the third current voltage signal is not a high voltage signal.
[0149] In one implementation:
[0150] Multiple pull-up resistors include strong pull-up resistors and weak pull-up resistors.
[0151] If the chip determines that the first current voltage signal is not a high voltage signal, it can then determine whether the fourth current voltage signal corresponding to the first pull-up configuration information is a low voltage signal among the preset voltage signals. Specifically, the first pull-up configuration information indicates that the target on / off state of the switch corresponding to the strong pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-up resistor and the switches corresponding to each pull-down resistor is open.
[0152] The chip can determine that the connection state is a strong pull-down state when it determines that the fourth current voltage signal is a low voltage signal.
[0153] If the chip determines that the fourth current voltage signal is not a low voltage signal, it can then determine whether the fifth current voltage signal corresponding to the second pull-up configuration information is a low voltage signal. The second pull-up configuration information indicates that the target on / off state of the switch corresponding to the weak pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-up resistor and the switches corresponding to each pull-down resistor is open.
[0154] The chip can determine the connection state as a weak pull-down state if it determines that the fifth current voltage signal is a low voltage signal. Alternatively, the chip can determine the connection state as a floating state if it determines that the fifth current voltage signal is not a low voltage signal.
[0155] The beneficial effects of this embodiment are as follows: In this embodiment, the chip includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to the power supply through the switching transistors corresponding to the pull-up resistors and the pull-up resistors themselves; the input / output pins are connected to ground through the switching transistors corresponding to the pull-down resistors and the pull-down resistors themselves. The chip can acquire current voltage signals corresponding to multiple configuration information; wherein, the current voltage signal is the voltage signal of the input / output pins when the on / off state of each switching transistor is controlled based on the configuration information; different configuration information indicates different target on / off states of each switching transistor. The chip can determine the connection state corresponding to the input / output pins based on the current voltage signals corresponding to multiple configuration information and preset voltage signals. In other words, through the above method, multiple connection states between the chip and external devices can be detected using a single input / output pin, reducing detection costs.
[0156] Figure 3 This is a flowchart illustrating a second embodiment of a method for determining connection status provided in this application. Please refer to... Figure 3 The method may include:
[0157] S301: Obtain the first current voltage signal corresponding to the initial configuration information among multiple configuration information.
[0158] In this embodiment, the chip can acquire the first current voltage signal corresponding to the initial configuration information among multiple configuration information.
[0159] The initial configuration information indicates that the target on / off state of each switch is off. In other words, the chip can control each pull-up resistor and each pull-down resistor to be in the off state.
[0160] It should be noted that when all switching transistors are in the off state, the input and output pins are neither connected to the power supply through pull-up resistors nor to ground through pull-down resistors. In this case, the first current voltage signal of the input and output pins depends on the external device.
[0161] S302: Determine whether the first current voltage signal is a high voltage signal in the preset voltage signals.
[0162] In this embodiment, the chip can determine whether the first current voltage signal (x1) is a high voltage signal.
[0163] The chip can execute S303 if it determines that the first current voltage signal is a high voltage signal.
[0164] or,
[0165] The chip can execute S305 if it determines that the first current voltage signal is not a high voltage signal.
[0166] S303: Obtain the current voltage signal corresponding to at least one drop-down configuration information.
[0167] In this embodiment, the multiple configuration information includes at least one drop-down configuration information.
[0168] The chip can obtain at least one current voltage signal corresponding to pull-down configuration information if it determines that the first current voltage signal is a high voltage signal.
[0169] It should be noted that, for any pull-down configuration information, the chip obtains the current voltage signal corresponding to that pull-down configuration information while controlling the on / off state of each switch based on that pull-down configuration information.
[0170] S304: Determine the connection status of the input / output pins based on the current voltage signal corresponding to at least one pull-down configuration information and a preset voltage signal.
[0171] In this embodiment, the chip can determine the connection status of the input / output pins based on the current voltage signal corresponding to at least one configuration information and a preset voltage signal.
[0172] S305: Obtain the current voltage signal corresponding to at least one pull-up configuration information.
[0173] In this embodiment, the multiple configuration information includes at least one pull-up configuration information.
[0174] The chip can obtain at least one current voltage signal corresponding to pull-down configuration information if it determines that the first current voltage signal is not a high voltage signal.
[0175] It should be noted that, for any pull-down configuration information, the chip obtains the current voltage signal corresponding to the pull-up configuration information while controlling the on / off state of each switch based on the pull-up configuration information.
[0176] S306: Determine the connection status of the input / output pins based on the current voltage signal corresponding to at least one pull-up configuration information and a preset voltage signal.
[0177] In this embodiment, the chip can determine the connection status of the input / output pins based on the current voltage signal corresponding to at least one pull-up configuration information and a preset voltage signal.
[0178] The beneficial effects of this embodiment are as follows: In this embodiment, the chip can acquire the first current voltage signal corresponding to the initial configuration information from multiple configuration information; the initial configuration information indicates that the target on / off state of each switch is off. The chip can determine whether the first current voltage signal is a high voltage signal. If the chip determines that the first current voltage signal is a high voltage signal, it can acquire the current voltage signal corresponding to at least one pull-down configuration information, and determine the connection state of the input / output pins based on the current voltage signal corresponding to at least one pull-down configuration information and a preset voltage signal. If the chip determines that the first current voltage signal is not a high voltage signal, it can acquire the current voltage signal corresponding to at least one pull-up configuration information, and determine the connection state of the input / output pins based on the current voltage signal corresponding to at least one pull-down configuration information and a preset voltage signal. Through the above method, the number of tests can be reduced, thereby reducing the test time and improving the efficiency of determining the connection state of the input / output pins.
[0179] The following describes, through method embodiment three, the process of determining the connection state when there are multiple pull-down resistors including strong pull-down resistors and weak pull-down resistors, and multiple pull-up resistors including strong pull-up resistors and weak pull-up resistors.
[0180] Figure 4 This is a flowchart illustrating a third embodiment of a method for determining connection status provided in this application. Please refer to... Figure 4 The method may include:
[0181] S401: Obtain the first current voltage signal corresponding to the initial configuration information among multiple configuration information.
[0182] In this embodiment, the chip can acquire the first current voltage signal corresponding to the initial configuration information among multiple configuration information.
[0183] The initial configuration information indicates that the target on / off state of each switch is off. In other words, the chip can control each pull-up resistor and each pull-down resistor to be in the off state.
[0184] It should be noted that when all switching transistors are in the off state, the input and output pins are neither connected to the power supply through pull-up resistors nor to ground through pull-down resistors. In this case, the first current voltage signal of the input and output pins depends on the external device.
[0185] S402: Determine whether the first current voltage signal is a high voltage signal in the preset voltage signals.
[0186] In this embodiment, the chip can determine whether the first current voltage signal (x1) is a high voltage signal.
[0187] The chip can execute S403 if it determines that the first current voltage signal is a high voltage signal. It should be noted that if the first current voltage signal is a high voltage signal, it means that the connection state of the corresponding input / output pin is either a pull-up state (strong pull-up state or weak pull-up state) or a floating state.
[0188] or,
[0189] The chip can execute S410 if it determines that the first current voltage signal is not a high voltage signal. It should be noted that when the first current voltage signal is not a high voltage signal, the connection state of the corresponding input and output pins is either a pull-down state (strong pull-down state or weak pull-down state) or a floating state.
[0190] S403: Obtain the second current voltage signal corresponding to the first drop-down configuration information.
[0191] In this embodiment, the first drop-down configuration information belongs to at least one drop-down configuration information.
[0192] It should be noted that the first pull-down configuration information indicates that the target on / off state of the switch corresponding to the strong pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-down resistor and the switch corresponding to each pull-up resistor is open.
[0193] When the initial voltage signal is high, the connection state of the input / output pins is either pull-up (strong pull-up or weak pull-up) or floating. The chip can pull down the current voltage signal of the input / output pins by controlling the on / off state of the switch corresponding to the strong pull-down resistor to be closed.
[0194] When the switch corresponding to the strong pull-down resistor is in the closed state, and the switch corresponding to the weak pull-down resistor and the switches corresponding to each pull-up resistor are in the open state, the current transmission path is: input / output pin → strong pull-down resistor → switch corresponding to the strong pull-down resistor → ground; or, the current transmission path is: input / output pin → switch corresponding to the strong pull-down resistor → strong pull-down resistor → ground. Current can pull the voltage signal of the input / output pin low.
[0195] Based on this, the chip can obtain the second current voltage signal (x2) corresponding to the first pull-down configuration information.
[0196] Understandably, the second current voltage signal is the current voltage signal of the input / output pins detected by the chip when, according to the first pull-down configuration information, the switching transistor corresponding to the strong pull-down resistor is in the closed state, and the switching transistor corresponding to the weak pull-down resistor and the switching transistor corresponding to each pull-up resistor is in the open state.
[0197] S404: Determine whether the second current voltage signal is a high voltage signal in the preset voltage signals.
[0198] In this embodiment, the chip can determine whether the second current voltage signal (x2) is a high voltage signal in the preset voltage signals.
[0199] The chip can execute S405 if it determines that the second current voltage signal is a high voltage signal.
[0200] or,
[0201] The chip can execute S406 if it determines that the second current voltage signal is not a high voltage signal.
[0202] S405: Determines the connection status as a strong pull-up state.
[0203] In this embodiment, if the second current voltage signal is still a high voltage signal, it means that the strong pull-down resistor cannot pull the voltage signal of the input / output pin down to a low voltage signal. In other words, it means that the connection state of the input / output pin is a strong pull-up state.
[0204] In other words, the chip can determine that the connection state is a strong pull-up state when it determines that the second current voltage signal is a high voltage signal.
[0205] S406: Obtain the third current voltage signal corresponding to the second drop-down configuration information.
[0206] In this embodiment, the second drop-down configuration information belongs to at least one drop-down configuration information.
[0207] It should be noted that the second pull-down configuration information indicates that the target on / off state of the switch corresponding to the weak pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-down resistor and the switch corresponding to each pull-up resistor is open.
[0208] If the second current voltage signal is not a high voltage signal, it means that the strong pull-down resistor can pull the voltage signal of the input / output pin down to a low voltage signal. In other words, it means that the connection state of the input / output pin is a weak pull-up state or a floating state.
[0209] With the switch corresponding to the weak pull-down resistor in the closed state, and the switch corresponding to the strong pull-down resistor and the switches corresponding to each pull-up resistor in the open state, the current transmission path is: input / output pin → switch corresponding to the weak pull-down resistor → weak pull-down resistor → ground. The current can pull the voltage signal of the input / output pin low.
[0210] Based on this, the chip can obtain the third current voltage signal (x3) corresponding to the second pull-down configuration information when it is determined that the second current voltage signal is not a high voltage signal.
[0211] Understandably, the third current voltage signal is the current voltage signal of the input / output pins detected by the chip when it can control the switch corresponding to the weak pull-down resistor to be in the closed state and control the switch corresponding to the strong pull-down resistor and the switch corresponding to each pull-up resistor to be in the open state, based on the second pull-down configuration information.
[0212] S407: Determine whether the third current voltage signal is a high voltage signal.
[0213] In this embodiment, the chip can determine whether the third current voltage signal is a high voltage signal.
[0214] The chip can execute S408 if it determines that the third current voltage signal is a high voltage signal; or,
[0215] The chip can execute S409 if it determines that the third current voltage signal is not a high voltage signal.
[0216] S408: Determines the connection status as a weak pull-up state.
[0217] In this embodiment, if the third current voltage signal is still a high voltage signal, it indicates that the weak pull-down resistor cannot pull the voltage signal of the input / output pin down to a low voltage signal. Since the connection state corresponding to the input / output pin is not a strong pull-up state, the chip can determine that the connection state corresponding to the input / output pin is a weak pull-up state.
[0218] In other words, the chip can determine that the connection state is a weak pull-up state when it determines that the third current voltage signal is a high voltage signal.
[0219] S409: Determine the connection status as floating.
[0220] In this embodiment, when the third current voltage signal is not a high voltage signal, it indicates that the weak pull-down resistor can pull the voltage signal of the input / output pin down to a low voltage signal. Therefore, the chip can determine that the connection state corresponding to the input / output pin is a floating state.
[0221] In other words, the chip can determine that the connection state is floating if it determines that the third current voltage signal is not a high voltage signal.
[0222] S410: Obtain the fourth current voltage signal corresponding to the first pull-up configuration information.
[0223] In this embodiment, the first pull-up configuration information belongs to at least one pull-up configuration information.
[0224] The first pull-up configuration information indicates that the target on / off state of the switch corresponding to the strong pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-up resistor and the switch corresponding to each pull-down resistor is open.
[0225] When the initial voltage signal is not a high voltage signal, the connection state of the input / output pins is either a pull-down state (strong pull-down state or weak pull-down state) or a floating state. The chip can pull up the current voltage signal of the input / output pins by controlling the on / off state of the switch corresponding to the strong pull-up resistor to be closed.
[0226] With the switch corresponding to the strong pull-up resistor in the closed state, and the switches corresponding to the weak pull-up resistors and the switches corresponding to each pull-down resistor in the open state, the current transmission path is: power supply → strong pull-up resistor → switch corresponding to the strong pull-up resistor → input / output pin. The current can pull the voltage signal of the input / output pin high.
[0227] Based on this, the chip can obtain the fourth current voltage signal (x4) corresponding to the first pull-up configuration information.
[0228] Understandably, the fourth current voltage signal is the current voltage signal of the input / output pins detected by the chip when, according to the first pull-up configuration information, the switching transistor corresponding to the strong pull-up resistor is in the closed state, and the switching transistor corresponding to the weak pull-up resistor and the switching transistor corresponding to each pull-down resistor is in the open state.
[0229] S411: Determine whether the fourth current voltage signal is a low voltage signal in the preset voltage signals.
[0230] In this embodiment, the chip can determine whether the fourth current voltage signal is a low voltage signal among the preset voltage signals.
[0231] The chip can execute S412 if it determines that the fourth current voltage signal is a low voltage signal; or,
[0232] The chip can execute S413 if it determines that the fourth current voltage signal is not a low voltage signal.
[0233] S412: Determine the connection status as a strong pull-down state.
[0234] In this embodiment, if the fourth current voltage signal is still a low voltage signal, it means that the strong pull-up resistor cannot pull the voltage signal of the input / output pin to a high voltage signal. In other words, it means that the connection state of the input / output pin is a strong pull-down state.
[0235] In other words, the chip can determine that the connection state is a strong pull-down state when it determines that the fourth current voltage signal is a low voltage signal.
[0236] S413: Obtain the fifth current voltage signal corresponding to the second pull-up configuration information.
[0237] In this embodiment, the second pull-up configuration information belongs to at least one pull-up configuration information.
[0238] It should be noted that the second pull-down configuration information indicates that the target on / off state of the switch corresponding to the weak pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-down resistor and the switch corresponding to each pull-up resistor is open.
[0239] If the fourth current voltage signal is not a low voltage signal, it means that the strong pull-up resistor can pull the voltage signal of the input / output pin to a high voltage signal. In other words, it means that the connection state of the input / output pin is a weak pull-down state or a floating state.
[0240] With the switch corresponding to the weak pull-up resistor in the closed state, and the switch corresponding to the strong pull-up resistor and the switches corresponding to each pull-down resistor in the open state, the current transmission path is: power supply → weak pull-up resistor → switch corresponding to the weak pull-up resistor → input / output pin. The current can pull the voltage signal of the input / output pin high.
[0241] Based on this, the chip can obtain the fifth current voltage signal (x5) corresponding to the second pull-up configuration information when it is determined that the fourth current voltage signal is not a low voltage signal.
[0242] Understandably, the fifth current voltage signal is the current voltage signal of the input / output pins detected by the chip when, according to the second pull-up configuration information, the switching transistor corresponding to the weak pull-up resistor is in the closed state, and the switching transistor corresponding to the strong pull-up resistor and the switching transistor corresponding to each pull-down resistor is in the open state.
[0243] S414: Determine whether the fifth current voltage signal is a low voltage signal.
[0244] In this embodiment, the chip can determine whether the fifth current voltage signal is a low voltage signal among the preset voltage signals.
[0245] The chip can execute S415 if it determines that the fifth current voltage signal is a low voltage signal; or,
[0246] The chip can execute S416 if it determines that the fifth current voltage signal is not a low voltage signal.
[0247] S415: Determines the connection status as a weak pull-down state.
[0248] In this embodiment, if the fifth current voltage signal is still a low voltage signal, it indicates that the weak pull-up resistor cannot pull the voltage signal of the input / output pin to a high voltage signal. Since the connection state corresponding to the input / output pin is not a strong pull-down state, the chip can determine that the connection state corresponding to the input / output pin is a weak pull-down state.
[0249] In other words, the chip can determine that the connection state is a weak pull-down state when it determines that the fifth current voltage signal is a low voltage signal.
[0250] S416: Determine the connection status as floating.
[0251] In this embodiment, when the fifth current voltage signal is not a low voltage signal, it indicates that the weak pull-up resistor can pull the voltage signal of the input / output pin to a high voltage signal. Therefore, the chip can determine that the connection state corresponding to the input / output pin is a floating state.
[0252] In other words, the chip can determine that the connection state is floating if it determines that the fifth current voltage signal is not a low voltage signal.
[0253] The beneficial effects of this embodiment are as follows: In this embodiment, the multiple pull-down resistors include strong pull-down resistors and weak pull-down resistors; the multiple pull-up resistors include strong pull-up resistors and weak pull-up resistors. The chip can determine the connection state of the input / output pins by sequentially controlling the switching transistors corresponding to the strong pull-up resistors and the weak pull-up resistors to be in the closed state, or by sequentially controlling the switching transistors corresponding to the strong pull-down resistors and the weak pull-down resistors to be in the closed state. Through the above method, the connection state of the input / output pins can be determined from multiple connection states (strong pull-up state, weak pull-up state, floating state, weak pull-down state, strong pull-down state), improving the efficiency and accuracy of determining the connection state.
[0254] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0255] Figure 5 This is a schematic diagram of a connection state determination device provided in an embodiment of this application. The connection state determination device 50 is applied to a chip, which includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to a power supply through the pull-up resistors and their corresponding switching transistors; the input / output pins are also connected to ground through the pull-down resistors and their corresponding switching transistors.
[0256] The connection status determination device 50 includes an acquisition module 51 and a processing module 52.
[0257] The acquisition module 51 is used to acquire the current voltage signal corresponding to multiple configuration information; wherein, the current voltage signal is the voltage signal of the input and output pins when the on / off state of each switch is controlled based on the configuration information; the target on / off state of each switch is different indicated by different configuration information;
[0258] The processing module 52 is used to determine the connection status of the input and output pins based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal.
[0259] The connection state determination device provided in this application embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, so it will not be described again here.
[0260] In one implementation, module 51 is specifically used for:
[0261] Obtain the first current voltage signal corresponding to the initial configuration information from multiple configuration information; the initial configuration information indicates that the target on / off state of each switch is off.
[0262] Determine whether the first current voltage signal is a high voltage signal in the preset voltage signals;
[0263] If the first current voltage signal is determined to be a high voltage signal, the current voltage signal corresponding to at least one drop-down configuration information is obtained; the drop-down configuration information belongs to multiple configuration information.
[0264] or,
[0265] If it is determined that the first current voltage signal is not a high voltage signal, the current voltage signal corresponding to at least one pull-up configuration information is obtained; the pull-up configuration information belongs to multiple configuration information.
[0266] The connection state determination device provided in this application embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, so it will not be described again here.
[0267] In one implementation, the multiple pull-down resistors include strong pull-down resistors and weak pull-down resistors; the acquisition module 51 is specifically used for:
[0268] Obtain the second current voltage signal corresponding to the first pull-down configuration information; the first pull-down configuration information indicates that the target on / off state of the switch corresponding to the strong pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-down resistor and the switch corresponding to each pull-up resistor is open; the first pull-down configuration information belongs to at least one pull-down configuration information;
[0269] Processing module 52 is specifically used for:
[0270] Determine whether the second current voltage signal is a high voltage signal in the preset voltage signals;
[0271] If the second current voltage signal is determined to be a high voltage signal, the connection state is determined to be a strong pull-up state.
[0272] The connection state determination device provided in this application embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, so it will not be described again here.
[0273] In one implementation,
[0274] The acquisition module 51 is further configured to acquire the third current voltage signal corresponding to the second pull-down configuration information when it is determined that the second current voltage signal is not a high voltage signal; the second pull-down configuration information indicates that the target on / off state of the switch corresponding to the weak pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-down resistor and the switch corresponding to each pull-up resistor is open; the second pull-down configuration information belongs to at least one pull-down configuration information.
[0275] Processing module 52 is also used to determine whether the third current voltage signal is a high voltage signal;
[0276] Processing module 52 is further configured to determine the connection state as a weak pull-up state when it is determined that the third current voltage signal is a high voltage signal; or,
[0277] The processing module 52 is also used to determine that the connection state is floating when it is determined that the third current voltage signal is not a high voltage signal.
[0278] The connection state determination device provided in this application embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, so it will not be described again here.
[0279] In one implementation, the multiple pull-up resistors include strong pull-up resistors and weak pull-up resistors; the acquisition module 51 is specifically used for:
[0280] Obtain the fourth current voltage signal corresponding to the first pull-up configuration information; the first pull-up configuration information indicates that the target on / off state of the switch corresponding to the strong pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-up resistor and the switch corresponding to each pull-down resistor is open; the first pull-up configuration information belongs to at least one pull-up configuration information;
[0281] Processing module 52 is specifically used for:
[0282] Determine whether the fourth current voltage signal is a low voltage signal among the preset voltage signals;
[0283] If the fourth current voltage signal is determined to be a low voltage signal, the connection state is determined to be a strong pull-down state.
[0284] The connection state determination device provided in this application embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, so it will not be described again here.
[0285] In one implementation,
[0286] The acquisition module 51 is further configured to acquire the fifth current voltage signal corresponding to the second pull-up configuration information when it is determined that the fourth current voltage signal is not a low voltage signal; the second pull-up configuration information indicates that the target on / off state of the switch corresponding to the weak pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-up resistor and the switch corresponding to each pull-down resistor is open; the second pull-up configuration information belongs to at least one pull-up configuration information.
[0287] Processing module 52 is also used to determine whether the fifth current voltage signal is a low voltage signal;
[0288] Processing module 52 is further configured to determine, when it is determined that the fifth current voltage signal is a low voltage signal, the connection state is a weak pull-down state; or,
[0289] The processing module 52 is also used to determine that the connection state is floating when it is determined that the fifth current voltage signal is not a low voltage signal.
[0290] The connection state determination device provided in this application embodiment can execute the technical solution in the above method embodiment, and its beneficial effects are similar, so it will not be described again here.
[0291] This application provides a chip, including:
[0292] Input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor; the input / output pins are connected to the power supply through the pull-up resistors and their corresponding switching transistors; the input / output pins are connected to ground through the pull-down resistors and their corresponding switching transistors.
[0293] The chip is used to execute any of the foregoing method embodiments.
[0294] This application also provides a chip module, on which a computer program is stored. When the computer program is executed by the chip module, it implements the solution as described in any of the foregoing method embodiments. It is understood that, in one implementation, the chip module can be a 5G chip module.
[0295] This application provides an electronic device, which includes a chip;
[0296] The chip is used to execute any of the foregoing method embodiments.
[0297] This application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement any of the aforementioned method embodiments.
[0298] This application provides a computer program product, including computer execution instructions, which, when executed by a processor, cause the scheme of any of the foregoing method embodiments to be executed.
[0299] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0300] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for determining a connection state, characterized in that, The chip is applied to a chip, which includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to the power supply via the switching transistors corresponding to the pull-up resistors and the pull-up resistors themselves. The input / output pins are connected to ground via the switching transistors corresponding to the pull-down resistors and the pull-down resistors themselves. The method includes: Acquire the current voltage signal corresponding to multiple configuration information; wherein, the current voltage signal is the voltage signal of the input / output pin when the on / off state of each switch is controlled based on the configuration information; different configuration information indicates different target on / off states of each switch. Based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal, the connection status of the input and output pins is determined.
2. The method according to claim 1, characterized in that, The step of obtaining the current voltage signal corresponding to multiple configuration information includes: Obtain the first current voltage signal corresponding to the initial configuration information among the plurality of configuration information; the initial configuration information indicates that the target on / off state of each switch is off. Determine whether the first current voltage signal is a high voltage signal in the preset voltage signals; If the first current voltage signal is determined to be the high voltage signal, at least one current voltage signal corresponding to a pull-down configuration information is obtained; the pull-down configuration information belongs to the plurality of configuration information. or, If it is determined that the first current voltage signal is not the high voltage signal, the current voltage signal corresponding to at least one pull-up configuration information is obtained; the pull-up configuration information belongs to the plurality of configuration information.
3. The method according to claim 2, characterized in that, The plurality of pull-down resistors includes strong pull-down resistors and weak pull-down resistors; obtaining the current voltage signal corresponding to at least one pull-down configuration information includes: Obtain the second current voltage signal corresponding to the first pull-down configuration information; the first pull-down configuration information indicates that the target on / off state of the switch corresponding to the strong pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-down resistor and the switch corresponding to each pull-up resistor is open; the first pull-down configuration information belongs to at least one pull-down configuration information; The step of determining the connection state of the input / output pins based on the current voltage signal corresponding to multiple configuration information and a preset voltage signal includes: Determine whether the second current voltage signal is a high voltage signal among the preset voltage signals; If the second current voltage signal is determined to be the high voltage signal, the connection state is determined to be a strong pull-up state.
4. The method according to claim 3, characterized in that, The method further includes: If it is determined that the second current voltage signal is not the high voltage signal, the third current voltage signal corresponding to the second pull-down configuration information is obtained; the second pull-down configuration information indicates that the target on / off state of the switch corresponding to the weak pull-down resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-down resistor and the switch corresponding to each pull-up resistor is open; the second pull-down configuration information belongs to at least one pull-down configuration information; Determine whether the third current voltage signal is the high voltage signal; If the third current voltage signal is determined to be the high voltage signal, the connection state is determined to be a weak pull-up state; or, If it is determined that the third current voltage signal is not the high voltage signal, the connection state is determined to be a floating state.
5. The method according to claim 2, characterized in that, The plurality of pull-up resistors includes strong pull-up resistors and weak pull-up resistors; obtaining the current voltage signal corresponding to at least one pull-up configuration information includes: Obtain the fourth current voltage signal corresponding to the first pull-up configuration information; the first pull-up configuration information indicates that the target on / off state of the switch corresponding to the strong pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the weak pull-up resistor and the switch corresponding to each pull-down resistor is open; the first pull-up configuration information belongs to at least one pull-up configuration information; The step of determining the connection state of the input / output pins based on the current voltage signal corresponding to multiple configuration information and a preset voltage signal includes: Determine whether the fourth current voltage signal is a low voltage signal among the preset voltage signals; If the fourth current voltage signal is determined to be the low voltage signal, the connection state is determined to be a strong pull-down state.
6. The method according to claim 5, characterized in that, The method further includes: If it is determined that the fourth current voltage signal is not the low voltage signal, the fifth current voltage signal corresponding to the second pull-up configuration information is obtained; the second pull-up configuration information indicates that the target on / off state of the switch corresponding to the weak pull-up resistor is closed, and indicates that the target on / off state of the switch corresponding to the strong pull-up resistor and the switch corresponding to each pull-down resistor is open; the second pull-up configuration information belongs to at least one pull-up configuration information; Determine whether the fifth current voltage signal is the low voltage signal; If the fifth current voltage signal is determined to be the low voltage signal, the connection state is determined to be a weak pull-down state; or, If it is determined that the fifth current voltage signal is not the low voltage signal, the connection state is determined to be floating.
7. A device for determining a connection state, characterized in that, The chip is applied to a chip, which includes input / output pins, multiple pull-up resistors, multiple pull-down resistors, a switching transistor corresponding to each pull-up resistor, and a switching transistor corresponding to each pull-down resistor. The input / output pins are connected to the power supply via the switching transistors corresponding to the pull-up resistors and the pull-up resistors themselves. The input / output pins are connected to ground via the switching transistors corresponding to the pull-down resistors and the pull-down resistors themselves. The device includes: The acquisition module is used to acquire the current voltage signal corresponding to multiple configuration information; wherein, the current voltage signal is the voltage signal of the input and output pins when the on / off state of each switch is controlled based on the configuration information; different configuration information indicates different target on / off states of each switch. The processing module is used to determine the connection status of the input / output pins based on the current voltage signal corresponding to multiple configuration information and the preset voltage signal.
8. A chip, characterized in that, include: Input / output pins, multiple pull-up resistors, multiple pull-down resistors, the switching transistors corresponding to each pull-up resistor, and the switching transistors corresponding to each pull-down resistor; The input / output pins are connected to the power supply via the switching transistors corresponding to the pull-up resistors and the pull-up resistors themselves; the input / output pins are connected to ground via the switching transistors corresponding to the pull-down resistors and the pull-down resistors themselves. The chip is used to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method described in any one of claims 1-6.
10. A computer program product, characterized in that, Includes computer execution instructions, which, when executed by a processor, cause the method described in any one of claims 1-6 to be performed.