Communications tax procedure
A communication control method with dual-mode CAN modules in ECUs addresses bus abnormality detection and initialization, enhancing message handling capacity and stability.
Patent Information
- Application Number
- DE102014117616
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2013-12-09
- Filing Date
- 2014-12-01
- Publication Date
- 2025-08-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing electronic control units (ECUs) with CAN controllers in reception-only mode cannot transmit ACK signals, preventing effective detection of bus abnormalities such as disconnection, which is not addressed by Patent Document 1.
Implementing a communication control method with a first CAN module in transmission-reception mode and one or more second CAN modules in reception-only mode, where the first module detects bus abnormalities, and a synchronized initialization process is performed for both modules to handle bus abnormalities.
Enables detection of bus abnormalities and synchronized initialization, allowing multiple CAN modules to be controlled as a single combined module, increasing the number of receivable messages and ensuring stable communication.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The present disclosure relates to a communication control method performed by an electronic control unit.
[0002] A known in-vehicle electronic control unit (ECU) includes multiple CAN controllers connected to a common communication bus and performs CAN communication. For example, an electronic control unit described in Patent Document 1 includes a single CAN controller with a transmit-receive mode and one or more CAN controllers with a receive-only mode, preventing ACK transmission and reception within the unit.
[0003] Patent Document 1: JP 2011-131713A
[0004] The electronic control unit of Patent Document 1 avoids the following situation: For example, when a bus abnormality occurs, such as a disconnection or the like, mutual ACK responses within the unit make it impossible to detect the bus abnormality. However, a new difficulty arises. Specifically, the CAN controller with the receive-only mode cannot transmit an ACK, and bus abnormality detection using ACK reception cannot work. Patent Document 1 does not address this type of difficulty with bus abnormalities at all.
[0005] The present disclosure is made in view of the foregoing. An object of the present disclosure is to provide a communication control method for an electronic control unit having only one CAN module configured with a transmission-reception mode (corresponding to a CAN controller of Patent Document 1) and one or more CAN modules configured with a reception-only mode, so that an appropriate process can be performed in the event of a bus abnormality.
[0006] This object is achieved by the communication control method having the features of claim 1. Further advantageous developments and embodiments of the invention are the subject of the subsequent claims.
[0007] A communication control method of an example of the present disclosure is performed by an electronic control unit including a microcomputer and a CAN transceiver. The microcomputer includes a first CAN module and a second CAN module connected to a same bus for CAN communication. The first CAN module is a CAN module configured with a transmit-receive mode in which both transmission and reception are enabled. The second CAN module is one or more CAN modules configured with a receive-only mode. The first CAN module and the second CAN module are connected to the bus via the CAN transceiver.
[0008] The communication control method is characterized in that when an abnormality occurs in the bus, the abnormality of the bus is determined based on information acquired by the first CAN module, and thereafter a CAN initialization process for initializing both the first CAN module and the second CAN module is performed.
[0009] According to the above communication control method, when a bus abnormality occurs, the first CAN module with the transmit-receive mode detects the bus abnormality. The bus abnormality can thus be determined. In the subsequent CAN initialization process, the initializations of all CAN modules are synchronized. This makes it possible to control multiple CAN modules as a "single combined CAN module."
[0010] It may be preferable to configure the foregoing communication control processes such that when the initialization process of both the first CAN module and the second CAN module connected to the same bus is completed normally in the CAN initialization process, CAN communication starts. In CAN communication, after a reception process of the first CAN module and a reception process of the second CAN module are performed in no particular order, a transmission process of the first CAN module is performed.
[0011] By attempting to detect abnormalities from all CAN modules before performing the transmission and reception procedures, it becomes possible to control multiple CAN modules as “a single combined CAN module”.
[0012] It may be preferable to configure the preceding communication control method such that in the CAN initialization method, after preferably the initialization method of the first CAN module has been performed, the initialization method of the second CAN module is performed.
[0013] The second CAN module operating in receive-only mode, which is the slave, is prohibited from operating until the first CAN module operating in transmit-receive mode, which is the master, is operating normally. This prevents an anomaly when "controlling as a single combined CAN module."
[0014] The foregoing and other objects, features, and advantages of the present disclosure will become more apparent from the following detailed description made with reference to the accompanying drawings, in which: Fig. 1 is a system diagram schematically illustrating an electronic control unit according to an embodiment; Fig. 2 is a diagram schematically illustrating a configuration of an electric power steering apparatus to which an electronic control unit according to an embodiment is applied; Fig. 3 is a high-level flowchart illustrating communication control processing according to an embodiment; Fig. 4 a secondary flowchart showing a CAN initialization procedure in Fig. 3 according to a first embodiment; Fig. 5 is a subordinate flowchart showing a CAN initialization procedure in Fig. 3 according to a second embodiment; Fig. 6 is a subordinate flowchart showing a CAN module initialization procedure in Fig. 4 and Fig. 5 represents; Fig. 7 is a subordinate flowchart showing a receiving procedure of a CAN module in Fig. 3; and Fig. 8 is a subordinate flowchart showing a transmission procedure of a CAN module in Fig. 3 represents. (Examples of implementation)
[0015] An embodiment of an electronic control unit for performing a communication control method is described based on the drawings.
[0016] The electronic control unit (hereinafter referred to as ECU) is mounted on a vehicle to control an electric power steering device that assists steering torque. A design configuration of an electric power steering device is first based on Fig. 2 explained.
[0017] The electric power steering device 1 is provided on a steering shaft 92 in a steering system 90 and includes a torque sensor 94 for detecting steering torque. A pinion gear 96 is provided at a tip of the steering shaft 92 and engages a rack shaft 97. A pair of tire wheels 98 are connected to both ends of the rack shaft 97 through tie rods or the like.
[0018] When an operator operates a steering wheel 91, the steering shaft 92 connected to the steering wheel 91 rotates, and the pinion gear 96 converts the rotational movement of the steering shaft 92 into a linear movement of the rack shaft 97. The pair of tire wheels 98 are steered according to an angle corresponding to a displacement of the linear movement of the rack shaft 97.
[0019] The electric power steering device 1 includes a motor 80 for generating steering assist torque, a reduction gear 89 for reducing the rotational speed of the motor 80 and transmitting it to the steering shaft 92, and a motor driver 2. The motor 80 is a three-phase brushless motor and rotates the reduction gear 89 in normal and reverse directions. The motor driver 2 includes an ECU 10 as a control unit, a rotation angle sensor 85 for detecting the rotation angle of the motor 80, the aforementioned torque sensor 94, a vehicle speed sensor 95 for detecting the vehicle speed, and the like. Due to this configuration, the electric power steering device 1 generates the steering assist torque for assisting steering of the steering wheel 91 and transmits it to the steering shaft 92.
[0020] Next, with reference to Fig. 1, which schematically illustrates the system, describes a configuration of the ECU.
[0021] The ECU 10, along with other ECUs for controlling in-vehicle devices, is connected to the bus 18 for CAN communication. The ECU 10 performs CAN protocol-based data communication with other ECUs through the bus 18, thereby exchanging data used for control. The bus 18 includes two-wire system communication lines, which are a CAN-H line and a CAN-L line used for a CAN protocol.
[0022] The ECU 10 has a microcomputer 11 and a CAN transceiver 17.
[0023] The microcomputer 11 has built-in components including a CPU (central processing unit) for executing programs, a RAM 13 for storing a calculation result of the CPU 12 or the like, a ROM 14 for storing programs executed by the CPU 12, a CAN module A 15 and a CAN module B 16 as controllers for CAN communication, and the like. The RAM 13 and the ROM 14 are mutually communicatively connected to the CPU 12. The CAN module A 15 and the CAN module B 16 are mutually communicatively connected to the CPU 12.
[0024] CAN module A15 is configured with a transmit-receive mode, enabling both transmission and reception during CAN communication. After receiving data, CAN module A15 sends an ACK as an acknowledgement response. CAN module B16 is configured with a receive-only mode, in which CAN module B16 does not send an ACK after receiving data. This configuration is similar to the configuration described in Patent Document 1 and prevents the following situation: due to the establishment of a pair of a transmitter and a receiver, two CAN modules respond to each other with an ACK.
[0025] CAN module A 15 is the only "superordinate CAN module" in microcomputer 11. CAN module B 16 is subordinate. In an example of Fig. 1, a single CAN module B 16 is provided in the microcomputer 11. However, two or more CAN modules B 16 may be provided in the microcomputer 11.
[0026] In the following description, if the CAN module A 15 and the CAN module B 16 are not distinguished from each other, both the CAN module A 15 and the CAN module B 16 are referred to as “CAN module 15, 16”.
[0027] The CAN module 15, 16 has a Tx port for transmission and an Rx port for reception. The Tx port for transmission and the Rx port for reception are connected to the CAN transceiver 17. The CAN transceiver 17 is connected to the bus 18 and outputs a signal to and inputs a signal from the bus 18. In this way, the CAN modules 15 and 16 are connected to the same bus 18 via the CAN transceiver 17.
[0028] Each CAN module 15, 16 has a mailbox containing 32 buffers for one message frame transmission and one message frame reception. The number of buffers limits the number of messages a single CAN module can transmit and receive. The above configuration thus combines the two CAN modules 15, 16 while preventing ACK transmission and reception within the microcomputer 11, thereby increasing the number of receivable messages to 64. If two or more second modules 16 are provided, the number of receivable messages increases further.
[0029] It is conceivable that an abnormality may occur in the bus 18 for CAN communication. The abnormality may be, for example, a communication failure, a line break, or the like. The communication failure may result from an excessive amount of data or a mismatch of a configured speed between a transmitter and a receiver. Patent Document 1, which is the related art, does not address any processing in the case of this type of bus abnormality. Therefore, the communication control method of the present embodiment includes creative processing performed by the ECU 10 in the case of the bus abnormality.
[0030] A communication control processing performed by the ECU 10 is described next with reference to Fig. 3 to Fig. 8 described. Fig. Figure 3 is a high-level flowchart showing the communication control processing as a whole. Fig. 4 to Fig. 8 are subordinate flowcharts that show a step in Fig. 3 each in more detail.
[0031] From the steps Fig. 4 and Fig. 5 shows two embodiments of a step of a CAN initialization method. A receiving method and a transmission method of the CAN module are shown in Fig. 7 or Fig. 8. Details of a step of an “initialization procedure” of a CAN module in the CAN initialization procedure of Fig. 4 and Fig. 5 are in Fig. 6 described.
[0032] In the following explanation of the flow chart, the reference “S” represents a “step”. The reference “A” at the end of a step number additionally represents that this step refers to CAN module A 15, and a reference “B” at the end of a step number represents that this step refers to CAN module B 16. In Fig. 4 and Fig. 5, the same step numbers are used to refer to essentially the same steps.
[0033] A higher-level communication control processing routine that is Fig. 3 is performed periodically at predetermined intervals to periodically perform a CAN transmission-reception process.
[0034] Here, assume a situation where an abnormality occurs on bus 18. At the time of an abnormality occurrence, since CAN module B 16 in receive-only mode cannot detect the bus abnormality, CAN module A 15 in transmit-receive mode detects the bus abnormality at S01. If the bus abnormality is detected (S01: YES), processing proceeds to the CAN initialization process of S10. At S10, the initialization process of both CAN module A 15 and CAN module B 16 is performed.
[0035] If the initialization process of all CAN modules 15 and 16 has been completed normally, or if no bus abnormality is detected (S01: NO), CAN communication starts. During CAN communication, a reception process of CAN module A 15 (S30A) and a reception process of CAN module B 16 are performed in no particular order, followed by a transmission process of CAN module A 15 (S40A).
[0036] It should be noted that if a reception message or a transmission message is absent for each CAN module 15, 16, then neither in the reception process S30A nor the transmission process S30B can be performed an essential process as described later.
[0037] Two embodiments regarding the CAN initialization process step (S10) are described next with reference to Fig. 4 and Fig. 5 described.
[0038] In a first embodiment, which is shown in Fig. 4, the initialization process of the higher-level CAN module A 15 is preferably performed (S20A), and then it is determined whether the CAN module A 15 is normal or not (S11). If the CAN module A 15 is abnormal (S11: NO), both the CAN module A 15 and the CAN module B 16 are stopped (S14) without performing the initialization process of the CAN module B 16.
[0039] If CAN module A15 is normal (S11: YES), the initialization procedure of CAN module B16 is performed (S20B), and then it is determined whether CAN module B16 is normal or not (S12). If CAN module B16 is abnormal (S12: NO), both CAN module A15 and CAN module B16 are stopped (S14). If CAN module B16 is normal (S12: YES), the initialization procedure ends with a "normal completion."
[0040] In a second embodiment, which is shown in Fig. As shown in Figure 5, the initialization process of CAN module A 15 and the initialization process of CAN module B 16 are performed at S20A and S20B without prioritizing, and then it is determined whether both CAN module A 15 and CAN module B 16 are normal or not (S13). If either of CAN module A 15 and CAN module B 16 is abnormal, both CAN module A 15 and CAN module B 16 are stopped (S14). Only when all CAN modules 15 and 16 are normal does the initialization process end with "a normal completion."
[0041] Fig. 6 illustrates the subordinate flow of the initialization process step of each CAN module 15, 16 (S20A, S20B) in the CAN initialization process of the first and second embodiments.
[0042] In the CAN module initialization process, the CAN module 15, 16 is placed in a configuration mode (S21) where various configurations of the CAN module 15, 16 are changeable. At S22, it is checked whether a fixation occurs in a register of the CAN module 15, 16. A process of configuring reception and transmission of each mailbox (S23) and a process of configuring a communication baud rate (S24) are subsequently performed, and thereafter, the CAN module 15, 16 is placed in a normal mode (S25) where communication is controllable.
[0043] Fig. 7 and Fig. 8 represent a subordinate flow of the receiving process step (S30A, S30B) of each CAN module 15, 16 and the transmitting process step (S40A) of the CAN module A 15.
[0044] The reception procedure used in Fig. As shown in Figure 7, at S31, it is checked whether an incoming message is present or absent in each mailbox. If the incoming message is present (S31: YES), message data is retrieved from the mailbox (S32), and then the mailbox is placed in a "no-incoming message" state. If the incoming message is absent (S31: NO), processing is terminated.
[0045] The transfer process, which is Fig. As shown in Figure 8, at S41, it is checked whether an outgoing message is present or absent in each mailbox. If the outgoing message is present (S41: YES), message data of the mailbox is transmitted (S42), and then the mailbox is placed in a "no-outgoing message" state (S43). If the outgoing message is absent (S41: NO), processing is terminated.
[0046] Technical effects of the preceding embodiments are described. (1) First technical effect
[0047] The microcomputer 11 includes CAN module A 15 with the transmit / receive mode and CAN module B 16 with the receive-only mode, which are connected to the same bus. While ACK transmissions and receptions are prevented within the microcomputer 11, it is therefore possible to combine two CAN modules 15, 16. This increases the number of messages that can be received by the ECU 10.
[0048] The electric power steering device 1 to which the foregoing ECU 10 is applied may be characterized, for example, in that an amount of information (data) received from the rotation angle sensor 85, the torque sensor 94, the vehicle speed sensor 95, etc., is larger than a transmitted amount of information. Furthermore, when new technology such as an automatic steering assist system and an automatic parking assist system is adopted, the information received by the ECU 10 of the electric power steering device 1 further increases, for example, due to reception of image information or the like from a camera imaging a periphery of a vehicle. Therefore, an advantage of increasing the receivable amount of information becomes particularly significant. (2) Second technical effect
[0049] In the preceding embodiments, at the time a bus abnormality occurs, the CAN module A 15 with the transmission-reception mode detects the bus abnormality, thereby allowing the bus abnormality to be determined. In addition, in the subsequent CAN initialization process, the initialization process of all CAN modules 15, 16 is synchronized, allowing multiple CAN modules 15, 16 to be controlled as a "single combined CAN module." (3) Third technical effect
[0050] When the initialization process of all CAN modules A 15 and B 16 connected to the same bus is completed normally, CAN communication starts. By attempting to detect abnormalities of all CAN modules 15, 16 before the transmission-reception process, it becomes possible to control multiple CAN modules 15, 16 as a "single combined CAN module." (4) Fourth technical effect
[0051] If the CAN initialization procedure is the first embodiment of Fig. 4, the initialization process of CAN module A 15 is preferably performed, followed by the initialization process of CAN module B 16. In this case, the slave CAN module B 16 is prohibited from operating in receive-only mode until the master CAN module A 15 is operating normally in transmit-receive mode. This prevents an abnormality when "controlling as a single combined CAN module." (Other embodiments)
[0052] Two or more CAN modules B 16 may be provided. In such a case, any order of execution of the reception procedures in Fig. 3, which have the reception procedure of the CAN module A 15. At S20B “the initialization procedure of the CAN module B” in Fig. 4 and Fig. 5 additionally “the initialization procedure of all CAN modules B 16” is carried out.
[0053] An electronic control unit for implementing the communication control method of the present disclosure is not limited to the ECU for the electric power steering device, but is applicable to any electronic control unit. For example, the communication control method of the present disclosure may be particularly effective for an ECU that receives a large amount of information, such as a meter ECU, a brake ECU, or the like.
Claims
[1] A communication control method that can be carried out by an electronic control unit comprising a microcomputer (11) and a CAN transceiver (17), wherein the microcomputer (11) comprises a first CAN module (15) and a second CAN module (16) connected to a same bus (18) for CAN communication, the first CAN module (15) being only a CAN module configured with a transmission-reception mode in which transmission and reception are enabled, the second CAN module (16) being one or more CAN modules configured with a reception-only mode, and the first CAN module (15) and the second CAN module (16) being connected to the bus (18) via the CAN transceiver (17), the communication control method comprising the following steps: when an abnormality occurs in the bus (18), determining (S01) the abnormality of the bus (18) based on information acquired by the first CAN module (15), and thereafter performing a CAN initialization process (S10) for initializing both the first CAN module (15) and the second CAN module (16). [2] The communication control method according to claim 1, wherein, when an initialization process (S20A, S20B) of both the first CAN module (15) and the second CAN module (16) connected to the same bus (18) is normally completed in the CAN initialization process (S10), the CAN communication starts. [3] Communication control method according to claim 2, wherein in the CAN initialization process (S10), after preferably the initialization process (S20A) of the first CAN module (15) has been carried out, the initialization process (S20B) of the second CAN module (16) is carried out.
Citation Information
Patent Citations
Electronic control device
JP2011131713A
JP002011131713A