CN109062832B - Method, device and storage medium for adjusting I2C bus parameters - Google Patents

Method, device and storage medium for adjusting I2C bus parameters Download PDF

Info

Publication number
CN109062832B
CN109062832B CN201810836217.4A CN201810836217A CN109062832B CN 109062832 B CN109062832 B CN 109062832B CN 201810836217 A CN201810836217 A CN 201810836217A CN 109062832 B CN109062832 B CN 109062832B
Authority
CN
China
Prior art keywords
value
bus
resistance
adjusting
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810836217.4A
Other languages
Chinese (zh)
Other versions
CN109062832A (en
Inventor
王志浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810836217.4A priority Critical patent/CN109062832B/en
Publication of CN109062832A publication Critical patent/CN109062832A/en
Application granted granted Critical
Publication of CN109062832B publication Critical patent/CN109062832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4086Bus impedance matching, e.g. termination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Dc Digital Transmission (AREA)

Abstract

The embodiment of the invention discloses a method, a device and a computer readable storage medium for adjusting I2C bus parameters, which are used for judging whether an overshoot problem exists in an I2C bus under a target parameter; if not, the target parameter may be taken as the bus parameter of the I2C bus. If so, adjusting the value of the target parameter according to a preset parameter value range, and re-judging whether the overshoot problem exists in the I2C bus under the adjusted value of the target parameter, until the value of the target parameter is adjusted to an optimal state value, and ending the operation of adjusting the I2C bus parameter. In the technical scheme, the target parameters can comprise resistance network parameters and driving current parameters, the I2C overshoot problem can be more comprehensively controlled by adjusting the values of the resistance network parameters and the driving current parameters, the I2C overshoot problem is effectively reduced, and the reliability of the whole system is improved.

Description

Method, device and storage medium for adjusting I2C bus parameters
Technical Field
The present invention relates to the field of memory system technology, and in particular, to a method, an apparatus, and a computer-readable storage medium for adjusting I2C bus parameters.
Background
A large number of low-speed buses are applied to a storage whole machine system, wherein a two-wire serial bus (I2C) is one of the most widely-applied low-speed buses, and is applied to a whole machine management module in a large number, so that the reliability of the I2C bus is directly related to the reliability of the whole machine system.
The I2C bus is often implemented in various types of lines in the form of a Common Building Blocks (CBB). However, if different boards are used for different projects, the same I2C CBB module may show different test results, and the overshoot problem of the clock or data signal is more common.
The conventional I2C overshoot problem is basically caused by impedance mismatch, and correcting the series resistance can reduce the I2C overshoot problem. However, the problem of I2C overshoot caused by the plate is generally difficult to solve at one time only by correcting the series resistance. The long-term overshoot easily brings hidden trouble of chip application on the line, and then influences the reliability of the whole machine.
Therefore, how to effectively reduce the I2C overshoot problem is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a computer-readable storage medium for adjusting I2C bus parameters, which can effectively reduce the problem of I2C overshoot.
To solve the foregoing technical problem, an embodiment of the present invention provides a method for adjusting I2C bus parameters, including:
s10: judging whether the I2C bus has an overshoot problem under the target parameter; if yes, go to S11; if not, go to S12; wherein the target parameters comprise resistance network parameters and driving current parameters;
s11: adjusting the value of the target parameter according to a preset parameter value range, and returning to S10;
s12: and taking the target parameter as a bus parameter of the I2C bus.
Optionally, in the S11, the method includes:
adjusting the value of the string resistance value according to the value range of the string resistance value and the preset string resistance step value, and returning to S10;
when the string resistance value reaches the upper limit value of the string resistance, adjusting the value of the pull-up resistance value according to the value range of the pull-up resistance value and the preset pull-up resistance step length, and returning to S10;
and when the string resistance value reaches the string resistance upper limit value and the pull-up resistance value reaches the pull-up resistance upper limit value, adjusting the value of the driving current value according to the value range of the driving current value and the preset driving current step length, and returning to the step S10.
Optionally, after the S11, the method further includes:
judging whether the target parameter reaches a preset limit value or not;
if so, taking the current value of the target parameter as the bus parameter of the I2C bus, and finishing the operation of adjusting the I2C bus parameter.
Optionally, after the S12, the method further includes:
and deriving the bus parameters of the I2C bus by using a serial port module so that a user can know the parameter values corresponding to the I2C bus.
The embodiment of the invention also provides a device for adjusting the I2C bus parameters, which comprises a judging unit, an adjusting unit and a serving unit;
the judging unit is used for judging whether the I2C bus has an overshoot problem under the target parameter; if yes, triggering the adjusting unit; if not, triggering the acting unit; wherein the target parameters comprise resistance network parameters and driving current parameters;
the adjusting unit is used for adjusting the value of the target parameter according to a preset parameter value range and returning the value to the judging unit;
the acting unit is used for taking the target parameter as a bus parameter of the I2C bus.
Optionally, the resistor network parameters include a string resistance value and a pull-up resistance value; correspondingly, the adjusting unit comprises a string resistance adjusting subunit, a pull-up resistance adjusting subunit and a driving current adjusting subunit;
the string resistance adjusting subunit is configured to adjust a value of the string resistance according to a preset string resistance step value and a value range of the string resistance, and return the adjusted value to the judging unit;
the pull-up resistance adjusting subunit is configured to, when the string resistance value reaches the string resistance upper limit value, adjust a value of the pull-up resistance value according to a preset pull-up resistance step length according to a value range of the pull-up resistance value, and return the adjusted value to the judging unit;
and the driving current adjusting subunit is configured to adjust a value of the driving current value according to a preset driving current step length and a value range of the driving current value when the string resistance value reaches the string resistance upper limit value and the pull-up resistance value reaches the pull-up resistance upper limit value, and return the adjusted value to the judging unit.
Optionally, the system further comprises an ending unit;
the judging unit is also used for judging whether the target parameter reaches a preset limit value; if yes, triggering an end unit;
and the ending unit is used for taking the current value of the target parameter as the bus parameter of the I2C bus and ending the operation of adjusting the I2C bus parameter.
Optionally, the system further comprises a deriving unit;
the derivation unit is used for deriving the bus parameters of the I2C bus by using a serial port module, so that a user can conveniently obtain the parameter values corresponding to the I2C bus.
The embodiment of the invention also provides a device for adjusting the parameters of the I2C bus, which comprises:
a memory for storing a computer program;
a processor for executing the computer program to perform the steps of the method of adjusting the I2C bus parameters as described above.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for adjusting the I2C bus parameter as described above.
According to the technical scheme, whether the bus I2C has the overshoot problem under the target parameter is judged; when the I2C bus does not have the overshoot problem, the target parameters can be used as the bus parameters of the I2C bus. When the I2C bus has the overshoot problem, the value of the target parameter may be adjusted according to a preset parameter value range, and whether the overshoot problem exists in the I2C bus under the adjusted value of the target parameter is determined again, until the value of the target parameter is adjusted to the optimal state value, the operation of adjusting the I2C bus parameter is finished. In the technical scheme, the target parameters can comprise resistance network parameters and driving current parameters, the I2C overshoot problem can be more comprehensively controlled by adjusting the values of the resistance network parameters and the driving current parameters, the I2C overshoot problem is effectively reduced, and the reliability of the whole system is improved.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a flowchart of a method for adjusting I2C bus parameters according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for adjusting I2C bus parameters according to an embodiment of the present invention;
fig. 3 is a schematic hardware configuration diagram of an apparatus for adjusting I2C bus parameters according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a method for adjusting the I2C bus parameters according to an embodiment of the present invention will be described in detail. Fig. 1 is a flowchart of a method for adjusting I2C bus parameters according to an embodiment of the present invention, where the method includes:
s10: and judging whether the I2C bus has an overshoot problem under the target parameter.
In an embodiment of the present invention, the target parameters may include a resistance network parameter and a driving current parameter.
In a specific implementation, initial values corresponding to each parameter in the target parameters may be preset.
The determination of whether the I2C bus has the overshoot problem belongs to the conventional technical means in the prior art, and the detailed implementation thereof will not be described in detail. One feasible method is that whether the voltage values of the clock and the data link are within a preset voltage value range or not can be judged, and when the voltage values of the clock and the data link are within the preset voltage value range, the problem that the I2C bus does not have overshoot is solved; when the voltage values on the clock and data links are not within the preset voltage value range, the overshoot problem of the I2C bus is illustrated.
When the I2C bus has an overshoot problem, the specific value of the target parameter needs to be adjusted, i.e., S11 is executed. When there is no overshoot problem in the I2C bus, S12 may be executed to use the target parameters as the bus parameters of the I2C bus.
For I2C buses with different lengths, under the condition of ensuring that the I2C overshoot problem is minimized, the resistance network parameters and the driving current parameters corresponding to the lengths of the I2C buses are different. In the embodiment of the present invention, a plurality of I2C buses with different lengths may be selected, and the corresponding resistance network parameters and driving current parameters may be adjusted, so as to determine the bus parameters corresponding to each I2C bus.
The specific value of the I2C bus length may be set according to actual requirements, and is not limited herein. For each I2C bus, the method for adjusting I2C bus parameters is similar, in the embodiment of the present invention, an I2C bus is taken as an example, specific steps for determining the bus parameters are described, and by analogy, the bus parameters corresponding to I2C buses with different lengths can be determined.
S11: and adjusting the value of the target parameter according to the preset parameter value range, and returning to the step S10.
In the embodiment of the present invention, each time the value of the target parameter is adjusted, the process returns to S10 to determine whether the I2C bus has an overshoot problem under the adjusted value of the target parameter.
In an embodiment of the present invention, the resistor network parameter may include a string resistance value and a pull-up resistance value, and the driving current parameter may include a driving current value.
According to different work tasks involved in adjusting I2C bus parameters, different work modules can be divided, including an I2C debugging module, a resistance network module and a driving current control module.
Specifically, the I2C tuning module may be configured to adjust the value of the target parameter.
The resistor network module can provide pull-up resistance values and string resistance values of various values to the I2C debugging module in the form of a resistor network. The resistor network module is a hardware entity, and in a specific implementation, one resistor network module can be connected in series on a clock and data link and used for providing a series resistance value; another resistive network module is embedded on a corresponding pull-up power link for providing a pull-up resistance value.
The driving current control module can provide driving current values of the I2C pin with different values for the I2C debugging module, and the provided driving current values meet the requirements of current chips of the mainstream system management module. The driving current control module is a hardware entity, and in a specific implementation, the driving current control module may be connected in series to the clock and data link, and is generally closer to the link source end than the resistor network module of the corresponding series resistor when the driving current control module is set.
Taking an I2C bus as an example, the value range and the step value corresponding to each type of parameter value may be stored in advance in the I2C debugging module.
The step value may be used to indicate a difference between the adjusted parameter value and the parameter value before adjustment, that is, a variation range when the parameter value is adjusted each time. The string resistance value has its corresponding string resistance step value, the pull-up resistance value has its corresponding pull-up resistance step value, and the drive current value has its corresponding drive current step value.
Taking the step size of the string resistance value as an example, assuming that the step size of the string resistance value is 5 ohms, and the initial string resistance value is 20 ohms, the string resistance value can be adjusted to 25 ohms next time, and the string resistance value can be adjusted to 30 ohms next time.
In practical applications, the step values corresponding to the parameters may be the same or different, and the step value corresponding to each parameter may be set according to practical requirements, which is not limited herein.
In specific implementation, the values of the parameter values can be sequentially adjusted, when the value of one parameter value reaches the upper limit value, the value of the next parameter value is continuously adjusted, and the operation of adjusting the I2C bus parameters is finished until the I2C bus has no overshoot problem or the target parameter cannot be adjusted.
Taking the adjustment sequence of the string resistance value, the pull-up resistance value and the driving current value as an example, specifically, the value of the string resistance value can be adjusted according to the value range of the string resistance value and the preset string resistance step value, and the step returns to S10, that is, whether the overshoot problem exists in the I2C bus after the string resistance value is adjusted is judged again.
The value range of the string resistance value is generally not more than 40 ohms, that is, a string resistance value less than or equal to 40 ohms is selected from the string resistance values provided by the resistor network module when adjusting the string resistance value. When the value of the series resistance reaches the upper limit value of the series resistance, the value of the pull-up resistance is adjusted according to the value range of the pull-up resistance and the preset pull-up resistance step length, and the step returns to S10, namely, whether the overshoot problem exists in the I2C bus after the pull-up resistance is adjusted is judged again.
The value range of the pull-up resistance value is generally not more than 10Kohm, that is, a pull-up resistance value less than or equal to 10Kohm is selected from the pull-up resistance values provided by the resistance network module when the string resistance value is adjusted.
When the string resistance value reaches the string resistance upper limit value and the pull-up resistance value reaches the pull-up resistance upper limit value, the value of the driving current value is adjusted according to the value range of the driving current value and the preset driving current step length, and the step returns to S10, namely, whether the overshoot problem exists in the I2C bus after the driving current value is adjusted is judged again.
The value range of the driving current value is generally not less than 4mA, that is, a driving current value greater than or equal to 4mA should be selected from the driving current values provided by the driving current control module when the driving current value is adjusted.
In a specific implementation, the initial string resistance value may be set to be smaller, and when an I2C overshoot problem occurs, values of the string resistance values are sequentially increased according to the string resistance step value, and until the I2C overshoot problem does not exist or the string resistance value reaches the upper limit value of the string resistance, the adjustment of the string resistance value is stopped. The adjustment of other parameter values may be performed according to the adjustment manner of the string resistance value, for example, the initial pull-up resistance value may be set to be smaller, and when the I2C overshoot problem occurs, the values of the pull-up resistance values are sequentially increased according to the pull-up resistance step values until the I2C overshoot problem does not occur or the pull-up resistance value reaches the pull-up resistance upper limit value. The initial driving current value can be set to be larger, and when the I2C overshoot problem occurs, the values of the driving current values are sequentially reduced according to the driving current step value until the I2C overshoot problem does not exist or the driving current value reaches the driving current upper limit value.
It should be noted that, in the embodiment of the present invention, the adjustment sequence of each parameter value in the target parameter may be set according to an actual requirement, which is not limited herein.
S12: the target parameter is taken as the bus parameter of the I2C bus.
In the embodiment of the present invention, the finally determined bus parameters of the I2C bus may be transmitted to the overall system management module, so as to apply the bus parameters to the overall system.
According to the technical scheme, whether the bus I2C has the overshoot problem under the target parameter is judged; when the I2C bus does not have the overshoot problem, the target parameters can be used as the bus parameters of the I2C bus. When the I2C bus has the overshoot problem, the value of the target parameter may be adjusted according to a preset parameter value range, and whether the overshoot problem exists in the I2C bus under the adjusted value of the target parameter is determined again, until the value of the target parameter is adjusted to the optimal state value, the operation of adjusting the I2C bus parameter is finished. In the technical scheme, the target parameters can comprise resistance network parameters and driving current parameters, the I2C overshoot problem can be more comprehensively controlled by adjusting the values of the resistance network parameters and the driving current parameters, the I2C overshoot problem is effectively reduced, and the reliability of the whole system is improved.
In the concrete implementation, when all the parameter values contained in the target parameter reach the corresponding limit values, the problem of overshoot still exists in the I2C, and for the situation, the value of the target parameter can be judged after the value of the target parameter is adjusted every time. Specifically, whether the target parameter reaches a preset limit value can be judged; and when the target parameter reaches a preset limit value, taking the current value of the target parameter as the bus parameter of the I2C bus, and finishing the operation of adjusting the I2C bus parameter.
In the embodiment of the present invention, the limit value of the string resistance value may be set to 40ohm, the limit value of the pull-up resistance value may be set to 10Kohm, and the limit value of the driving current value may be set to 4 mA. Of course, the specific value of the limit value of each parameter value can be changed according to the actual requirement.
In practical application, due to the setting of the step value, the value of each parameter value in the target parameter may not exactly reach the corresponding limit value, and when the parameter value is adjusted next time, the adjusted parameter value exceeds the set limit value, it indicates that the parameter value of the current adjustment has reached the corresponding limit value, and at this time, the current value of the target parameter may be used as the bus parameter of the I2C bus, and the operation of adjusting the I2C bus parameter is ended.
By judging the value of the target parameter, the system can effectively avoid unnecessary parameter adjustment operation executed after the target parameter reaches a preset limit value.
In the embodiment of the present invention, parameter export and import may be implemented by setting a serial port module, specifically, after determining a bus parameter of an I2C bus, a bus parameter of an I2C bus may be exported by using the serial port module, so that a user may obtain a parameter value corresponding to the I2C bus.
The serial port module can be regarded as a module for realizing interaction between the whole system and a manager.
Besides the bus parameter export by the serial port module, in practical application, a manager can import the set parameter value into the I2C debugging module through the serial port module.
For example, when a specific value of a certain parameter value in the target parameter needs to be set, a manager can introduce the specific value of the parameter value into the I2C debugging module through the serial port module, so as to fix the parameter value.
By arranging the serial port module, bus parameters of the I2C bus can be visually acquired, values of certain or some parameter values in target parameters can be set manually, diversified services of the whole system are realized, and better user experience can be brought to users.
Fig. 2 is a schematic structural diagram of an apparatus for adjusting I2C bus parameters according to an embodiment of the present invention, where the apparatus includes a determining unit 21, an adjusting unit 22, and an acting unit 23;
the judging unit 21 is used for judging whether the I2C bus has an overshoot problem under the target parameter; if yes, triggering an adjusting unit; if not, triggering as a unit; the target parameters comprise resistance network parameters and driving current parameters;
the adjusting unit 22 is used for adjusting the value of the target parameter according to the preset parameter value range and returning to the judging unit;
as a unit 23, it is used to take the target parameter as the bus parameter of the I2C bus.
Optionally, the resistor network parameters include a string resistance value and a pull-up resistance value; correspondingly, the adjusting unit comprises a string resistance adjusting subunit, a pull-up resistance adjusting subunit and a driving current adjusting subunit;
the string resistance adjusting subunit is used for adjusting the value of the string resistance value according to the value range of the string resistance value and the preset string resistance step value, and returning the value to the judging unit;
the pull-up resistance adjusting subunit is used for adjusting the value of the pull-up resistance value according to the value range of the pull-up resistance value and the preset pull-up resistance step length when the string resistance value reaches the upper limit value of the string resistance, and returning to the judging unit;
and the driving current adjusting subunit is used for adjusting the value of the driving current value according to the value range of the driving current value and the preset driving current step length when the string resistance value reaches the upper limit value of the string resistance and the pull-up resistance value reaches the upper limit value of the pull-up resistance, and returning to the judging unit.
Optionally, the system further comprises an ending unit;
the judging unit is also used for judging whether the target parameter reaches a preset limit value; if yes, triggering an end unit;
and the ending unit is used for taking the current value of the target parameter as the bus parameter of the I2C bus and ending the operation of adjusting the I2C bus parameter.
Optionally, the system further comprises a deriving unit;
and the derivation unit is used for deriving the bus parameters of the I2C bus by using the serial port module so that a user can conveniently obtain the parameter values corresponding to the I2C bus.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, whether the bus I2C has the overshoot problem under the target parameter is judged; when the I2C bus does not have the overshoot problem, the target parameters can be used as the bus parameters of the I2C bus. When the I2C bus has the overshoot problem, the value of the target parameter may be adjusted according to a preset parameter value range, and whether the overshoot problem exists in the I2C bus under the adjusted value of the target parameter is determined again, until the value of the target parameter is adjusted to the optimal state value, the operation of adjusting the I2C bus parameter is finished. In the technical scheme, the target parameters can comprise resistance network parameters and driving current parameters, the I2C overshoot problem can be more comprehensively controlled by adjusting the values of the resistance network parameters and the driving current parameters, the I2C overshoot problem is effectively reduced, and the reliability of the whole system is improved.
Fig. 3 is a schematic hardware configuration diagram of an apparatus 30 for adjusting I2C bus parameters according to an embodiment of the present invention, where the apparatus 30 for adjusting I2C bus parameters includes:
a memory 31 for storing a computer program;
a processor 32 for executing the computer program to perform the steps of the method of adjusting the I2C bus parameters as described above.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for adjusting the I2C bus parameter as described above.
The foregoing has described in detail a method, apparatus, and computer-readable storage medium for adjusting I2C bus parameters according to embodiments of the present invention. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (8)

1. A method of adjusting I2C bus parameters, comprising:
s10: judging whether the I2C bus has an overshoot problem under the target parameter; if yes, go to S11; if not, go to S12; wherein the target parameters comprise resistance network parameters and driving current parameters;
s11: adjusting the value of the target parameter according to a preset parameter value range, and returning to S10;
s12: taking the target parameter as a bus parameter of an I2C bus;
the resistance network parameters comprise a string resistance value and a pull-up resistance value;
accordingly, in the S11, the following are included:
adjusting the value of the string resistance value according to the value range of the string resistance value and the preset string resistance step value, and returning to S10;
when the string resistance value reaches the upper limit value of the string resistance, adjusting the value of the pull-up resistance value according to the value range of the pull-up resistance value and the preset pull-up resistance step length, and returning to S10;
and when the string resistance value reaches the string resistance upper limit value and the pull-up resistance value reaches the pull-up resistance upper limit value, adjusting the value of the driving current value according to the value range of the driving current value and the preset driving current step length, and returning to the step S10.
2. The method according to claim 1, further comprising, after the S11:
judging whether the target parameter reaches a preset limit value or not;
if so, taking the current value of the target parameter as the bus parameter of the I2C bus, and finishing the operation of adjusting the I2C bus parameter.
3. The method according to any of claims 1-2, further comprising, after the S12:
and deriving the bus parameters of the I2C bus by using a serial port module so that a user can know the parameter values corresponding to the I2C bus.
4. The device for adjusting the I2C bus parameters is characterized by comprising a judging unit, an adjusting unit and an acting unit;
the judging unit is used for judging whether the I2C bus has an overshoot problem under the target parameter; if yes, triggering the adjusting unit; if not, triggering the acting unit; wherein the target parameters comprise resistance network parameters and driving current parameters;
the adjusting unit is used for adjusting the value of the target parameter according to a preset parameter value range and returning the value to the judging unit;
the acting unit is used for taking the target parameter as a bus parameter of an I2C bus;
the resistance network parameters comprise a string resistance value and a pull-up resistance value; correspondingly, the adjusting unit comprises a string resistance adjusting subunit, a pull-up resistance adjusting subunit and a driving current adjusting subunit;
the string resistance adjusting subunit is configured to adjust a value of the string resistance according to a preset string resistance step value and a value range of the string resistance, and return the adjusted value to the judging unit;
the pull-up resistance adjusting subunit is configured to, when the string resistance value reaches the string resistance upper limit value, adjust a value of the pull-up resistance value according to a preset pull-up resistance step length according to a value range of the pull-up resistance value, and return the adjusted value to the judging unit;
and the driving current adjusting subunit is configured to adjust a value of the driving current value according to a preset driving current step length and a value range of the driving current value when the string resistance value reaches the string resistance upper limit value and the pull-up resistance value reaches the pull-up resistance upper limit value, and return the adjusted value to the judging unit.
5. The apparatus of claim 4, further comprising an end unit;
the judging unit is also used for judging whether the target parameter reaches a preset limit value; if yes, triggering an end unit;
and the ending unit is used for taking the current value of the target parameter as the bus parameter of the I2C bus and ending the operation of adjusting the I2C bus parameter.
6. The apparatus according to any one of claims 4-5, further comprising a derivation unit;
the derivation unit is used for deriving the bus parameters of the I2C bus by using a serial port module, so that a user can conveniently obtain the parameter values corresponding to the I2C bus.
7. An apparatus for adjusting parameters of an I2C bus, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the method of adjusting I2C bus parameters according to any one of claims 1 to 3.
8. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of adjusting I2C bus parameters according to any one of claims 1 to 3.
CN201810836217.4A 2018-07-26 2018-07-26 Method, device and storage medium for adjusting I2C bus parameters Active CN109062832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810836217.4A CN109062832B (en) 2018-07-26 2018-07-26 Method, device and storage medium for adjusting I2C bus parameters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810836217.4A CN109062832B (en) 2018-07-26 2018-07-26 Method, device and storage medium for adjusting I2C bus parameters

Publications (2)

Publication Number Publication Date
CN109062832A CN109062832A (en) 2018-12-21
CN109062832B true CN109062832B (en) 2021-10-15

Family

ID=64836692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810836217.4A Active CN109062832B (en) 2018-07-26 2018-07-26 Method, device and storage medium for adjusting I2C bus parameters

Country Status (1)

Country Link
CN (1) CN109062832B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112475B (en) * 2023-10-24 2024-01-30 成都电科星拓科技有限公司 I2C bus driving capability automatic regulating system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087638A (en) * 2009-12-03 2011-06-08 Nxp股份有限公司 Edge rate suppression for open drain buses
CN106953511A (en) * 2017-04-28 2017-07-14 昆山龙腾光电有限公司 Switching power circuit and its adjusting method
CN107704701A (en) * 2017-10-19 2018-02-16 郑州云海信息技术有限公司 A kind of analysis method and system for being directed to different pull-up resistors in low speed signal
CN207473599U (en) * 2017-12-04 2018-06-08 山东高云半导体科技有限公司 A kind of I2C bus control interfaces circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087638A (en) * 2009-12-03 2011-06-08 Nxp股份有限公司 Edge rate suppression for open drain buses
EP2330739A1 (en) * 2009-12-03 2011-06-08 Nxp B.V. Edge rate suppression for open drain buses
CN106953511A (en) * 2017-04-28 2017-07-14 昆山龙腾光电有限公司 Switching power circuit and its adjusting method
CN107704701A (en) * 2017-10-19 2018-02-16 郑州云海信息技术有限公司 A kind of analysis method and system for being directed to different pull-up resistors in low speed signal
CN207473599U (en) * 2017-12-04 2018-06-08 山东高云半导体科技有限公司 A kind of I2C bus control interfaces circuit

Also Published As

Publication number Publication date
CN109062832A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN112131071B (en) Memory evaluation method and device
DE112009000147T5 (en) Mobile device that allows UART and USB communication using the same connector, and methods of operating the same
CN109660422B (en) Network card bandwidth testing method, device, terminal and storage medium based on multiple processes
CN109062832B (en) Method, device and storage medium for adjusting I2C bus parameters
CN107147553A (en) Method of adjustment, adjusting apparatus and the adjusting device of slave station baud rate and frame format
EP3783840A1 (en) Deep learning-based bandwidth filtering method and device, server, and storage medium
CN105045697A (en) Test system and method for PCIE signal integrity
CN112333246A (en) ABtest experiment method and device, intelligent terminal and storage medium
CN114063758B (en) Current value obtaining method, device and medium
CN109542826B (en) SPI communication control method, device, equipment and system
TWI459874B (en) A method for circuit layout and a device using the same
CN115356561A (en) Line loss calibration method, system, electronic device and computer-readable storage medium
CN107864515A (en) A kind of control method and device of AP channels switching
CN114443537A (en) Method, device, equipment and medium for configuring parameters of PCIE signal sending terminal
US11005689B2 (en) Method and apparatus for bandwidth filtering based on deep learning, server and storage medium
CN111857787B (en) Method, system, equipment and medium for burning firmware of voltage converter
CN103888332B (en) A kind of communication bus and communication node
CN112714466B (en) Service quality measuring method, device and user plane function
JP3766415B2 (en) Reference voltage correction apparatus and reference voltage correction method
US10452799B1 (en) System and method for electronic design space tuning
CN111414201A (en) PCIe card loading method, device, equipment and storage medium
DE102019118839A1 (en) Method for operating a field device in automation technology
CN117762712A (en) Method, device, computer equipment and storage medium for parameter configuration
CN115940857A (en) Automatic adjustment method, device, equipment and medium for digital potentiometer
CN107132964A (en) The determination method and system of multiple app priority in terminal

Legal Events

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