IP Library Granted Patent US 11,726,946
Granted Patent B2
US 11,726,946 · App. 17/795,255 · Granted Aug 15, 2023

I2C bus communication control method, device and system, and readable storage medium

Inventors: Ningya Lin (Beijing, CN); Yuanman Tong (Beijing, CN)
Assignee: INSPUR (BEIJING) ELECTRONIC INFORMATION INDUSTRY CO., LTD.
G06F13/4282G06F2213/0016
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,726,946
App. No.
17/795,255
Granted
Aug 15, 2023
Kind
B2
Abstract

An I2C bus communication control method, device and system, and a readable storage medium. The method comprises: receiving configuration information of an I2C bus sent by an upper-layer application; analyzing the configuration information to obtain a plurality of polling parameters; writing the plurality of polling parameters into a polling table; and controlling the I2C bus, and executing a corresponding read-write operation according to the polling table. In the method, the read-write operation executed on the I2C bus is performed according to the polling table, thus an accurate communication condition of the I2C bus can be directly obtained on the basis of the polling table without accessing a bus state in a polling manner; congestion risks can be reduced, and the access efficiency of a single main device can also be achieved when a plurality of main devices exist.

Claims (74)

1. An inter-integrated circuit (I2C) bus communication control method, wherein characterized in that, the method comprises:

receiving configuration information of an I2C bus sent by an upper-layer application;

analyzing the configuration information to obtain a plurality of polling parameters, comprising:

analyzing the configuration information to obtain an operation type, a main device, a slave device, a number of bytes, polling time and a priority corresponding to each read-write operation respectively;

calculating remaining time corresponding to the read-write operation through the number of bytes and a polling period corresponding to each read-write operation; and

taking the operation type, the main device, the slave device, the number of bytes, the polling time, the remaining time and the priority corresponding to one read-write operation as one string of polling parameter;

writing the plurality of polling parameters into a polling table; and

controlling the I2C bus, and executing a corresponding read-write operation according to the polling table.

2. The I2C bus communication control method according to claim 1 , wherein the method further comprises:

receiving configuration modification information sent by the upper-layer application; and

updating the polling table through the configuration modification information.

3. The I2C bus communication control method according to claim 1 , wherein the step of calculating the remaining time corresponding to the read-write operation through the number of bytes and the polling period corresponding to each read-write operation, comprises:

calculating executing time for executing one read-write operation through the number of bytes and a bus frequency; and

obtaining the remaining time through an underlying clock and in combination with the executing time and the polling period.

4. The I2C bus communication control method according to claim 1 , wherein the step of controlling the I2C bus, and executing the corresponding read-write operation according to the polling table, comprises:

determining each read-write operation to be executed according to the corresponding operation type, main device, slave device and number of bytes;

determining an executing time of each read-write operation to be executed according to the priority and the remaining time;

executing each read-write operation to be executed according to the executing time; and

checking the read-write operations of the I 2 C bus, and intercepting failed read-write operations.

5. The I2C bus communication control method according to claim 1 , wherein the method further comprises:

receiving a communication interruption request sent by the upper-layer application; and

generating an end signal of a target read-write operation, wherein the target read-write operation is a read-write operation currently executed by the I2C bus.

6. The I2C bus communication control method according to claim 1 , wherein the method further comprises:

in response to an access failure frequency of a target slave device reaching a degradation threshold value, reducing a priority, corresponding to the target slave device, in the polling table.

7. An inter-integrated circuit (I2C) bus communication control system, wherein the system comprises:

an upper-layer application, an I2C bus communication control equipment, I2C main devices and I2C slave devices which are connected with an I2C bus;

wherein the upper-layer application accesses the I2C bus communication control equipment through an Advanced eXtensible Interface (AXI) bus;

the I2C bus communication control equipment comprises a register, a counter and a polling table; and

the I2C bus communication control equipment is configured to execute any steps of:

receive configuration information of the I2C bus sent by the upper-layer application;

analyze the configuration information to obtain a plurality of polling parameters, wherein the I2C bus communication control equipment is further configured to:

analyze the configuration information to obtain an operation type, a main device, a slave device, a number of bytes, polling time and a priority corresponding to each read-write operation respectively;

calculate remaining time corresponding to the read-write operation through the number of bytes and a polling period corresponding to each read-write operation; and

take the operation type, the main device, the slave device, the number of bytes, the polling time, the remaining time and the priority corresponding to one read-write operation as one string of polling parameter;

write the plurality of polling parameters into the polling table; and

control the I2C bus, and execute a corresponding read-write operation according to the polling table.

8. The I2C bus communication control system according to claim 7 , wherein the I2C bus communication control equipment is configured to:

receive configuration modification information sent by the upper-layer application; and

update the polling table through the configuration modification information.

9. The I2C bus communication control system according to claim 7 , wherein the I2C bus communication control equipment is configured to execute any steps of:

calculate executing time for executing one read-write operation through the number of bytes and a bus frequency; and

obtain the remaining time through an underlying clock and in combination with the executing time and the polling period.

10. The I2C bus communication control system according to claim 7 , wherein the I2C bus communication control equipment is configured to:

determine each read-write operation to be executed according to the corresponding operation type, main device, slave device and number of bytes;

determine an executing time of each read-write operation to be executed according to the priority and the remaining time;

execute each read-write operation to be executed according to the executing time; and

check the read-write operations of the I2C bus, and intercept failed read-write operations.

11. The I2C bus communication control system according to claim 7 , wherein the I2C bus communication control equipment is configured to:

receive a communication interruption request sent by the upper-layer application; and

generate an end signal of a target read-write operation, wherein the target read-write operation is a read-write operation currently executed by the I2C bus.

12. The I2C bus communication control system according to claim 7 , wherein the I2C bus communication control equipment is configured to:

in response to an access failure frequency of a target slave device reaching a degradation threshold value, reduce a priority, corresponding to the target slave device, in the polling table.

13. A non-transitory readable storage medium, storing a computer program, wherein the computer program, upon execution by a processor, is configured to cause the processor to:

receive configuration information of an I2C bus sent by an upper-layer application;

analyze the configuration information to obtain a plurality of polling parameters, wherein the computer program, upon execution by the processor, is further configured to cause the processor to:

analyze the configuration information to obtain an operation type, a main device, a slave device, a number of bytes, polling time and a priority corresponding to each read-write operation respectively:

calculate remaining time corresponding to the read-write operation through the number of bytes and a polling period corresponding to each read-write operation; and

take the operation type, the main device, the slave device, the number of bytes, the polling time, the remaining time and the priority corresponding to one read-write operation as one string of polling parameter;

write the plurality of polling parameters into a polling table; and

control the I2C bus, and execute a corresponding read-write operation according to the polling table.

14. The non-transitory readable storage medium according to claim 13 , wherein the computer program, upon execution by the processor, is configured to cause the processor to:

receive configuration modification information sent by the upper-layer application; and

update the polling table through the configuration modification information.

15. The non-transitory readable storage medium according to claim 13 , wherein the computer program, upon execution by the processor, is configured to cause the processor to:

calculate executing time for executing one read-write operation through the number of bytes and a bus frequency; and

obtain the remaining time through an underlying clock and in combination with the executing time and the polling period.

16. The non-transitory readable storage medium according to claim 13 , wherein the computer program, upon execution by the processor, is configured to cause the processor to:

determine each read-write operation to be executed according to the corresponding operation type, main device, slave device and number of bytes;

determine an executing time of each read-write operation to be executed according to the priority and the remaining time;

execute each read-write operation to be executed according to the executing time; and

check the read-write operations of the I2C bus, and intercept failed read-write operations.

17. The non-transitory readable storage medium according to claim 13 , wherein the computer program, upon execution by the processor, is configured to cause the processor to:

receive a communication interruption request sent by the upper-layer application; and

generate an end signal of a target read-write operation, wherein the target read-write operation is a read-write operation currently executed by the I2C bus.

Assignments (2)
LICENSE Recorded Jun 30, 2026
From: IEIT SYSTEMS CO., LTD
To: AIVRES SYSTEMS INC.
Reel/Frame 075857/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 26, 2022
From: LIN, NINGYA; TONG, YUANMAN
To: INSPUR (BEIJING) ELECTRONIC INFORMATION INDUSTRY CO., LTD.
Reel/Frame 060619/0594 →
Priority Claims (1)
CN 202010589296.0 · Jun 24, 2020 · national
Continuity (1)
Related Publication 20230064411A1 · Mar 2, 2023