CN102594643B - A kind of Controller Area Network BUS communicating control method, Apparatus and system - Google Patents
A kind of Controller Area Network BUS communicating control method, Apparatus and system Download PDFInfo
- Publication number
- CN102594643B CN102594643B CN201210064138.9A CN201210064138A CN102594643B CN 102594643 B CN102594643 B CN 102594643B CN 201210064138 A CN201210064138 A CN 201210064138A CN 102594643 B CN102594643 B CN 102594643B
- Authority
- CN
- China
- Prior art keywords
- mode
- controller
- communication
- bus
- indication message
- 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
Links
Landscapes
- Small-Scale Networks (AREA)
Abstract
The invention discloses a kind of Controller Area Network BUS communicating control method, Apparatus and system, said method comprises: the communication state of testbus under communication mode, and when communication abnormality being detected, sends error reporting to CPU; Receive described CPU send, after the first indication message corresponding with described error reporting, switching working mode is to listen mode; Under described listen mode, detect described communication abnormality whether eliminate, and when described communication abnormality is eliminated, send mistake to described CPU and eliminate report; Receive that described CPU sends, after described mistake is eliminated and reported the second corresponding indication message, switching working mode is to communication mode.Avoid when communication abnormality being detected under communication mode, ceaselessly on Controller Area Network BUS, transmit a large amount of erroneous frame, these a large amount of erroneous frame take bus bandwidth, cause the problem of network resources waste.
Description
Technical field
The application relates to Controller Area Network BUS field, particularly relates to a kind of Controller Area Network BUS communicating control method, Apparatus and system.
Background technology
Controller local area network (ControllerAreaNetwork, CAN) bus is a kind of layering serial data communication agreement of German BOSCH company development, and finally becomes international standard (ISO11898).Controller Area Network BUS has high reliability and good error detection capability because of it, is widely used in Computer Controlled System for Vehicle.
All consensus standards of Controller Area Network BUS have been integrated in the middle of the chip of CAN controller, in controller local area network, as CPU (CentralProcessingUnit, central processing unit) when wanting to send a frame CAN message by CAN controller, only need to want the data content delivery sent to CAN controller, and data protocol packing, bus arbitration, fault detect, data re-transmission and fault such as to report all automatically completed by the logic of CAN controller hardware inside at the function.
CAN controller has two kinds of mode of operations: communication mode and listen mode.If CAN controller is in listen mode, then can only receives the message in network and detect whether communication abnormality occurs; If CAN controller is in communication mode, then when CAN controller detects that bus communication is abnormal, when mistake namely being detected, the Frame that transmitting can be stopped immediately and send erroneous frame to bus, simultaneously, the counter be arranged in CAN controller can count the mistake detected, when error accumulation is to certain number of times, CAN controller will enter bus-off state, when CPU detects that CAN controller is in bus-off state, switched back normal communication mode state, and error counter is reset.
But in said process, if communication abnormality still exists, CAN controller is after switching back normal communication mode state, still communication abnormality can be detected, then continue to send erroneous frame, and repeat above-mentioned steps until communication abnormality is eliminated always, thus cause Controller Area Network BUS can transmit have a large amount of erroneous frame, and these erroneous frame occupy the bandwidth of bus, cause the waste of Internet resources.
Summary of the invention
For solving the problems of the technologies described above, the embodiment of the present application provides a kind of Controller Area Network BUS communicating control method, takies bus bandwidth, cause the problem of network resources waste to solve erroneous frame in prior art.
Technical scheme is as follows:
A kind of Controller Area Network BUS communicating control method, comprising:
The communication state of testbus under communication mode, and when communication abnormality being detected, send error reporting to CPU;
Receive described CPU send, corresponding with described error reporting, mode of operation is switched to the first indication message of listen mode;
According to described first indication message, switching working mode is to listen mode;
Under described listen mode, detect described communication abnormality whether eliminate, and when described communication abnormality is eliminated, send mistake to described CPU and eliminate report;
Receive that described CPU sends, eliminate with described mistake and report corresponding, mode of operation is switched to the second indication message of communication mode;
According to described second indication message, switching working mode is to communication mode.
Whether said method, preferably, describedly detect described communication abnormality and eliminate and comprise under described listen mode:
Whether have CAN message be successfully sent and receive in testbus, if so, then described communication abnormality is eliminated; Otherwise described communication abnormality is not eliminated.
Whether said method, preferably, have CAN message to be successfully sent in described CAN controller monitoring bus and the process received comprises:
Described CAN controller judges whether the response field of the CAN message sent in described bus becomes dominant position from recessive position, and if so, then described CAN message is successfully sent and receives, and if not, then described CAN message is not successfully sent or receives.
A kind of Controller Area Network BUS communicating control method, comprising:
Receive the communication state of CAN controller testbus under communication mode, and the error reporting sent when communication abnormality being detected;
Send corresponding with described error reporting, indicate described CAN controller mode of operation to be switched to the first indication message of listen mode;
Receive described CAN controller to detect described communication abnormality in the listen mode and whether eliminate, and the mistake sent when described communication abnormality is eliminated eliminates report;
To send and described mistake is eliminated and reported corresponding, indicate described CAN controller mode of operation to be switched to the second indication message of communication mode.
A kind of CAN controller, comprising:
First detection module, for the communication state of testbus under communication mode, and when communication abnormality being detected, sends error reporting to CPU;
First receiver module, for receive described CPU send, corresponding with described error reporting, mode of operation is switched to the first indication message of listen mode;
Whether the second detection module, eliminate for detecting described communication abnormality under described listen mode, and when described communication abnormality is eliminated, send mistake eliminate report to described CPU;
Second receiver module, for receiving, described CPU sends, and eliminates and reports corresponding, mode of operation is switched to the second indication message of communication mode with described mistake;
Handover module, for switching to listen mode according to described first indication message by mode of operation; According to described second indication message, mode of operation is switched to communication mode.
A kind of processor, comprising:
First receiver module, for receiving the communication state of CAN controller testbus under communication mode, and the error reporting sent when communication abnormality being detected;
First sending module, corresponding with described error reporting for sending, indicate described CAN controller mode of operation to be switched to the first indication message of listen mode;
Whether the second receiver module, detect described communication abnormality in the listen mode eliminate for receiving described CAN controller, and the mistake sent when described communication abnormality is eliminated eliminates report;
Second sending module, reporting corresponding for sending to eliminate with described mistake, indicating described CAN controller mode of operation to be switched to the second indication message of communication mode.
A kind of Controller Area Network BUS communication control system, comprising:
Bus, at least three CAN controller and with CAN controller processor one to one
Described CAN controller is used for the communication state detecting described bus under communication mode, and when communication abnormality being detected, Xiang Yuqi one to one processor sends error reporting; Receive described processor send, corresponding with described error reporting, mode of operation is switched to the first indication message of listen mode; According to described first indication message, switching working mode is to listen mode; Under described listen mode, detect described communication abnormality whether eliminate, and when described communication abnormality is eliminated, send mistake to described processor and eliminate report; Receive that described processor sends, eliminate with described mistake and report corresponding, mode of operation is switched to the second indication message of communication mode; According to described second indication message, switching working mode is to communication mode;
Described processor, for receiving the communication state with its CAN controller testbus under communication mode one to one, and the error reporting sent when communication abnormality being detected; Send corresponding with described error reporting, indicate described CAN controller mode of operation to be switched to the first indication message of listen mode; Receive described CAN controller to detect described communication abnormality in the listen mode and whether eliminate, and the mistake sent when described communication abnormality is eliminated eliminates report; To send and described mistake is eliminated and reported corresponding, indicate described CAN controller mode of operation to be switched to the second indication message of communication mode.
The technical scheme provided from above the embodiment of the present application, a kind of Controller Area Network BUS communicating control method provided by the invention and system, when detecting that bus communication is abnormal, the mode of operation of CAN controller is switched to listen mode, no longer in bus, send erroneous frame, and when CAN controller monitors communication abnormality elimination, mode of operation is switched to communication mode, avoid when communication abnormality being detected under communication mode, ceaselessly in bus, transmit a large amount of erroneous frame, these a large amount of erroneous frame take bus bandwidth, cause the problem of network resources waste.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, the accompanying drawing that the following describes is only some embodiments recorded in the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The flow chart of a kind of Controller Area Network BUS communicating control method that Fig. 1 provides for the embodiment of the present application one;
The flow chart of a kind of Controller Area Network BUS communicating control method that Fig. 2 provides for the embodiment of the present application two;
The structural representation of a kind of CAN controller that Fig. 3 provides for the embodiment of the present application three;
The structural representation of a kind of processor that Fig. 4 provides for the embodiment of the present application four;
The structural representation of a kind of Controller Area Network BUS communication control system that Fig. 5 provides for the embodiment of the present application five.
In order to illustrated simple and clear, above accompanying drawing shows the common form of structure, and in order to avoid unnecessary fuzzy the present invention, can omit description and the details of known features and technology.In addition, the unit in accompanying drawing is unnecessary proportionally to be drawn.Such as, can relative to the size of some unit in other unit enlarged drawings, thus help better to understand embodiments of the invention.Identical label in different accompanying drawing represents identical unit.
Term " first ", " second ", " the 3rd " " 4th " etc. (if existence) in specification and claims and above-mentioned accompanying drawing are for distinguishing similar unit, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein such as can with except here illustrated or otherwise describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, to comprise the process of a series of unit, method, system, product or equipment being not necessarily limited to those unit, but can comprise clearly do not list or for intrinsic other unit of these processes, method, product or equipment.
Embodiment
The application's scheme is understood better in order to make those skilled in the art person.Below in conjunction with the accompanying drawing in the embodiment of the present application, be clearly and completely described the technical scheme in the embodiment of the present application, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
Embodiment one
The flow chart of a kind of Controller Area Network BUS communicating control method that the embodiment of the present application one provides as shown in Figure 1, comprising:
Step S101: the communication state of testbus under communication mode, judges whether described bus sends communication abnormality, if so, then performs step S102, otherwise, continue to perform step S101;
Step S102: send error reporting to CPU;
In controller local area network, under normal circumstances, the mode of operation of CAN controller is in communication mode, in the present embodiment, the communication state of CAN controller testbus under communication mode, judge whether bus communication abnormality occurs, when bus generation communication abnormality, send error reporting to CPU; Otherwise, continue testbus and whether communication abnormality occur.
Step S103: receive described CPU send, corresponding with described error reporting, mode of operation is switched to the first indication message of listen mode;
Step S104: according to described first indication message, switching working mode is to listen mode;
After CAN controller receives the first indication message of CPU transmission, according to the first indication message, its mode of operation is switched to listen mode, namely communication mode is switched to listen mode;
Step S105: the communication state detecting described bus under described listen mode, judges whether described communication abnormality is eliminated, and if so, then performs step S106, otherwise, continue to perform step S105;
Step S106: send mistake to described CPU and eliminate report;
After CAN controller switches to listen mode, stop sending CAN message to bus, and stop sending erroneous frame to bus.
Whether CAN controller detects communication abnormality in the listen mode and eliminates, if eliminated, then sends mistake to CPU and eliminates report, otherwise, continue to detect communication abnormality and whether eliminate.
Whether CAN controller detects whether communication abnormality eliminate in the listen mode can be have CAN message be successfully sent and receive in testbus, and if so, then described communication abnormality is eliminated; Otherwise described communication abnormality is not eliminated.
Concrete, because what transmit in bus is CAN message, a complete CAN message comprises arbitration field, controlling filed, data fields and response field.On physical bus, these data are all with 0, and the form of 1 exists, and 1 is called stealthy position, and 0 is called dominant position, and dominant potential energy enough covers recessive position.Transmit leg is when sending CAN message, after sending arbitration field, controlling filed, data fields, a recessive response field can be sent, namely 1, and recipient is after receiving arbitration field, controlling filed and data fields, a dominant response field can be sent, namely 0, above-mentioned recessiveness response field can cover by this dominant acknowledge field, namely replys field and becomes 0.That is, if the data sent do not have node to receive, so reply field and just keep recessive, namely replying field is 1; Otherwise if the data sent be received, response field will dominantly having covered of the side of being received transmission, and namely response field becomes 0.And the CAN message with same mark can only be transmitted due to the moment a certain in bus, so, by judging whether the response field of the CAN message sent in bus becomes dominant position from recessive position and come whether have CAN message be successfully sent and receive in testbus, and then can judge whether communication abnormality is eliminated; When the CAN message transmitted in bus becomes dominant position from recessive position, illustrate that CAN message is successfully sent and receives, otherwise CAN message is not successfully sent or receives.
Step S107: receive that described CPU sends, eliminates with described mistake and reports corresponding, mode of operation is switched to the second indication message of communication mode;
Step S108: according to described second indication message, switching working mode is to communication mode.
After CAN controller receives the second indication message of CPU transmission, according to the second indication message, its mode of operation is switched to communication mode, namely listen mode is switched to communication mode.
In the present embodiment, CAN controller is when communication mode, whether testbus there is communication abnormality, and when communication abnormality being detected, error reporting is sent to CPU, and receiving the corresponding with described error reporting of CPU transmission, after mode of operation being switched to the first indication message of listen mode, mode of operation is switched to listen mode, no longer send erroneous frame to bus, and when detecting that communication abnormality is eliminated in the listen mode, send mistake to CPU and eliminate report, receive CPU send, with described mistake eliminate report corresponding, after mode of operation being switched to the second indication message of communication mode, mode of operation is switched to communication mode, avoid when communication abnormality being detected under communication mode, ceaselessly in bus, transmit a large amount of erroneous frame, these a large amount of erroneous frame take bus bandwidth, cause the problem of network resources waste.
Embodiment two
The flow chart of a kind of Controller Area Network BUS communicating control method that the embodiment of the present application two provides as shown in Figure 2, comprising:
Step S201: receive the error reporting that CAN controller sends;
Step S202: send corresponding with described error reporting, indicates described CAN controller mode of operation to be switched to the first indication message of listen mode;
CPU, after the error reporting receiving CAN controller transmission, sends the first indication message to described CAN controller, indicates described CAN controller that mode of operation is switched to listen mode by communication mode;
Step S203: receive the mistake elimination report that described CAN controller sends;
Step S204: to send and described mistake is eliminated and reported corresponding, indicates described CAN controller mode of operation to be switched to the second indication message of communication mode.
CPU, after the mistake receiving CAN controller transmission eliminates report, sends the second indication message to described CAN controller, indicates described CAN controller that mode of operation is switched to communication mode by listen mode.
In the present embodiment, CPU is receiving the communication state of CAN controller testbus under communication mode, and after the error reporting sent when communication abnormality being detected, send corresponding with described error reporting to CAN controller, indicate described CAN controller that mode of operation is switched to listen mode, detect described communication abnormality in the listen mode and whether eliminate receiving CAN controller, and after the mistake elimination report sent when described communication abnormality is eliminated, to CAN controller send and described mistake eliminate report corresponding, described CAN controller is indicated mode of operation to be switched to the second indication message of communication mode, indicate described CAN controller that mode of operation is switched to communication mode, avoid CAN controller when communication abnormality being detected under communication mode, ceaselessly in bus, transmit a large amount of erroneous frame, these a large amount of erroneous frame take bus bandwidth, cause the problem of network resources waste.
Embodiment three
The structural representation of a kind of CAN controller that the embodiment of the present application three provides as shown in Figure 3, comprising:
First detection module 301, the first receiver module 302, second detection module 303, second receiver module 304 and handover module 305;
First detection module 301 for the communication state of testbus under communication mode, and when communication abnormality being detected, sends error reporting to CPU;
First receiver module 302 for receive described CPU send, corresponding with described error reporting, mode of operation is switched to the first indication message of listen mode;
Whether the second detection module 303 is eliminated for detecting described communication abnormality under described listen mode, and when described communication abnormality is eliminated, sends mistake eliminate report to described CPU;
For receiving, described CPU sends second receiver module 304, eliminates and reports corresponding, mode of operation is switched to the second indication message of communication mode with described mistake;
Mode of operation is switched to listen mode by communication mode for the first indication message sent according to described CPU by handover module 305; Mode of operation is switched to communication mode by listen mode by the second indication message sent according to described CPU.
Preferably, the function of above-mentioned first detection module 301 and the second detection module 303 can be realized by a module, that is, by the function i ntegration of first detection module 301 and the second detection module 303 in a detection module, the function of the two can be realized by this detection module; In like manner, the function of the first receiver module 302 and the second receiver module 304 also can be realized by a module, that is, also by the function i ntegration of the first receiver module 302 and the second receiver module 304 in a receiver module, the function of the two can be realized by this receiver module.
A kind of CAN controller that the present embodiment provides, under communication mode, whether testbus there is communication abnormality, and when communication abnormality being detected, error reporting is sent to CPU, and receiving the corresponding with described error reporting of CPU transmission, after mode of operation being switched to the first indication message of listen mode, mode of operation is switched to listen mode, no longer send erroneous frame to bus, and when detecting that communication abnormality is eliminated in the listen mode, send mistake to CPU and eliminate report, receive CPU send, with described mistake eliminate report corresponding, after mode of operation being switched to the second indication message of communication mode, mode of operation is switched to communication mode, avoid when communication abnormality being detected under communication mode, ceaselessly in bus, transmit a large amount of erroneous frame, these a large amount of erroneous frame take bus bandwidth, cause the problem of network resources waste.
Embodiment four
The structural representation of a kind of processor that the embodiment of the present application four provides as shown in Figure 4, comprising:
3rd receiver module 401, first sending module the 402, four receiver module 403 and the second sending module 404;
The error reporting that 3rd receiver module 401 sends for receiving CAN controller;
First sending module 402 is corresponding with described error reporting for sending, and indicates described CAN controller mode of operation to be switched to the first indication message of listen mode;
The mistake elimination report that 4th receiver module 403 sends for receiving described CAN controller;
Second sending module 404 is reported corresponding for sending to eliminate with described mistake, indicates described CAN controller mode of operation to be switched to the second indication message of communication mode.
Preferably, the function of described 3rd step receiver module 401 and described 4th receiver module 403 also can be realized by a receiver module, also be just say, by the function i ntegration of the 3rd step receiver module 401 and described 4th receiver module 403 in a receiver module, the function of the two can be realized by this receiver module; In like manner, the function of the first sending module 402 and the second sending module 404 also can be realized by a sending module, that is, by the function i ntegration of the first sending module 402 and the second sending module 404 in a sending module, the function of the two can be realized by this sending module.
A kind of processor that the present embodiment provides, receiving the communication state of CAN controller testbus under communication mode, and after the error reporting sent when communication abnormality being detected, send corresponding with described error reporting to CAN controller, indicate described CAN controller that mode of operation is switched to listen mode, detect described communication abnormality in the listen mode and whether eliminate receiving CAN controller, and after the mistake elimination report sent when described communication abnormality is eliminated, to CAN controller send and described mistake eliminate report corresponding, described CAN controller is indicated mode of operation to be switched to the second indication message of communication mode, indicate described CAN controller that mode of operation is switched to communication mode, avoid CAN controller when communication abnormality being detected under communication mode, ceaselessly in bus, transmit a large amount of erroneous frame, these a large amount of erroneous frame take bus bandwidth, cause the problem of network resources waste.
Embodiment five
The structural representation of a kind of Controller Area Network BUS communication control system that the embodiment of the present application five provides as shown in Figure 5, comprising:
Bus 501; At least three CAN controller and with CAN controller processor one to one; In the embodiment of the present application, in described Controller Area Network BUS communication system, CAN controller has five, and be certainly not limited to five, this is not specifically limited;
Each CAN controller is used for the communication state detecting described bus 501 under communication mode, and when communication abnormality being detected, Xiang Yuqi one to one processor sends error reporting; Receive described processor send, corresponding with described error reporting, mode of operation is switched to the first indication message of listen mode; According to described first indication message, switching working mode is to listen mode; Under described listen mode, detect described communication abnormality whether eliminate, and when described communication abnormality is eliminated, send mistake to described processor and eliminate report; Receive that described processor sends, eliminate with described mistake and report corresponding, mode of operation is switched to the second indication message of communication mode; According to described second indication message, switching working mode is to communication mode;
Each processor is for receiving and its error reporting of sending of CAN controller one to one; Send corresponding with described error reporting, indicate described CAN controller mode of operation to be switched to the first indication message of listen mode; Receive the mistake elimination report that described CAN controller sends; To send and described mistake is eliminated and reported corresponding, indicate described CAN controller mode of operation to be switched to the second indication message of communication mode.
A kind of Controller Area Network BUS communication control system that the embodiment of the present application provides, when CAN controller first detects communication abnormality at communication mode, CPU controls described CAN controller and mode of operation is switched to listen mode, and CAN controller first no longer sends erroneous frame to bus at listen mode; When CAN controller detects that communication abnormality is eliminated in the listen mode, CPU controls described CAN controller and mode of operation is switched to communication mode, avoid CAN controller when communication abnormality being detected under communication mode, ceaselessly in bus, transmit a large amount of erroneous frame, these a large amount of erroneous frame take bus bandwidth, cause the problem of network resources waste.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.The above is only the embodiment of the application; it should be pointed out that for those skilled in the art, under the prerequisite not departing from the application's principle; can also make some improvements and modifications, these improvements and modifications also should be considered as the protection range of the application.
Claims (7)
1. a Controller Area Network BUS communicating control method, it is characterized in that, CAN controller has two kinds of mode of operations: communication mode and listen mode, when described CAN controller is in described listen mode, can only receive the message in bus and detect whether communication abnormality occurs; When described CAN controller is in described communication mode, then when described CAN controller detects that bus communication is abnormal, can stop the Frame that transmitting immediately and send erroneous frame to bus, the method specifically comprises:
The communication state of testbus under described communication mode, and when described communication abnormality being detected, send error reporting to CPU;
Receive described CPU send, corresponding with described error reporting, described mode of operation is switched to the first indication message of described listen mode;
According to described first indication message, switch described mode of operation to described listen mode;
Under described listen mode, detect described communication abnormality whether eliminate, and when described communication abnormality is eliminated, send mistake to described CPU and eliminate report;
Receive that described CPU sends, eliminate with described mistake and report corresponding, described mode of operation is switched to the second indication message of described communication mode;
According to described second indication message, switch described mode of operation to described communication mode.
2. whether method according to claim 1, is characterized in that, describedly under described listen mode, detect described communication abnormality eliminate and comprise:
Whether have CAN message be successfully sent and receive in testbus, if so, then described communication abnormality is eliminated; Otherwise described communication abnormality is not eliminated.
3. whether method according to claim 2, is characterized in that, have CAN message to be successfully sent and the process received comprises in described testbus:
CAN controller judges whether the response field of the CAN message sent in described bus becomes dominant position from recessive position, and if so, then described CAN message is successfully sent and receives, and if not, then described CAN message is not successfully sent or receives.
4. a Controller Area Network BUS communicating control method, it is characterized in that, CAN controller has two kinds of mode of operations: communication mode and listen mode, when described CAN controller is in described listen mode, can only receive the message in bus and detect whether communication abnormality occurs; When described CAN controller is in described communication mode, then when described CAN controller detects that bus communication is abnormal, can stop the Frame that transmitting immediately and send erroneous frame to bus, the method specifically comprises:
Receive the communication state of described CAN controller testbus under described communication mode, and the error reporting sent when described communication abnormality being detected;
Send corresponding with described error reporting, indicate described CAN controller described mode of operation to be switched to the first indication message of described listen mode;
Receive described CAN controller under described listen mode, to detect described communication abnormality whether eliminate, and the mistake sent when described communication abnormality is eliminated eliminates report;
To send and described mistake is eliminated and reported corresponding, indicate described CAN controller described mode of operation to be switched to the second indication message of described communication mode.
5. a Controller Area Network BUS communication control unit, it is characterized in that, described application of installation is in CAN controller, described CAN controller has two kinds of mode of operations: communication mode and listen mode, when described CAN controller is in described listen mode, the message in bus can only be received and detect whether communication abnormality occurs; When described CAN controller is in described communication mode, then when described CAN controller detects that bus communication is abnormal, can stop the Frame that transmitting immediately and send erroneous frame to bus, described device specifically comprises:
First detection module, for the communication state of testbus under described communication mode, and when described communication abnormality being detected, sends error reporting to CPU;
First receiver module, for receive described CPU send, corresponding with described error reporting, described mode of operation is switched to the first indication message of described listen mode;
Whether the second detection module, eliminate for detecting described communication abnormality under described listen mode, and when described communication abnormality is eliminated, send mistake eliminate report to described CPU;
Second receiver module, for receiving, described CPU sends, and eliminates and reports corresponding, described mode of operation is switched to the second indication message of described communication mode with described mistake;
Handover module, for switching to listen mode according to described first indication message by described mode of operation; According to described second indication message, described mode of operation is switched to communication mode.
6. a Controller Area Network BUS communication control unit, it is characterized in that, described application of installation is in processor, CAN controller has two kinds of mode of operations: communication mode and listen mode, when described CAN controller is in described listen mode, the message in bus can only be received and detect whether communication abnormality occurs; When described CAN controller is in described communication mode, then when described CAN controller detects that bus communication is abnormal, can stop the Frame that transmitting immediately and send erroneous frame to bus, described device specifically comprises:
3rd receiver module, for receiving the communication state of described CAN controller testbus under communication mode, and the error reporting sent when described communication abnormality being detected;
First sending module, corresponding with described error reporting for sending, indicate described CAN controller described mode of operation to be switched to the first indication message of described listen mode;
Whether the 4th receiver module, detect described communication abnormality eliminate for receiving described CAN controller under described listen mode, and the mistake sent when described communication abnormality is eliminated eliminates report;
Second sending module, reporting corresponding for sending to eliminate with described mistake, indicating described CAN controller described mode of operation to be switched to the second indication message of described communication mode.
7. a Controller Area Network BUS communication control system, it is characterized in that, CAN controller has two kinds of mode of operations: communication mode and listen mode, when described CAN controller is in described listen mode, can only receive the message in bus and detect whether communication abnormality occurs; When described CAN controller is in described communication mode, then when described CAN controller detects that bus communication is abnormal, can stop the Frame that transmitting immediately and send erroneous frame to bus, this system specifically comprises:
Bus, applies the CAN controller of device as claimed in claim 5 and applies the processor of device as claimed in claim 6 one to one with described CAN controller at least three;
Described CAN controller is used for the communication state detecting described bus under communication mode, and when described communication abnormality being detected, sends error reporting to processor; Receive described processor send, corresponding with described error reporting, described mode of operation is switched to the first indication message of described listen mode; According to described first indication message, switch described mode of operation to described listen mode; Under described listen mode, detect described communication abnormality whether eliminate, and when described communication abnormality is eliminated, send mistake to described processor and eliminate report; Receive that described processor sends, eliminate with described mistake and report corresponding, described mode of operation is switched to the second indication message of described communication mode; According to described second indication message, switch described mode of operation to described communication mode;
Described processor, for receiving the communication state of described CAN controller testbus under communication mode, and the error reporting sent when described communication abnormality being detected; Send corresponding with described error reporting, indicate described CAN controller described mode of operation to be switched to the first indication message of described listen mode; Receive described CAN controller under described listen mode, to detect described communication abnormality whether eliminate, and the mistake sent when described communication abnormality is eliminated eliminates report; To send and described mistake is eliminated and reported corresponding, indicate described CAN controller described mode of operation to be switched to the second indication message of described communication mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210064138.9A CN102594643B (en) | 2012-03-12 | 2012-03-12 | A kind of Controller Area Network BUS communicating control method, Apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210064138.9A CN102594643B (en) | 2012-03-12 | 2012-03-12 | A kind of Controller Area Network BUS communicating control method, Apparatus and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102594643A CN102594643A (en) | 2012-07-18 |
CN102594643B true CN102594643B (en) | 2015-11-25 |
Family
ID=46482861
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210064138.9A Active CN102594643B (en) | 2012-03-12 | 2012-03-12 | A kind of Controller Area Network BUS communicating control method, Apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102594643B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6490058B2 (en) * | 2014-04-17 | 2019-03-27 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | In-vehicle network system and fraud detection method |
CN105636086A (en) * | 2014-10-28 | 2016-06-01 | 中兴通讯股份有限公司 | Network mode switching processing method, network mode switching processing device and terminal comprising network mode switching processing device |
JP6594732B2 (en) * | 2015-01-20 | 2019-10-23 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ | Fraud frame handling method, fraud detection electronic control unit, and in-vehicle network system |
CN104954215A (en) * | 2015-07-29 | 2015-09-30 | 天津市英贝特航天科技有限公司 | CAN bus circuit |
CN106502952B (en) * | 2016-10-24 | 2019-08-02 | 郑州云海信息技术有限公司 | A kind of PCIE device goes offline safely design method |
CN107659465B (en) * | 2017-09-13 | 2020-06-23 | 北京新能源汽车股份有限公司 | Device and method for checking error frames of CAN (controller area network) bus of whole vehicle |
CN108829018A (en) * | 2018-08-13 | 2018-11-16 | 上海瑞伯德智能系统股份有限公司 | A kind of numerical control customization machine operation panel USB interface device |
CN113169905B (en) * | 2018-12-13 | 2022-07-05 | 太平洋工业株式会社 | Transmitter and receiver |
CN113296479B (en) * | 2020-06-17 | 2024-07-23 | 盒马(中国)有限公司 | Bus network access unit, transmission line electrical control system and deployment method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201436796U (en) * | 2009-06-19 | 2010-04-07 | 中国船舶重工集团公司第七一一研究所 | Ship engine room monitoring CAN relay module |
CN101909942A (en) * | 2007-12-26 | 2010-12-08 | 本田技研工业株式会社 | Redundant communication system |
-
2012
- 2012-03-12 CN CN201210064138.9A patent/CN102594643B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909942A (en) * | 2007-12-26 | 2010-12-08 | 本田技研工业株式会社 | Redundant communication system |
CN201436796U (en) * | 2009-06-19 | 2010-04-07 | 中国船舶重工集团公司第七一一研究所 | Ship engine room monitoring CAN relay module |
Also Published As
Publication number | Publication date |
---|---|
CN102594643A (en) | 2012-07-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102594643B (en) | A kind of Controller Area Network BUS communicating control method, Apparatus and system | |
CN110808873B (en) | Method and device for detecting link failure | |
CN101908974B (en) | Heat switching system and heat switching method of dual-redundant CAN bus | |
CN103401696A (en) | Dual-network redundant communication system in industrial equipment and communication method thereof | |
CN102984059B (en) | Gigabit Ethernet redundancy network interface card and link switching condition criterion output control method thereof | |
CN103684835B (en) | Link fault reporting method and processing method, and transmission node and primary node | |
CN101355466B (en) | Method and apparatus for transmitting continuous check information message | |
CN110740072A (en) | fault detection method, device and related equipment | |
EP2698948A1 (en) | Method and device for determining failure elimination based on oam protocol | |
CN203206272U (en) | CAN network system having fault detection function | |
CN108141399B (en) | Method and device for preventing manipulation at CAN bus | |
CN102970157A (en) | Link failure processing method, intelligent resilient framework (IRF) member device and data communication device | |
US20090003226A1 (en) | Network intermediary device with connection test packets | |
CN105223949A (en) | Electrical equipment and communication fault diagnosis method and device thereof | |
CN104796329A (en) | Automatic link switching method and automatic link switching device | |
CN100466564C (en) | Failure monitoring method and device of the virtual rented line | |
CN106850423B (en) | A kind of fast replacing method and device of double network port devices | |
CN102932183A (en) | Double-up link failure processing method and device | |
CN102255768A (en) | Method and equipment for detecting port | |
CN201846346U (en) | Dual-redundancy heat switching system of controller area network (CAN) bus | |
CN101867951A (en) | Availability detection method and base station, baseband processing unit and multi-software module system | |
CN105281927A (en) | Method and device for multilink protection switching | |
CN101491026A (en) | Method and system for re-enabling disabled ports in a network with two port MAC relays | |
CN102215145A (en) | Method and device for reporting detection result of link connected state | |
CN103067205B (en) | Under same Host Administration, share the RT and backup RT changing method of same address |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020 Patentee after: Beijing Jingwei Hirain Technologies Co.,Inc. Address before: 100101 Beijing city Chaoyang District Anxiang Beili 11 B block 8 layer Patentee before: Beijing Jingwei HiRain Technologies Co.,Ltd. |