CN106815162B - The inter-integrated circuit means of communication and expanding unit - Google Patents

The inter-integrated circuit means of communication and expanding unit Download PDF

Info

Publication number
CN106815162B
CN106815162B CN201510848869.6A CN201510848869A CN106815162B CN 106815162 B CN106815162 B CN 106815162B CN 201510848869 A CN201510848869 A CN 201510848869A CN 106815162 B CN106815162 B CN 106815162B
Authority
CN
China
Prior art keywords
control module
main control
miscommunication
inter
integrated circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510848869.6A
Other languages
Chinese (zh)
Other versions
CN106815162A (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.)
Mitac Computer Shunde Ltd
Shencloud Technology Co Ltd
Original Assignee
Mitac Computer Shunde Ltd
Shencloud 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 Mitac Computer Shunde Ltd, Shencloud Technology Co Ltd filed Critical Mitac Computer Shunde Ltd
Priority to CN201510848869.6A priority Critical patent/CN106815162B/en
Publication of CN106815162A publication Critical patent/CN106815162A/en
Application granted granted Critical
Publication of CN106815162B publication Critical patent/CN106815162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection

Abstract

A kind of inter-integrated circuit means of communication, by an expanding unit with a main control module and an inter-integrated circuit bus, and an at least slave module executes, the inter-integrated circuit means of communication are that the main control module transmits a data, via the inter-integrated circuit bus to the slave module, when the data transmission fails, the main control module generates a corresponding miscommunication code, and judge whether that executing a data retransmits according to the miscommunication code, it is retransmitted if being judged as and executing the data, then the main control module judges whether a re-transmission count value reaches a default number of retransmissions, if reaching, then the main control module executes itself resetting, and record a miscommunication event, so as to improving the success rate of communication, and then promote communication quality.

Description

The inter-integrated circuit means of communication and expanding unit
Technical field
The invention relates to a kind of communication transmission methods, particularly relate to a kind of inter-integrated circuit means of communication.
Background technique
In inter-integrated circuit (Inter-Integrated Circuit, I2C) bus communication system, usually having one is Main control module, such as microcontroller, remaining multiple periphery is slave module, such as memory, hard disk, system temperature sensor Deng.Main control module actively transmits data to each slave module via I2C bus, or reads the data of each slave module, so as to The parameter function state for monitoring each slave module, increases the safety of system, and facilitates management.
But since I2C bus communication system application is more various, I2C bus is be easy to cause to be interfered, such as circuit is dry It disturbs, so that various mistakes occur for the data transmission between main control module and each slave module, at this point, main control module stops data It sendes or receive, so as to cause Communications failure.
Summary of the invention
Therefore, the purpose of the present invention is to provide a kind of inter-integrated circuit means of communication for improving communication success rate.
Then, the inter-integrated circuit means of communication of the present invention, are executed by an inter-integrated circuit communication system, and the inside is whole Closing circuit communication system includes a main control module, an inter-integrated circuit bus, and an at least slave module, internal integration electricity The road means of communication include a step (A), a step (B), a step (C), a step (D), a step (F) and a step (G).
The step (A) is that the main control module transmits a data, via the inter-integrated circuit bus to the slave module.
The step (B) is when the data transmission fails, which generates a corresponding miscommunication code.
The step (C) is that the main control module judges whether to execute data re-transmission according to the miscommunication code.
The step (D) if be the judging result of step (C) be it is yes, the main control module judge one re-transmission count value whether reach To a default number of retransmissions.
The step (F) is if being the judging result of step (D) is yes, itself resetting of main control module execution one.
The step (G) is the main control module according to the miscommunication code, records a miscommunication event.
In addition, another object of the present invention is to provide a kind of expanding units for improving communication success rate.
Then, expanding unit of the present invention is electrically connected an at least slave module, and includes an inter-integrated circuit bus, and One main control module.
The main control module transmits a data, via the inter-integrated circuit bus to the slave module, when the data transmission Failure, the main control module generate a corresponding miscommunication code, and are judged whether to execute a data according to the miscommunication code Re-transmission retransmits if being judged as and executing the data, which judges whether a re-transmission count value reaches a default re-transmission time Number, if judgement reaches, which executes itself resetting, and according to the miscommunication code, records a miscommunication thing Part.
Effect of the invention is: the main control module can execute the data and retransmit when the data transmission fails, and When reaching the default number of retransmissions, records the miscommunication event and give user and learn, communicated so as to increasing with the slave module Success rate, and then promote communication quality.
[Detailed description of the invention]
Fig. 1 is an inter-integrated circuit communication system used in the inter-integrated circuit means of communication of the present invention;And
Fig. 2 is an embodiment of the inter-integrated circuit means of communication of the present invention.
[specific embodiment]
Refering to fig. 1, the one of inter-integrated circuit (Inter-Integrated Circuit, the I2C) means of communication of the present invention Embodiment is executed by an inter-integrated circuit communication system 1, which includes an expanding unit (Expander) 11, and plural slave module (slave module) 12.
The expanding unit 11 includes a main control module (master module) 111, one inter-integrated circuit bus 112, one Flash memory (Flash ROM) 113 and a non-volatility memorizer 114.The main control module 111 for example can be with a microcontroller Device is implemented, which has a tandem data line (serial data line, SDA) and a tandem Clock pulse line (serial clock line, SCL), the main control module 111 via the internal integration bus 112 the serial data Line and the tandem clock pulse line carry out communication transfer with the grade slave modules 12 each other.The flash memory 113 stores a program Code reads for the main control module 111 and executes the functions such as control, counting, re-transmission, resetting.The non-volatility memorizer 114 then can For recording a miscommunication event.
Each slave module 12 is electrically connected to the inter-integrated circuit bus 112 of the expanding unit 11, and for example can be with one Temperature sensor, an electronics formula of erasing can make carbon copies any one of the read only memory, a power-supply unit to implement.
Referring to Fig.2, the embodiment of the inter-integrated circuit means of communication of the present invention is in the inter-integrated circuit communication system 1 Middle implementation, each step of this method described further below.
In step, which transmits a data, via the inter-integrated circuit bus 112 to the subordinate mould Block 12.And the main control module 111 stores a default number of retransmissions.
In stepb, when the data transmission fails, which generates a corresponding miscommunication code.In detail For, which, which is (Mutex timeout) when one main control module mutual exclusion of instruction is overflow, a main control module is unexpected interrupts (Unexpected interrupt source), a slave module reception data failure (Data NACK), a main control module are mutual Denounce overflow Shi Huifu (Mutex timeout recovered) and a slave module address dont answer (slave address One of NACK).
In step C, which judges whether that executing a data retransmits according to the miscommunication code, if judgement It is not required to execute data re-transmission, that is, is directly entered step G.Furtherly, when the miscommunication code overflows for the main control module mutual exclusion When, the main control module it is unexpected interrupt, the slave module receive data failure one of when, the main control module 111 judgement Execute data re-transmission;When the miscommunication code overflows Shi Huifu, the slave module address dont answer for the main control module mutual exclusion, The main control module 111 judgement does not execute data re-transmission.
In step D, if the judging result of step C be it is yes, the main control module 111 judge one re-transmission count value whether reach To a default number of retransmissions.
In step E, if the judging result of step D be it is no, the main control module 111 by the re-transmission count value increase, and Return step A, wherein return step A is to indicate that the main control module 111 retransmits the data.And in the present embodiment, the master control Module 111 is that the re-transmission count value is increased by one, and return step A.
In step F, if the judging result of step D is yes, itself resetting (reset) of the main control module 111 execution one, And enter step G.That is, the miscommunication code still exists after the main control module 111 executes data re-transmission, and When having reached the default number of retransmissions, which carries out itself resetting.
In step G, if the judging result of step C is no, and after step F carries out itself resetting, the master control Module 111 records a miscommunication event in the non-volatility memorizer 114, wherein the communication is wrong according to the miscommunication code Part of causing delay includes going through for the number of retransmissions value corresponding to the miscommunication code and the miscommunication code and this itself resetting Records of the Historian record.Specifically, when the miscommunication code is the excessive Shi Huifu of the main control module mutual exclusion, the slave module address dont answer One of them when, the main control module 111 judgement does not execute data re-transmission and is recorded as and only accordingly by the miscommunication code The miscommunication event is in the non-volatility memorizer 114.In addition, the main control module 111 is because the re-transmission count value reaches this Default number of retransmissions, and after carrying out itself resetting, it also will record into the miscommunication event in the non-volatility memorizer 114.In this way, user can learn the miscommunication code of 111 data transmission of main control module failure by the miscommunication event, And learn data number of retransmissions corresponding to the miscommunication code, and whether by information such as itself resettings.
To sum up explanation is it is found that the inter-integrated circuit means of communication of the present invention, can make the main control module 111 in data transmission When failure, by determining whether to retransmit with whether number of retransmissions reaches the upper limit, the technology of cooperation resetting main control module 111 makes With can improve the success rate of the main control module 111 communication, so that entirety I2C communication quality becomes more preferably, and be recorded as this and lead to News error event is learnt for user, so can reach the purpose of the present invention really.
A specific embodiment of the invention and embodiment are elaborated above in conjunction with attached drawing, but cannot with restriction The scope of the present invention, the made modification and transformation in scope of the present invention patent, all should belong to the invention patent range It is interior.

Claims (8)

1. a kind of inter-integrated circuit means of communication are executed by an inter-integrated circuit communication system, the inter-integrated circuit is logical News system includes a main control module, an inter-integrated circuit bus, and an at least slave module, it is characterised in that: the inside is whole Closing the circuit means of communication includes:
(A) main control module transmits a data, via the inter-integrated circuit bus to the slave module;
(B) when the data transmission fails, which generates a corresponding miscommunication code;
(C) main control module judges whether that executing a data retransmits according to the miscommunication code;
(D) if the judging result of step (C) be it is yes, which judges whether a re-transmission count value reaches one and default retransmit Number;
(F) if the judging result of step (D) is yes, itself resetting of main control module execution one;And
(G) main control module records a miscommunication event, which includes the communication according to the miscommunication code The historical record of the re-transmission count value corresponding to error code and the miscommunication code and itself resetting.
2. the inter-integrated circuit means of communication described in accordance with the claim 1, it is characterised in that: the inter-integrated circuit communication side Method also includes:
(E) if the judging result of step (D) be it is no, which increases the re-transmission count value, and return step (A).
3. the inter-integrated circuit means of communication described in accordance with the claim 1, it is characterised in that: if the judging result of step (C) Be it is no, then proceed directly to step (G).
4. the inter-integrated circuit means of communication described in accordance with the claim 1, it is characterised in that: in the step (A), the master control mould Block more stores the default number of retransmissions, and in the step (B), when which is that one main control module mutual exclusion of instruction is overflow, one Main control module is unexpected to be interrupted, a slave module receives data failure, a main control module mutual exclusion is overflow Shi Huifu and a slave module One of address dont answer, and in step (C), when which is judged as that the main control module mutual exclusion is overflow, the master control Module is unexpected to be interrupted when receiving one of data failure with the slave module, and main control module judgement executes the data weight It passes.
5. a kind of expanding unit is electrically connected an at least slave module, it is characterised in that: the device includes:
One inter-integrated circuit bus;And
One main control module transmits a data, via the inter-integrated circuit bus to the slave module, when the data transmission loses It loses, which generates a corresponding miscommunication code, and is judged whether to execute a data weight according to the miscommunication code It passes, is retransmitted if being judged as and executing the data, which judges whether a re-transmission count value reaches a default number of retransmissions, If judgement reaches, which executes itself resetting, and according to the miscommunication code, records a miscommunication event, The miscommunication event includes re-transmission count value corresponding to the miscommunication code and the miscommunication code and this itself The historical record of resetting.
6. expanding unit according to claim 5, it is characterised in that: the expanding unit also includes:
One non-volatility memorizer records the miscommunication event for the main control module according to the miscommunication code.
7. expanding unit according to claim 5, it is characterised in that: if the main control module judges according to the miscommunication code It is retransmitted not execute the data, then the main control module records the miscommunication event according to the miscommunication code.
8. expanding unit according to claim 5, it is characterised in that: the miscommunication code is one main control module mutual exclusion of instruction Overflow when, a main control module it is unexpected interrupt, a slave module receive data failure, a main control module mutual exclusion overflow Shi Huifu and one One of slave module address dont answer.
CN201510848869.6A 2015-11-27 2015-11-27 The inter-integrated circuit means of communication and expanding unit Active CN106815162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510848869.6A CN106815162B (en) 2015-11-27 2015-11-27 The inter-integrated circuit means of communication and expanding unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510848869.6A CN106815162B (en) 2015-11-27 2015-11-27 The inter-integrated circuit means of communication and expanding unit

Publications (2)

Publication Number Publication Date
CN106815162A CN106815162A (en) 2017-06-09
CN106815162B true CN106815162B (en) 2019-08-16

Family

ID=59103153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510848869.6A Active CN106815162B (en) 2015-11-27 2015-11-27 The inter-integrated circuit means of communication and expanding unit

Country Status (1)

Country Link
CN (1) CN106815162B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135948A (en) * 2010-01-25 2011-07-27 安国国际科技股份有限公司 Inter-integrated circuit/serial peripheral interface master control interface circuit structure
CN102567133A (en) * 2011-12-31 2012-07-11 广州视声电子科技有限公司 Method for implementing communication by means of interruption I2C (inter to integrated circuit) devices and I2C system
CN203733110U (en) * 2013-12-18 2014-07-23 明瑞电子(成都)有限公司 Internal integration circuit and control circuit thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7676621B2 (en) * 2003-09-12 2010-03-09 Hewlett-Packard Development Company, L.P. Communications bus transceiver

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135948A (en) * 2010-01-25 2011-07-27 安国国际科技股份有限公司 Inter-integrated circuit/serial peripheral interface master control interface circuit structure
CN102567133A (en) * 2011-12-31 2012-07-11 广州视声电子科技有限公司 Method for implementing communication by means of interruption I2C (inter to integrated circuit) devices and I2C system
CN203733110U (en) * 2013-12-18 2014-07-23 明瑞电子(成都)有限公司 Internal integration circuit and control circuit thereof

Also Published As

Publication number Publication date
CN106815162A (en) 2017-06-09

Similar Documents

Publication Publication Date Title
US11943233B2 (en) Vehicle communication apparatus, in-vehicle network system, and vehicle communication method
CN106031098B (en) Abnormal frame coping method, abnormal detection electronic control unit and vehicle-mounted network system
CN102546784B (en) Method for conducting batch upgrading for device firmware based on controller area network (CAN) bus
CN110098909B (en) LAA communication method and device
EP3295294A1 (en) Stream computing system and method
CN106954276B (en) Method, device and system for retransmission scheduling
EP3528470A1 (en) Control device, control system, control method, and control program
CN101106438B (en) Communication network system and error verification method
CN104038316A (en) Method for high-reliability high-timeliness asynchronous serial communication of space camera
CN106815162B (en) The inter-integrated circuit means of communication and expanding unit
CN109154925A (en) Communication equipment, communication means, program and communication system
CN110789580A (en) Communication detection method, equipment and system of train network control system
US10135578B2 (en) Method of re-transmitting data and electronic device therefor
US9491110B2 (en) Method and device for securing data packets to be transmitted via an interface
CN103152835A (en) Method and system for estimating uplink sub-frame PUSCH (Physical Uplink Shared Channel) usable resource in LTE (Long Term Evolution) system
TWI620066B (en) Communication method of inter-integrated circuit and expander device using the same
CN103873192A (en) Data processing method and device
CN106331183A (en) Implementation method of internet of things, controller of internet of things and system of internet of things
CN106293835A (en) A kind of method and system of smart machine firmware upgrade
CN105653477A (en) Double-port RAM-based method for communication of hard core and soft core in FPGA
CN106155712A (en) The acquisition methods of a kind of Windows control property and device
CN103825676B (en) A kind of method that MVB device status word based on load balancing transmits
CN109995480B (en) Data retransmission method and apparatus and computer-readable storage medium
JP2018055318A (en) Electronic apparatus and program
JP5989193B1 (en) Software update system

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