WO2023182020A1 - In-vehicle device, program, and information processing method - Google Patents

In-vehicle device, program, and information processing method Download PDF

Info

Publication number
WO2023182020A1
WO2023182020A1 PCT/JP2023/009483 JP2023009483W WO2023182020A1 WO 2023182020 A1 WO2023182020 A1 WO 2023182020A1 JP 2023009483 W JP2023009483 W JP 2023009483W WO 2023182020 A1 WO2023182020 A1 WO 2023182020A1
Authority
WO
WIPO (PCT)
Prior art keywords
vehicle
communication
interrupt
lin
control unit
Prior art date
Application number
PCT/JP2023/009483
Other languages
French (fr)
Japanese (ja)
Inventor
将史 大場
和弘 平野
正 成瀬
祐児 川井
駿 内田
敏弥 山田
Original Assignee
住友電装株式会社
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 住友電装株式会社 filed Critical 住友電装株式会社
Publication of WO2023182020A1 publication Critical patent/WO2023182020A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/023Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors

Definitions

  • the present disclosure relates to an in-vehicle device, a program, and an information processing method.
  • This application claims priority based on Japanese Application No. 2022-050510 filed on March 25, 2022, and incorporates all the contents described in the said Japanese application.
  • the wiper drive device of Patent Document 1 includes a vehicle-mounted ECU (body ECU) and is driven by a control program applied to the vehicle-mounted ECU.
  • An in-vehicle device is an in-vehicle device that is installed in a vehicle and is communicably connected to an in-vehicle ECU using a LIN communication protocol, and includes a control unit that performs control regarding communication with the in-vehicle ECU.
  • the control unit detects an interrupt process that occurs after data is transmitted to the in-vehicle ECU, and determines whether communication with the in-vehicle ECU is being performed normally based on the detection result.
  • FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system including an in-vehicle device and the like according to a first embodiment
  • FIG. 2 is a block diagram illustrating the internal configuration of an on-vehicle device.
  • FIG. 3 is an explanatory diagram regarding detection of interrupt processing by the control unit of the in-vehicle device. 3 is a flowchart illustrating processing of a control unit of an in-vehicle device.
  • Patent Document 1 has a problem in that it does not take into account the determination of whether processing related to communication with other devices is being performed normally.
  • An object of the present disclosure is to provide an in-vehicle device or the like that can determine whether processing related to communication with other devices is being performed normally.
  • An in-vehicle device is an in-vehicle device that is installed in a vehicle, is communicably connected to an in-vehicle ECU using a LIN communication protocol, and controls communication with the in-vehicle ECU.
  • the control unit detects an interrupt process that occurs after data is transmitted to the in-vehicle ECU, and determines whether communication with the in-vehicle ECU is being performed normally based on the detection result. judge.
  • the in-vehicle device when an in-vehicle device and multiple in-vehicle ECUs communicate using the LIN (Local Interconnect Network) communication protocol, the in-vehicle device functions as a LIN master ECU, and each in-vehicle ECU functions as a LIN slave ECU. Function.
  • the control unit of the vehicle-mounted device When a process of transmitting data (LIN frame) from the vehicle-mounted device to the LIN bus via a communication unit such as a LIN transceiver is performed, the control unit of the vehicle-mounted device attempts to detect an interrupt process that occurs after the transmission.
  • the interrupt processing is defined in the specifications of communication processing using the LIN so that it occurs after the data is transmitted when the data is transmitted using the LIN.
  • the control unit of the in-vehicle device determines whether communication between the in-vehicle device and the in-vehicle ECU is being performed normally based on the detection result of the interrupt process, that is, whether or not an interrupt process is detected. It is possible to efficiently determine whether processing related to communication with other devices is being performed normally. In this way, the control unit of the in-vehicle device performs communication processing related to sending and receiving data with the in-vehicle ECU using LIN, and monitors the presence or absence of interrupt processing in parallel with the communication processing, thereby improving the reliability of LIN communication. It is possible to guarantee gender.
  • the interrupt processing includes a transmission completion interrupt and an error interrupt, and when the control unit detects the transmission completion interrupt, the control unit communicates with the in-vehicle ECU. is determined to be normal, and if neither the transmission completion interrupt nor the error interrupt is detected, the communication with the in-vehicle ECU is determined to be abnormal, and the initialization processing of the control unit is performed. conduct.
  • the interrupt processing that may occur in response to the transmission of data (LIN frame) from the in-vehicle device that is the LIN master includes a transmission completion interrupt and an error interrupt.
  • a transmission completion interrupt is an interrupt process that occurs when data (LIN frame) is successfully transmitted.
  • An error interrupt is an interrupt process that occurs when transmitted data is received by, for example, loopback processing, and a difference occurs between the received data and the transmitted data. Such data differences occur, for example, due to a failure in a communication unit such as a LIN transceiver, or a failure such as a short circuit (ground fault) in a communication line such as a LIN bus.
  • an error interrupt occurs when a bit error (bit inversion) in data (LIN frame) or a physical bus error occurs due to an event that occurs in the physical layer that is lower than the communication unit such as a LIN transceiver. becomes.
  • the control unit operates to generate an interrupt process such as a transmission completion interrupt or an error interrupt each time data is transmitted.
  • the control unit also periodically, regularly, or constantly monitors the occurrence of the interrupt process, and if it detects a transmission completion interrupt, it indicates that the communication with the in-vehicle ECU is normal (communication has completed normally). ).
  • the control unit does not detect either a transmission completion interrupt or an error interrupt, an abnormality occurs in the execution state of the LIN communication control program (data cannot be sent due to a stuck state), and communication with the in-vehicle ECU is disabled. It is determined that there is an abnormality (the in-vehicle device is abnormal). In other words, if the process that executes the LIN communication control program is in a hung state, for example, and data transmission is impossible due to state fixation in software processing, both the transmission completion interrupt and error interrupt processing will not be detected. What is not done becomes.
  • control unit determines that a communication abnormality has occurred due to an abnormality in the process that executes the communication control program, and performs recovery processing for the communication abnormality in order to initialize its own unit (control unit).
  • the initialization process of the control unit includes, for example, restarting the LIN communication control program, resetting (restarting) the control unit itself, or resetting (restarting) the in-vehicle device itself, that is, software reset ( Initialization), hardware reset (initialization), or both software and hardware reset (initialization) may be performed.
  • data is transmitted to the in-vehicle ECU at a predetermined transmission cycle, and the control unit transmits data to the in-vehicle ECU at a predetermined period based on the transmission cycle. If neither the transmission completion interrupt nor the error interrupt is detected, it is determined that the communication with the in-vehicle ECU is abnormal.
  • an in-vehicle device that is a LIN master transmits data (LIN frames) to a plurality of in-vehicle ECUs that are LIN slaves at a predetermined transmission cycle based on a predetermined LIN schedule.
  • the LIN schedule is stored in the storage unit of the in-vehicle device, and defines (includes) the data ID to be transmitted, the order of transmission, and the time interval (transmission cycle) of transmission.
  • the control unit of the in-vehicle device refers to the LIN schedule stored in the storage unit, and generates either a transmission completion interrupt or an error interrupt in a predetermined period according to the transmission cycle defined in the LIN schedule. Determine whether processing is detected.
  • the predetermined period corresponds to the detection unit period when detecting interrupt processing, and for example, it corresponds to the time required to send data once to each in-vehicle ECU that is a LIN slave.
  • the detection unit period may be one scheduler time.
  • the control unit of the in-vehicle device uses a scheduler that multiplies the transmission period (T) by the number (n) of in-vehicle ECUs (LIN slaves), using the detection point of the transmission completion interrupt or error interrupt detected immediately before as a reference (starting point). If no interrupt processing, either a transmission completion interrupt or an error interrupt, is detected until time (T ⁇ n) has elapsed, it may be determined that the communication with the in-vehicle ECU is abnormal.
  • a predetermined period (one scheduler time) according to the transmission cycle from the in-vehicle device (LIN master) to the in-vehicle ECU (LIN slave) based on the LIN schedule is set as the period for making the determination (detection unit period).
  • the in-vehicle device communicates with the in-vehicle ECU via a LIN bus, and includes a communication unit to which the LIN bus is connected, and the control unit is configured to handle the error interrupt. If detected, it is determined that the communication with the vehicle-mounted ECU is abnormal, and initialization processing of the communication unit is performed.
  • the control unit of the in-vehicle device detects an error interrupt, it determines that communication with the in-vehicle ECU is abnormal (communication has ended abnormally) due to a failure of a communication unit such as a LIN transceiver, Performs initialization processing of the communication unit (LIN transceiver).
  • the initialization process for the communication unit may include, for example, performing a hardware reset (initialization) by cutting off and restarting power to the communication unit. Thereby, the communication unit can be brought into a normal state, and communication with the vehicle-mounted ECU can be restored to a normal state.
  • control unit of the in-vehicle device If the control unit of the in-vehicle device continues to detect error interrupts even though the initialization process of the communication unit has been performed a predetermined number of times or more, the control unit of the in-vehicle device detects a short circuit (ground) in the communication line such as the LIN bus. It may be determined that a failure (physical bus error) such as a physical bus error has occurred, and the determination result may be stored in a storage unit and output to an HMI (Human Machine Interface) device such as a display.
  • HMI Human Machine Interface
  • An information processing method includes a computer that is installed in a vehicle, is communicably connected to an in-vehicle ECU using a LIN communication protocol, and controls communication with the in-vehicle ECU.
  • An interrupt process that occurs after data is transmitted to an on-vehicle ECU is detected, and based on the detection result, a process is executed to determine whether communication with the on-vehicle ECU is being performed normally.
  • a program according to an aspect of the present disclosure is installed in a vehicle, is communicably connected to an in-vehicle ECU using a LIN communication protocol, and is transmitted to a computer that controls communication with the in-vehicle ECU.
  • An interrupt process that occurs after data is transmitted to the ECU is detected, and based on the detection result, a process is executed to determine whether communication with the in-vehicle ECU is being performed normally.
  • FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system S including an in-vehicle device 1 and the like according to the first embodiment.
  • FIG. 2 is a block diagram illustrating the internal configuration of the in-vehicle device 1.
  • the in-vehicle system S is composed of an in-vehicle device 1 mounted on a vehicle C and a plurality of in-vehicle ECUs 2, and these in-vehicle devices 1 and each of the plurality of in-vehicle ECUs 2 (Electronic Control Units) are connected to a communication line 4 (LIN bus). communicably connected.
  • LIN bus LIN bus
  • the in-vehicle device 1 and the in-vehicle ECU 2 are configured to transmit and receive data (LIN frames) using a LIN (Local Interconnect Network) communication protocol, and the in-vehicle device 1 functions as a LIN master, and the in-vehicle ECU 2 functions as a LIN slave. functions as
  • An on-vehicle load 3 such as a lamp, a door mirror, or a wiper is communicably connected to each on-vehicle ECU 2 that is a LIN slave.
  • These in-vehicle ECUs 2 receive data (LIN frames) transmitted from the in-vehicle device 1, which is a LIN master, and respond to the in-vehicle load 3 directly connected to their own ECU (in-vehicle ECU 2 itself) according to the received data. (actuator) drive control.
  • the in-vehicle device 1 is configured to detect a transmission completion interrupt or an error interrupt each time after transmitting data to the in-vehicle ECU 2. Although the details will be described later, if the in-vehicle device 1 does not detect any interrupt processing, such as a transmission completion interrupt or an error interrupt, after transmitting data to the in-vehicle ECU 2 until a predetermined period has elapsed, the state will be fixed in the software processing. It is determined that a communication abnormality has occurred due to, etc., and the software and hardware related to LIN communication are initialized.
  • the in-vehicle device 1 is an ECU (LIN master ECU) that functions as a LIN master, and includes a control section 11, a storage section 12, and a communication section 13.
  • the in-vehicle device 1 may function, for example, as a body ECU that performs overall control of body-related actuators.
  • the in-vehicle device 1 may be configured with a central control device such as a vehicle computer, and may function as an integrated ECU that performs integrated control of the entire vehicle C.
  • the control unit 11 is composed of a CPU (Central Processing Unit), an MPU (Micro Processing Unit), etc., and performs various controls by reading and executing programs (program products) and data stored in advance in the storage unit 12. Performs processing, arithmetic processing, etc.
  • the control unit 11 may be configured by being packaged with a microcomputer or the like together with the storage unit 12 and the like.
  • the control unit 11 is not limited to a software processing unit such as a CPU that performs software processing, but may also be a hardware processing unit such as an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or an SOC (System on Chip). It may include a hardware processing unit that performs various control processing, calculation processing, and the like.
  • the storage unit 12 is composed of a volatile memory element such as a RAM (Random Access Memory), or a nonvolatile memory element such as a ROM (Read Only Memory), an EEPROM (Electrically Erasable Programmable ROM), or a flash memory.
  • a program P (program product) or data of the in-vehicle device 1 is stored.
  • the program P (program product) stored in the storage unit 12 may be a program P (program product) read from a recording medium M readable by the in-vehicle device 1.
  • the program P (program product) may be downloaded from an external computer (not shown) connected to a communication network (not shown) and stored in the storage unit 12.
  • the storage unit 12 stores a LIN schedule or a configuration file that includes various parameters used when performing LIN communication, such as data ID to be transmitted, transmission order, and transmission time interval (transmission cycle).
  • the communication unit 13 is composed of a LIN transceiver, which is an input/output interface using a communication protocol such as LIN.
  • a communication line 4 (LIN bus) having a bus configuration is connected to the communication unit 13 (LIN transceiver), and LIN communication is performed between the in-vehicle device 1 and the in-vehicle ECU 2 via the communication line 4.
  • Each of the in-vehicle ECUs 2 functioning as LIN slaves also includes a control section 11, a storage section 12, and a communication section 13 (LIN transceiver) similarly to the in-vehicle device 1.
  • a vehicle load 3 (actuator) such as a wiper is directly connected to each of these vehicle ECUs 2 via a serial cable or the like.
  • the on-vehicle ECU 2 Based on the data received from the on-vehicle device 1 through LIN communication, the on-vehicle ECU 2 connects the on-vehicle load 3 directly connected to its own ECU (on-vehicle ECU 2 itself). (actuator).
  • FIG. 3 is an explanatory diagram regarding detection of interrupt processing by the control unit 11 of the in-vehicle device 1.
  • This explanatory diagram shows the states of the communication line 4 and the vehicle-mounted device 1 during the elapsed time indicated by the horizontal axis.
  • transmission completion interrupts, error interrupts, and time monitoring monitoring processing that involves time measurement
  • time monitoring monitoring processing that involves time measurement
  • Interrupt processing that occurs after transmitting data includes transmission completion interrupts and error interrupts, and is defined in the specifications of communication processing by LIN to occur after transmitting data when transmitting data by LIN. ing.
  • the control unit 11 (the process that executes the LIN communication control program) of the in-vehicle device 1 receives the transmitted data through loopback processing, etc., and if a difference occurs between the received data and the transmitted data. generates an error interrupt, and if no difference occurs, generates a transmission completion interrupt. That is, if no difference occurs, it is determined that the LIN communication is normal, and if a difference occurs, the LIN communication is determined to be abnormal (a communication error has occurred).
  • the vehicle-mounted device 1 detects a transmission completion interrupt (indicated by a solid line) each time after transmitting data to the vehicle-mounted ECU 2.
  • the in-vehicle device 1 performs a process of re-measuring the time (predetermined period) for determining an abnormality (re-measuring the time due to the occurrence of the transmission completion interrupt) using the detected transmission completion interrupt as a starting point. That is, upon detection of the transmission completion interrupt, the elapsed time for time monitoring is set to 0 (cleared to 0).
  • the in-vehicle device 1 detects an error interrupt when the communication line 4 becomes temporarily abnormal, such as when noise or the like occurs on the communication line 4. In this case, the transmission completion interrupt that would normally be detected is not detected (does not occur). In this explanatory diagram, the transmission completion interrupt that was not detected (did not occur) is indicated by a broken line.
  • the in-vehicle device 1 performs a process of re-measuring the time (predetermined period) for determining an abnormality (re-measuring the time due to the occurrence of an error) using the time of detection of the detected error interrupt as a starting point. That is, upon detection of an error interrupt, the elapsed time for time monitoring is set to 0 (cleared to 0).
  • the in-vehicle device 1 sets a predetermined period (one scheduler time) according to the transmission cycle to the in-vehicle ECU 2 as a period (detection unit period) for making a determination, and issues a transmission completion interrupt and an error interrupt in the one scheduler time. If not detected, it is determined that transmission failure (abnormality) due to state fixation or the like has occurred.
  • the in-vehicle device 1 executes a recovery process (reset) in order to resolve the inability to transmit (abnormality) due to a stuck state or the like.
  • the recovery process (reset) includes a process of initializing software and hardware related to LIN communication.
  • the in-vehicle device 1 is restarted by executing the recovery process, and recovers (transitions) from an abnormal state to a normal state.
  • FIG. 4 is a flowchart illustrating the processing of the control unit 11 of the in-vehicle device 1.
  • the control unit 11 of the in-vehicle device 1 monitors interrupt processing by performing the following processing, for example, when the vehicle C is activated or stopped.
  • the control unit 11 of the in-vehicle device 1 regularly performs communication processing regarding transmission and reception of data (LIN frames) with the in-vehicle ECU 2 using the LIN communication protocol. Then, the control unit 11 of the in-vehicle device 1 performs processing such as monitoring of interrupt processing that occurs due to communication processing of the LIN.
  • LIN frames transmission and reception of data
  • the control unit 11 of the in-vehicle device 1 performs processing such as monitoring of interrupt processing that occurs due to communication processing of the LIN.
  • the control unit 11 of the in-vehicle device 1 determines whether a transmission completion interrupt has been detected (S101). In determining whether or not a transmission completion interrupt has been detected, the control unit 11 of the in-vehicle device 1 determines whether or not an interrupt signal indicating a transmission completion interrupt has been transmitted from the process that executes the LIN communication control program. It may also be something that makes a determination. That is, in the control unit 11 of the in-vehicle device 1, a process that executes the LIN communication control program and a process that executes the monitoring process are generated, and the process that executes the monitoring process executes the LIN communication control program.
  • transmission completion interrupt signal When a signal (transmission completion interrupt signal) sent by the executing process is received, it may be determined that a transmission completion interrupt has been detected.
  • the control unit 11 of the in-vehicle device 1 when transmitting data (LIN frame), the control unit 11 of the in-vehicle device 1 performs post-processing to attempt to obtain data or a signal regarding whether or not a transmission completion interrupt has occurred, and based on the result of the post-processing, , it may be determined whether or not a transmission completion interrupt has been detected.
  • the control unit 11 of the in-vehicle device 1 determines that communication with the in-vehicle ECU 2 has been successfully completed (S102).
  • the transmission completion interrupt is an interrupt process that occurs when data is normally transmitted from the in-vehicle device 1.
  • the control unit 11 of the in-vehicle device 1 determines that the LIN communication with the in-vehicle ECU 2 has been successfully completed.
  • the control unit 11 of the in-vehicle device 1 stores time information such as a timestamp or time indicating the time when the transmission completion interrupt was detected (the transmission completion interrupt detection time) in the storage unit 12.
  • the transmission completion interrupt detection time information (transmission completion interrupt detection time) stored in the storage unit 12 is used as the starting point for the transmission cycle when transmitting the next data (LIN frame), and is used as the starting point for the transmission cycle when transmitting the next data (LIN frame).
  • the control unit 11 performs a process of re-measuring time such as a transmission cycle upon detection (occurrence) of a transmission completion interrupt.
  • the control unit 11 of the vehicle-mounted device 1 determines whether or not an error interrupt has been detected (S103).
  • the error interrupt is an interrupt process that occurs when data is not transmitted normally from the in-vehicle device 1, and the transmitted data is received by loopback processing, etc., and the received data and the transmitted data are This is an interrupt process that occurs when a difference occurs between the two.
  • control unit 11 of the vehicle-mounted device 1 determines that an error interrupt has been detected, it determines that the LIN communication with the vehicle-mounted ECU 2 is abnormal (a communication error has occurred).
  • the control unit 11 of the in-vehicle device 1 makes the determination based on whether or not an interrupt signal indicating an error interrupt has been transmitted from the process that executes the LIN communication control program. It may be something you do. That is, in the control unit 11 of the in-vehicle device 1, a process that executes the LIN communication control program and a process that executes the monitoring process are generated, and the process that executes the monitoring process executes the LIN communication control program.
  • a signal (error interrupt signal) sent by the executing process it may be determined that an error interrupt has been detected.
  • the control unit 11 of the in-vehicle device 1 performs post-processing to attempt to obtain data or signals regarding the occurrence of an error interrupt, and based on the result of the post-processing, It may be determined whether or not an error interrupt has been detected.
  • the control unit 11 of the in-vehicle device 1 determines that communication with the in-vehicle ECU 2 has ended abnormally (S104).
  • a failure such as noise generation or a short circuit (ground fault) has occurred in the communication line 4 (fault) or the communication unit 13 (LIN transceiver).
  • the communication with the in-vehicle ECU 2 is abnormal.
  • the control unit 11 of the vehicle-mounted device 1 stores time information such as a timestamp or time indicating the time when the error interrupt was detected (the time of error interrupt detection) in the storage unit 12.
  • the error interrupt detection time information (error interrupt detection time) stored in the storage unit 12 is used as a starting point for the transmission cycle when transmitting the next data (LIN frame), and is used by the control unit of the in-vehicle device 1. 11 performs a process of re-measuring time such as a transmission cycle upon detection (occurrence) of an error interrupt.
  • the control unit 11 of the in-vehicle device 1 initializes the communication unit 13 (S105).
  • the control unit 11 of the in-vehicle device 1 detects an error interrupt, it initializes the communication unit 13 (LIN transceiver).
  • the initialization process of the communication unit 13 (LIN transceiver) may include, for example, performing a hardware reset (initialization) by cutting off and restarting power to the communication unit 13. By resetting the communication unit 13 in this manner, the communication unit 13 can be transitioned to a normal state, and communication with the in-vehicle ECU 2 can be restored to a normal state.
  • the control unit 11 of the in-vehicle device 1 may store history information including the date and time when the communication unit 13 was initialized in the storage unit 12. After executing the process in S105, the control unit 11 of the in-vehicle device 1 performs a loop process to execute the process from S101 again.
  • control unit 11 of the in-vehicle device 1 initializes the communication unit 13 each time an error interrupt is detected in step S105, but the invention is not limited to this.
  • the control unit 11 of the in-vehicle device 1 may continue monitoring the interrupt processing without initializing the communication unit 13 even when an error interrupt is detected. Error interrupts can also occur when noise occurs in the communication line 4 or when a temporary failure occurs due to accumulation of electric charge in the communication section 13. It is possible that it will be restored. Therefore, the control unit 11 of the in-vehicle device 1 may initialize the communication unit 13 when error interrupts continue to be detected, such as when error interrupts are detected a plurality of times in succession.
  • the control unit 11 of the in-vehicle device 1 determines whether a predetermined period of time has elapsed (S1031). When determining that no error interrupt has been detected, the control unit 11 of the vehicle-mounted device 1 determines whether a predetermined period of time has elapsed since the most recently detected transmission completion interrupt or error interrupt.
  • the predetermined period may be, for example, one scheduler time determined according to the transmission cycle defined in the LIN schedule. The one scheduler time corresponds to the time (T ⁇ n) obtained by multiplying the number (n) of in-vehicle ECUs 2 that are LIN slaves by the transmission period (T). Alternatively, one scheduler time itself may be defined in the LIN schedule.
  • the control unit 11 of the in-vehicle device 1 performs a loop process to execute the process from S101 again.
  • the control unit 11 of the vehicle-mounted device 1 determines that the vehicle-mounted device 1 is abnormal (S1032). This process is executed when a transmission completion interrupt is not detected in the branch process of S101 (S101: NO), so if it is determined that an error interrupt is not detected within a predetermined period, an error interrupt is executed. In addition, the transmission completion interrupt is also not detected.
  • the control unit 11 of the vehicle-mounted device 1 determines that neither the transmission completion interrupt nor the error interrupt has been detected in the predetermined period corresponding to, for example, one scheduler time.
  • control unit 11 of the in-vehicle device 1 does not detect either a transmission completion interrupt or an error interrupt, an abnormality occurs in the execution state of the LIN communication control program (data cannot be sent due to a stuck state), and the in-vehicle device Device 1 is determined to be abnormal. In other words, the control unit 11 of the in-vehicle device 1 is unable to send data due to a hang state in the process that executes the LIN communication control program, a stuck state in software processing, and a transmission completion interrupt and an error interrupt. It is determined that none of the interrupt processing has occurred.
  • the control unit 11 of the in-vehicle device 1 initializes the control unit 11 (S1033).
  • the control unit 11 of the in-vehicle device 1 initializes the communication unit 13 (S1034).
  • the control unit 11 of the in-vehicle device 1 initializes the control unit 11 by restarting the LIN communication control program, restarting the control unit 11 itself, or restarting the in-vehicle device 1 itself including the communication unit 13, for example. conduct.
  • the control unit 11 of the in-vehicle device 1 may perform each of these resets (restarts) in stages.
  • the control unit 11 of the in-vehicle device 1 may perform software reset (initialization), hardware reset (initialization), or both software and hardware reset (initialization).
  • the control unit 11 of the in-vehicle device 1 may initialize the communication unit 13 after initializing the control unit 11 or simultaneously with the initialization.
  • the initialization of the communication unit 13 in this process (S1034) may be the same process as S105. If the restart of the in-vehicle device 1 itself described as an example of initialization of the control unit 11 includes initialization of both the control unit 11 and the communication unit 13, the processes of S1033 and S1034 are performed at substantially the same timing. It will be held in
  • control unit 11 of the in-vehicle device 1 may store history information including the date and time when the control unit 11 was initialized in the storage unit 12. After executing the process of S1033, the control unit 11 of the vehicle-mounted device 1 performs a loop process to execute the process from S101 again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Provided is an in-vehicle device, which is mounted on a vehicle and is communicably connected to an in-vehicle ECU using a LIN communication protocol, wherein the in-vehicle device comprises a control unit that performs control relating to communications with the in-vehicle ECU, wherein the control unit detects interruption processing that occurs after transmission of data to the in-vehicle ECU, and wherein the control unit determines whether or not communication with the in-vehicle ECU is normal on the basis of the result of detection.

Description

車載装置、プログラム及び情報処理方法In-vehicle device, program and information processing method
 本開示は、車載装置、プログラム及び情報処理方法に関する。
 本出願は、2022年3月25日出願の日本出願第2022-050510号に基づく優先権を主張し、前記日本出願に記載された全ての記載内容を援用するものである。
The present disclosure relates to an in-vehicle device, a program, and an information processing method.
This application claims priority based on Japanese Application No. 2022-050510 filed on March 25, 2022, and incorporates all the contents described in the said Japanese application.
 車両には、例えば、ワイパー駆動装置、車両の内外の灯火装置、ドアロック装置、パワーウインドウ等のボディ系の装置の制御を統括して行う車載ECUであるボディECUが搭載されている(例えば特許文献1)。特許文献1のワイパー駆動装置は、車載ECU(ボデーECU)を含み、車載ECUに適用されている制御プログラムにより駆動される。 Vehicles are equipped with a body ECU, which is an in-vehicle ECU that centrally controls body-related devices such as a wiper drive device, lighting devices inside and outside the vehicle, door lock devices, and power windows. Reference 1). The wiper drive device of Patent Document 1 includes a vehicle-mounted ECU (body ECU) and is driven by a control program applied to the vehicle-mounted ECU.
特開2017-224926号公報JP2017-224926A
 本開示の一態様に係る車載装置は、車両に搭載され、LINの通信プロトコルを用いて車載ECUと通信可能に接続される車載装置であって、前記車載ECUとの通信に関する制御を行う制御部を備え、前記制御部は、前記車載ECUへのデータの送信後に発生する割込み処理を検出し、前記検出結果に基づき、前記車載ECUとの通信が正常に行われているか否かを判定する。 An in-vehicle device according to an aspect of the present disclosure is an in-vehicle device that is installed in a vehicle and is communicably connected to an in-vehicle ECU using a LIN communication protocol, and includes a control unit that performs control regarding communication with the in-vehicle ECU. The control unit detects an interrupt process that occurs after data is transmitted to the in-vehicle ECU, and determines whether communication with the in-vehicle ECU is being performed normally based on the detection result.
実施形態1に係る車載装置等を含む車載システムの構成を例示する模式図である。1 is a schematic diagram illustrating the configuration of an in-vehicle system including an in-vehicle device and the like according to a first embodiment; FIG. 車載装置の内部構成を例示するブロック図である。FIG. 2 is a block diagram illustrating the internal configuration of an on-vehicle device. 車載装置の制御部による割込み処理の検出に関する説明図である。FIG. 3 is an explanatory diagram regarding detection of interrupt processing by the control unit of the in-vehicle device. 車載装置の制御部の処理を例示するフローチャートである。3 is a flowchart illustrating processing of a control unit of an in-vehicle device.
[本開示が解決しようとする課題]
 特許文献1の車載ECUにおいては、他装置との通信に関する処理が正常に行われているかを判定する点に関し考慮されていないという問題点がある。
[Problems that this disclosure seeks to solve]
The in-vehicle ECU of Patent Document 1 has a problem in that it does not take into account the determination of whether processing related to communication with other devices is being performed normally.
 本開示は、他装置との通信に関する処理が正常に行われているかを判定することができる車載装置等を提供することを目的とする。 An object of the present disclosure is to provide an in-vehicle device or the like that can determine whether processing related to communication with other devices is being performed normally.
[本開示の効果]
 本開示の一態様によれば、他装置との通信に関する処理が正常に行われているかを判定する車載装置等を提供することができる。
[Effects of this disclosure]
According to one aspect of the present disclosure, it is possible to provide an in-vehicle device or the like that determines whether processing related to communication with other devices is being performed normally.
[本開示の実施形態の説明]
 最初に本開示の実施態様を列挙して説明する。また、以下に記載する実施形態の少なくとも一部を任意に組み合わせてもよい。
[Description of embodiments of the present disclosure]
First, embodiments of the present disclosure will be listed and described. Furthermore, at least some of the embodiments described below may be combined arbitrarily.
(1)本開示の一態様に係る車載装置は、車両に搭載され、LINの通信プロトコルを用いて車載ECUと通信可能に接続される車載装置であって、前記車載ECUとの通信に関する制御を行う制御部を備え、前記制御部は、前記車載ECUへのデータの送信後に発生する割込み処理を検出し、前記検出結果に基づき、前記車載ECUとの通信が正常に行われているか否かを判定する。 (1) An in-vehicle device according to an aspect of the present disclosure is an in-vehicle device that is installed in a vehicle, is communicably connected to an in-vehicle ECU using a LIN communication protocol, and controls communication with the in-vehicle ECU. The control unit detects an interrupt process that occurs after data is transmitted to the in-vehicle ECU, and determines whether communication with the in-vehicle ECU is being performed normally based on the detection result. judge.
 本態様にあたっては、LIN(Local Interconnect Network)の通信プロトコルを用いて、車載装置と複数の車載ECUとが通信する場合、車載装置はLINマスターECUとして機能し、車載ECUそれぞれは、LINスレーブECUとして機能する。車載装置の制御部は、車載装置からLINトランシーバ等の通信部を介してLINバスにデータ(LINフレーム)を送信する処理が行われた場合、当該送信後に発生する割込み処理の検出を試みる。当該割込み処理は、LINによるデータ送信を行った際、当該データ送信後に発生するようにLINによる通信処理の仕様上、定義されている。車載装置の制御部は、割込み処理の検出結果、すなわち割込み処理を検出したか否かに基づき、車載装置と車載ECUとの通信が正常に行われているか否かを判定するため、車載ECU等の他装置との通信に関する処理が正常に行われているかを効率的に判定することができる。このように車載装置の制御部は、LINを用いた車載ECUとのデータの送受信に関する通信処理を行いつつ、当該通信処理に並行して割込み処理の有無等を監視することにより、LIN通信における信頼性を担保することができる。 In this aspect, when an in-vehicle device and multiple in-vehicle ECUs communicate using the LIN (Local Interconnect Network) communication protocol, the in-vehicle device functions as a LIN master ECU, and each in-vehicle ECU functions as a LIN slave ECU. Function. When a process of transmitting data (LIN frame) from the vehicle-mounted device to the LIN bus via a communication unit such as a LIN transceiver is performed, the control unit of the vehicle-mounted device attempts to detect an interrupt process that occurs after the transmission. The interrupt processing is defined in the specifications of communication processing using the LIN so that it occurs after the data is transmitted when the data is transmitted using the LIN. The control unit of the in-vehicle device determines whether communication between the in-vehicle device and the in-vehicle ECU is being performed normally based on the detection result of the interrupt process, that is, whether or not an interrupt process is detected. It is possible to efficiently determine whether processing related to communication with other devices is being performed normally. In this way, the control unit of the in-vehicle device performs communication processing related to sending and receiving data with the in-vehicle ECU using LIN, and monitors the presence or absence of interrupt processing in parallel with the communication processing, thereby improving the reliability of LIN communication. It is possible to guarantee gender.
(2)本開示の一態様に係る車載装置は、前記割込み処理は、送信完了割込みと、エラー割込みとを含み、前記制御部は、前記送信完了割込みを検出した場合、前記車載ECUとの通信は正常であると判定し、前記送信完了割込み及び前記エラー割込みのいずれの割込み処理を検出しなかった場合、前記車載ECUとの通信は異常であると判定し、前記制御部の初期化処理を行う。 (2) In the in-vehicle device according to one aspect of the present disclosure, the interrupt processing includes a transmission completion interrupt and an error interrupt, and when the control unit detects the transmission completion interrupt, the control unit communicates with the in-vehicle ECU. is determined to be normal, and if neither the transmission completion interrupt nor the error interrupt is detected, the communication with the in-vehicle ECU is determined to be abnormal, and the initialization processing of the control unit is performed. conduct.
 本態様にあたっては、LINマスターである車載装置からのデータ(LINフレーム)の送信に対し、発生し得る割込み処理は、送信完了割込みと、エラー割込みとを含む。送信完了割込みは、データ(LINフレーム)の送信が正常に送信された場合に発生する割込み処理である。エラー割込みは、送信されたデータを、例えばループバック処理等にて受信し、当該受信したデータと、送信したデータとにおいて、差異が生じた場合に発生する割込み処理である。このようなデータ間差異は、例えば、LINトランシーバ等の通信部の故障、又はLINバス等の通信線のショート(地絡)等の故障等にて発生する。すなわち、LINトランシーバ等の通信部よりも下位となる物理層にて発生した事象により、データ(LINフレーム)におけるビットエラー(ビット反転)又はフィジカルバスエラー等が発生した場合、エラー割込みが発生するものとなる。制御部は、LINの通信制御プログラムを実行することにより、データを送信する都度、送信完了割込み又はエラー割込み等のいずれかの割込み処理を発生するように動作する。制御部は、更に、当該割込み処理の発生を周期的、定期的、又は定常的に監視しており、送信完了割込みを検出した場合、車載ECUとの通信は正常である(通信は正常完了した)と判定する。制御部は、送信完了割込み及びエラー割込みのいずれの割込み処理を検出しなかった場合、LINの通信制御プログラムの実行状態に異常(状態固着によるデータ送信不可)が発生し、車載ECUとの通信は異常(車載装置は異常)であると判定する。すなわち、LINの通信制御プログラムを実行するプロセスが例えばハング状態となり、ソフトウェア処理における状態固着が発生してデータ送信が不可となっている場合、送信完了割込み及びエラー割込みのいずれの割込み処理も、検出されないものなる。この場合、制御部は、通信制御プログラムを実行するプロセスの異常に起因して、通信異常が発生したと判定し、自部(制御部)の初期化処理を行うため、当該通信異常に対する復旧処理を効率的に行うことができる。制御部の初期化処理は、例えば、LINの通信制御プログラムを再起動、制御部自体のリセット(再起動)、又は車載装置自体のリセット(再起動)を含むものであり、すなわちソフトウェア的リセット(初期化)、ハードウェア的リセット(初期化)又は、ソフトウェア及びハードウェアの双方のリセット(初期化)を行うものであってもよい。このように、通信異常の発生によりLINスレーブである複数の車載ECUに接続されるワイパー等のアクチュエータが一時的に動作しなくなった場合であっても、復旧処理を行うことにより当該アクチュエータの駆動を効率的に再開することができる。 In this aspect, the interrupt processing that may occur in response to the transmission of data (LIN frame) from the in-vehicle device that is the LIN master includes a transmission completion interrupt and an error interrupt. A transmission completion interrupt is an interrupt process that occurs when data (LIN frame) is successfully transmitted. An error interrupt is an interrupt process that occurs when transmitted data is received by, for example, loopback processing, and a difference occurs between the received data and the transmitted data. Such data differences occur, for example, due to a failure in a communication unit such as a LIN transceiver, or a failure such as a short circuit (ground fault) in a communication line such as a LIN bus. In other words, an error interrupt occurs when a bit error (bit inversion) in data (LIN frame) or a physical bus error occurs due to an event that occurs in the physical layer that is lower than the communication unit such as a LIN transceiver. becomes. By executing the LIN communication control program, the control unit operates to generate an interrupt process such as a transmission completion interrupt or an error interrupt each time data is transmitted. The control unit also periodically, regularly, or constantly monitors the occurrence of the interrupt process, and if it detects a transmission completion interrupt, it indicates that the communication with the in-vehicle ECU is normal (communication has completed normally). ). If the control unit does not detect either a transmission completion interrupt or an error interrupt, an abnormality occurs in the execution state of the LIN communication control program (data cannot be sent due to a stuck state), and communication with the in-vehicle ECU is disabled. It is determined that there is an abnormality (the in-vehicle device is abnormal). In other words, if the process that executes the LIN communication control program is in a hung state, for example, and data transmission is impossible due to state fixation in software processing, both the transmission completion interrupt and error interrupt processing will not be detected. What is not done becomes. In this case, the control unit determines that a communication abnormality has occurred due to an abnormality in the process that executes the communication control program, and performs recovery processing for the communication abnormality in order to initialize its own unit (control unit). can be done efficiently. The initialization process of the control unit includes, for example, restarting the LIN communication control program, resetting (restarting) the control unit itself, or resetting (restarting) the in-vehicle device itself, that is, software reset ( Initialization), hardware reset (initialization), or both software and hardware reset (initialization) may be performed. In this way, even if an actuator such as a wiper connected to multiple in-vehicle ECUs that are LIN slaves temporarily stops working due to a communication error, the drive of the actuator can be resumed by performing the recovery process. Can be restarted efficiently.
(3)本開示の一態様に係る車載装置は、前記車載ECUへのデータの送信は、所定の送信周期にて行われ、前記制御部は、前記送信周期に基づく所定の期間にて、前記送信完了割込み及び前記エラー割込みのいずれの割込み処理を検出しなかった場合、前記車載ECUとの通信は異常であると判定する。 (3) In the in-vehicle device according to one aspect of the present disclosure, data is transmitted to the in-vehicle ECU at a predetermined transmission cycle, and the control unit transmits data to the in-vehicle ECU at a predetermined period based on the transmission cycle. If neither the transmission completion interrupt nor the error interrupt is detected, it is determined that the communication with the in-vehicle ECU is abnormal.
 本態様にあたっては、LINマスターである車載装置は、LINスレーブである複数の車載ECUに対し、予め定められたLINスケジュールに基づき、これら車載ECUに対し所定の送信周期にて、データ(LINフレーム)を送信する。当該LINスケジュールには、車載装置の記憶部に記憶されており、送信するデータID、送信の順番、及び送信する時間間隔(送信周期)が定義されて(含まれて)いる。車載装置の制御部は、記憶部に記憶されているLINスケジュールを参照し、当該LINスケジュールにて定義されている送信周期に応じた所定の期間にて、送信完了割込み及びエラー割込みのいずれの割込み処理を検出したか否かを判定する。当該所定の期間は、割込み処理の検出を行う際の検出単位期間に相当するものであり、例えば、LINスレーブである全ての車載ECUそれぞれに対し、1回ずつデータを送信する際に要する時間となる1スケジューラ時間を、検出単位期間(所定の期間)とするものであってもよい。車載装置の制御部は、直前に検出した送信完了割込み又はエラー割込みの検出時点を基準(起算点)として、送信周期(T)に車載ECU(LINスレーブ)の個数(n)を乗算した1スケジューラ時間(T×n)が経過する時点まで、送信完了割込み及びエラー割込みのいずれの割込み処理を検出しなかった場合、車載ECUとの通信は異常であると判定するものであってもよい。このようにLINスケジュールに基づいた車載装置(LINマスター)から車載ECU(LINスレーブ)の送信周期に応じた所定の期間(1スケジューラ時間)を、判定を行うための期間(検出単位期間)とすることにより、判定精度を向上させることができる。 In this aspect, an in-vehicle device that is a LIN master transmits data (LIN frames) to a plurality of in-vehicle ECUs that are LIN slaves at a predetermined transmission cycle based on a predetermined LIN schedule. Send. The LIN schedule is stored in the storage unit of the in-vehicle device, and defines (includes) the data ID to be transmitted, the order of transmission, and the time interval (transmission cycle) of transmission. The control unit of the in-vehicle device refers to the LIN schedule stored in the storage unit, and generates either a transmission completion interrupt or an error interrupt in a predetermined period according to the transmission cycle defined in the LIN schedule. Determine whether processing is detected. The predetermined period corresponds to the detection unit period when detecting interrupt processing, and for example, it corresponds to the time required to send data once to each in-vehicle ECU that is a LIN slave. The detection unit period (predetermined period) may be one scheduler time. The control unit of the in-vehicle device uses a scheduler that multiplies the transmission period (T) by the number (n) of in-vehicle ECUs (LIN slaves), using the detection point of the transmission completion interrupt or error interrupt detected immediately before as a reference (starting point). If no interrupt processing, either a transmission completion interrupt or an error interrupt, is detected until time (T×n) has elapsed, it may be determined that the communication with the in-vehicle ECU is abnormal. In this way, a predetermined period (one scheduler time) according to the transmission cycle from the in-vehicle device (LIN master) to the in-vehicle ECU (LIN slave) based on the LIN schedule is set as the period for making the determination (detection unit period). By doing so, the determination accuracy can be improved.
(4)本開示の一態様に係る車載装置は、前記車載ECUとの通信は、LINバスを介して行われ、前記LINバスが接続される通信部を備え、前記制御部は、前記エラー割込みを検出した場合、前記車載ECUとの通信は異常であると判定し、前記通信部の初期化処理を行う。 (4) The in-vehicle device according to one aspect of the present disclosure communicates with the in-vehicle ECU via a LIN bus, and includes a communication unit to which the LIN bus is connected, and the control unit is configured to handle the error interrupt. If detected, it is determined that the communication with the vehicle-mounted ECU is abnormal, and initialization processing of the communication unit is performed.
 本態様にあたっては、車載装置の制御部は、エラー割込みを検出した場合、LINトランシーバ等の通信部の故障等により、車載ECUとの通信は異常である(通信は異常終了した)と判定し、通信部(LINトランシーバ)の初期化処理を行う。当該通信部(LINトランシーバ)の初期化処理は、例えば、通信部への電力の遮断及び再開によるハードウェア的リセット(初期化)を行うものであってもよい。これにより、通信部を正常な状態に遷移させ、車載ECUとの通信を正常な状態に復旧させることができる。車載装置の制御部は、通信部の初期化処理を、予め定められている所定回数以上行ったにもかかわらず、エラー割込みを継続して検出した場合、LINバス等の通信線のショート(地絡)等の故障(フィジカルバスエラー)が発生したと判定し、当該判定結果を記憶部に記憶し、ディスプレイ等のHMI(Human Machine Interface)装置に出力するものであってもよい。 In this aspect, when the control unit of the in-vehicle device detects an error interrupt, it determines that communication with the in-vehicle ECU is abnormal (communication has ended abnormally) due to a failure of a communication unit such as a LIN transceiver, Performs initialization processing of the communication unit (LIN transceiver). The initialization process for the communication unit (LIN transceiver) may include, for example, performing a hardware reset (initialization) by cutting off and restarting power to the communication unit. Thereby, the communication unit can be brought into a normal state, and communication with the vehicle-mounted ECU can be restored to a normal state. If the control unit of the in-vehicle device continues to detect error interrupts even though the initialization process of the communication unit has been performed a predetermined number of times or more, the control unit of the in-vehicle device detects a short circuit (ground) in the communication line such as the LIN bus. It may be determined that a failure (physical bus error) such as a physical bus error has occurred, and the determination result may be stored in a storage unit and output to an HMI (Human Machine Interface) device such as a display.
(5)本開示の一態様に係る情報処理方法は、車両に搭載され、LINの通信プロトコルを用いて車載ECUと通信可能に接続され、前記車載ECUとの通信に関する制御を行うコンピュータに、前記車載ECUへのデータの送信後に発生する割込み処理を検出し、前記検出結果に基づき、前記車載ECUとの通信が正常に行われているか否かを判定する処理を実行させる。 (5) An information processing method according to an aspect of the present disclosure includes a computer that is installed in a vehicle, is communicably connected to an in-vehicle ECU using a LIN communication protocol, and controls communication with the in-vehicle ECU. An interrupt process that occurs after data is transmitted to an on-vehicle ECU is detected, and based on the detection result, a process is executed to determine whether communication with the on-vehicle ECU is being performed normally.
 本態様にあたっては、コンピュータを、他装置との通信に関する処理が正常に行われているかを判定する車載装置として機能させる情報処理方法を提供することができる。 In this aspect, it is possible to provide an information processing method that causes a computer to function as an in-vehicle device that determines whether processing related to communication with other devices is being performed normally.
(6)本開示の一態様に係るプログラムは、車両に搭載され、LINの通信プロトコルを用いて車載ECUと通信可能に接続され、前記車載ECUとの通信に関する制御を行うコンピュータに、前記車載ECUへのデータの送信後に発生する割込み処理を検出し、前記検出結果に基づき、前記車載ECUとの通信が正常に行われているか否かを判定する処理を実行させる。 (6) A program according to an aspect of the present disclosure is installed in a vehicle, is communicably connected to an in-vehicle ECU using a LIN communication protocol, and is transmitted to a computer that controls communication with the in-vehicle ECU. An interrupt process that occurs after data is transmitted to the ECU is detected, and based on the detection result, a process is executed to determine whether communication with the in-vehicle ECU is being performed normally.
 本態様にあたっては、コンピュータを、他装置との通信に関する処理が正常に行われているかを判定する車載装置として機能させるプログラムを提供することができる。 In this aspect, it is possible to provide a program that causes a computer to function as an in-vehicle device that determines whether processing related to communication with other devices is being performed normally.
[本開示の実施形態の詳細]
 本開示をその実施の形態を示す図面に基づいて具体的に説明する。本開示の実施形態に係る車載装置1等を、以下に図面を参照しつつ説明する。なお、本開示はこれらの例示に限定されるものではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。
[Details of embodiments of the present disclosure]
The present disclosure will be specifically described based on drawings showing embodiments thereof. An in-vehicle device 1 and the like according to an embodiment of the present disclosure will be described below with reference to the drawings. Note that the present disclosure is not limited to these examples, but is indicated by the scope of the claims, and is intended to include all changes within the meaning and scope equivalent to the scope of the claims.
(実施形態1)
 以下、実施の形態について図面に基づいて説明する。図1は、実施形態1に係る車載装置1等を含む車載システムSの構成を例示する模式図である。図2は、車載装置1の内部構成を例示するブロック図である。車載システムSは、車両Cに搭載された車載装置1、及び複数の車載ECU2により構成され、これら車載装置1と、複数の車載ECU2(Electronic Control Unit)それぞれとは、通信線4(LINバス)によって通信可能に接続される。車載装置1及び車載ECU2は、LIN(Local Interconnect Network)の通信プロトコルを用いてデータ(LINフレーム)を送受信するように構成されており、車載装置1はLINマスターとして機能し、車載ECU2はLINスレーブとして機能する。
(Embodiment 1)
Hereinafter, embodiments will be described based on the drawings. FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system S including an in-vehicle device 1 and the like according to the first embodiment. FIG. 2 is a block diagram illustrating the internal configuration of the in-vehicle device 1. As shown in FIG. The in-vehicle system S is composed of an in-vehicle device 1 mounted on a vehicle C and a plurality of in-vehicle ECUs 2, and these in-vehicle devices 1 and each of the plurality of in-vehicle ECUs 2 (Electronic Control Units) are connected to a communication line 4 (LIN bus). communicably connected. The in-vehicle device 1 and the in-vehicle ECU 2 are configured to transmit and receive data (LIN frames) using a LIN (Local Interconnect Network) communication protocol, and the in-vehicle device 1 functions as a LIN master, and the in-vehicle ECU 2 functions as a LIN slave. functions as
 LINスレーブである車載ECU2それぞれには、ランプ、ドアミラー又はワイパー等の車載負荷3(アクチュエータ)が通信可能に接続されている。これら車載ECU2は、LINマスターである車載装置1から送信されたデータ(LINフレーム)を受信し、当該受信したデータに応じて、自ECU(車載ECU2自身)に直接、接続されている車載負荷3(アクチュエータ)の駆動制御を行う。 An on-vehicle load 3 (actuator) such as a lamp, a door mirror, or a wiper is communicably connected to each on-vehicle ECU 2 that is a LIN slave. These in-vehicle ECUs 2 receive data (LIN frames) transmitted from the in-vehicle device 1, which is a LIN master, and respond to the in-vehicle load 3 directly connected to their own ECU (in-vehicle ECU 2 itself) according to the received data. (actuator) drive control.
 車載装置1は、車載ECU2にデータを送信後、都度、送信完了割込み又はエラー割込みを検出するように構成されている。詳細は後述するが、車載装置1は、車載ECU2にデータを送信し所定期間が経過するまでの間、送信完了割込み及びエラー割込みのいずれの割込み処理も検出しなかった場合、ソフトウェア処理における状態固着等による通信異常が発生したと判定し、LIN通信に関するソフトウェア及びハードウェアを初期化する。 The in-vehicle device 1 is configured to detect a transmission completion interrupt or an error interrupt each time after transmitting data to the in-vehicle ECU 2. Although the details will be described later, if the in-vehicle device 1 does not detect any interrupt processing, such as a transmission completion interrupt or an error interrupt, after transmitting data to the in-vehicle ECU 2 until a predetermined period has elapsed, the state will be fixed in the software processing. It is determined that a communication abnormality has occurred due to, etc., and the software and hardware related to LIN communication are initialized.
 車載装置1は、LINマスターとして機能するECU(LINマスターECU)であり、制御部11、記憶部12、及び通信部13を含む。車載装置1は、例えば、ボディ系アクチュエータの全体制御を行うボディECUとして機能するものであってもよい。又は、車載装置1は、例えばヴィークルコンピュータ等の中央制御装置にて構成され、車両C全体の統合制御を行う統合ECUとして機能するものであってもよい。 The in-vehicle device 1 is an ECU (LIN master ECU) that functions as a LIN master, and includes a control section 11, a storage section 12, and a communication section 13. The in-vehicle device 1 may function, for example, as a body ECU that performs overall control of body-related actuators. Alternatively, the in-vehicle device 1 may be configured with a central control device such as a vehicle computer, and may function as an integrated ECU that performs integrated control of the entire vehicle C.
 制御部11は、CPU(Central Processing Unit)又はMPU(Micro Processing Unit)等により構成してあり、記憶部12に予め記憶されたプログラム(プログラム製品)及びデータを読み出し実行することにより、種々の制御処理及び演算処理等を行う。制御部11は、記憶部12等と共に、マイコン等によりパッケージ化されて構成されているものであってもよい。制御部11は、CPU等のソフトウェア処理を行うソフトウェア処理部のみに限定されず、FPGA(Field Programmable Gate Array)、ASIC(Application Specific Integrated Circuit)又はSOC(System on Chip)等のハードウェア処理にて種々の制御処理及び演算処理等を行うハードウェア処理部を含むものであってもよい。 The control unit 11 is composed of a CPU (Central Processing Unit), an MPU (Micro Processing Unit), etc., and performs various controls by reading and executing programs (program products) and data stored in advance in the storage unit 12. Performs processing, arithmetic processing, etc. The control unit 11 may be configured by being packaged with a microcomputer or the like together with the storage unit 12 and the like. The control unit 11 is not limited to a software processing unit such as a CPU that performs software processing, but may also be a hardware processing unit such as an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or an SOC (System on Chip). It may include a hardware processing unit that performs various control processing, calculation processing, and the like.
 記憶部12は、RAM(Random Access Memory)等の揮発性のメモリ素子又は、ROM(Read Only Memory)、EEPROM(Electrically Erasable Programmable ROM)もしくはフラッシュメモリ等の不揮発性のメモリ素子により構成してあり、車載装置1のプログラムP(プログラム製品)又はデータが記憶されている。記憶部12に記憶されたプログラムP(プログラム製品)は、車載装置1が読み取り可能な記録媒体Mから読み出されたプログラムP(プログラム製品)を記憶したものであってもよい。また、図示しない通信網に接続されている図示しない外部コンピュータからプログラムP(プログラム製品)をダウンロードし、記憶部12に記憶させたものであってもよい。記憶部12には、送信するデータID、送信の順番、及び送信する時間間隔(送信周期)等、LIN通信を行う際に用いられる各種パラメータを含むLINスケジュール、又は設定ファイルが記憶されている。 The storage unit 12 is composed of a volatile memory element such as a RAM (Random Access Memory), or a nonvolatile memory element such as a ROM (Read Only Memory), an EEPROM (Electrically Erasable Programmable ROM), or a flash memory. A program P (program product) or data of the in-vehicle device 1 is stored. The program P (program product) stored in the storage unit 12 may be a program P (program product) read from a recording medium M readable by the in-vehicle device 1. Alternatively, the program P (program product) may be downloaded from an external computer (not shown) connected to a communication network (not shown) and stored in the storage unit 12. The storage unit 12 stores a LIN schedule or a configuration file that includes various parameters used when performing LIN communication, such as data ID to be transmitted, transmission order, and transmission time interval (transmission cycle).
 通信部13は、LIN等の通信プロトコルを用いた入出力インターフェイスであるLINトランシーバにて構成される。通信部13(LINトランシーバ)には、バス構成による通信線4(LINバス)が接続され、当該通信線4を介して、車載装置1と車載ECU2との間でLIN通信が行われる。 The communication unit 13 is composed of a LIN transceiver, which is an input/output interface using a communication protocol such as LIN. A communication line 4 (LIN bus) having a bus configuration is connected to the communication unit 13 (LIN transceiver), and LIN communication is performed between the in-vehicle device 1 and the in-vehicle ECU 2 via the communication line 4.
 LINスレーブとして機能する車載ECU2それぞれにおいても、車載装置1と同様に制御部11、記憶部12、及び通信部13(LINトランシーバ)を含む。これら車載ECU2それぞれには、シリアルケーブル等を介してワイパー等の車載負荷3(アクチュエータ)が直接、接続されている。車載ECU2は、LIN通信により車載装置1から受信したデータに基づき、自ECU(車載ECU2自身)に直接、接続されている車載負荷3
(アクチュエータ)を駆動する。
Each of the in-vehicle ECUs 2 functioning as LIN slaves also includes a control section 11, a storage section 12, and a communication section 13 (LIN transceiver) similarly to the in-vehicle device 1. A vehicle load 3 (actuator) such as a wiper is directly connected to each of these vehicle ECUs 2 via a serial cable or the like. Based on the data received from the on-vehicle device 1 through LIN communication, the on-vehicle ECU 2 connects the on-vehicle load 3 directly connected to its own ECU (on-vehicle ECU 2 itself).
(actuator).
 図3は、車載装置1の制御部11による割込み処理の検出に関する説明図である。本説明図は、横軸にて示される経過時間における、通信線4及び車載装置1の状態を示す。その上で、車載装置1に実装されるマイコン等の制御部11が行う処理である、送信完了割込み、エラー割込み、及びこれら割込み処理を検出するための時間監視(時間計測を伴う監視処理)についても、模式的に説明する。 FIG. 3 is an explanatory diagram regarding detection of interrupt processing by the control unit 11 of the in-vehicle device 1. This explanatory diagram shows the states of the communication line 4 and the vehicle-mounted device 1 during the elapsed time indicated by the horizontal axis. On top of that, we will discuss transmission completion interrupts, error interrupts, and time monitoring (monitoring processing that involves time measurement) for detecting these interrupt processes, which are processes performed by the control unit 11 such as a microcomputer installed in the in-vehicle device 1. will also be schematically explained.
 データ(LINフレーム)の送信後に発生する割込み処理は、送信完了割込み及びエラー割込みを含み、LINによるデータ送信を行った際、当該データ送信後に発生するようにLINによる通信処理の仕様上、定義されている。車載装置1の制御部11(LINの通信制御プログラムを実行するプロセス)は、送信したデータをループバック処理等にて受信し、当該受信したデータと、送信したデータとにおいて、差異が生じた場合はエラー割込みを発生させ、差異が生じなかった場合は送信完了割込みを発生させる。すなわち、差異が生じなかった場合は、LIN通信は正常であると判定され、差異が生じた場合は、LIN通信は異常である(通信エラーが発生)と判定される。 Interrupt processing that occurs after transmitting data (LIN frame) includes transmission completion interrupts and error interrupts, and is defined in the specifications of communication processing by LIN to occur after transmitting data when transmitting data by LIN. ing. The control unit 11 (the process that executes the LIN communication control program) of the in-vehicle device 1 receives the transmitted data through loopback processing, etc., and if a difference occurs between the received data and the transmitted data. generates an error interrupt, and if no difference occurs, generates a transmission completion interrupt. That is, if no difference occurs, it is determined that the LIN communication is normal, and if a difference occurs, the LIN communication is determined to be abnormal (a communication error has occurred).
 通信線4及び車載装置1が共に正常な状態(場合)においては、車載装置1は、車載ECU2へデータを送信後、都度、送信完了割込み(実線で記載)を検出する。車載装置1は、検出した送信完了割込みの検出時点を起算点として、異常判定を行うための時間(所定期間)の再計測(送信完了割込み発生による時間再計測)を行う処理を行う。すなわち、送信完了割込みの検出により、時間監視を行うにあたっての経過時間が0に設定(0クリア)される。 When both the communication line 4 and the vehicle-mounted device 1 are in a normal state (case), the vehicle-mounted device 1 detects a transmission completion interrupt (indicated by a solid line) each time after transmitting data to the vehicle-mounted ECU 2. The in-vehicle device 1 performs a process of re-measuring the time (predetermined period) for determining an abnormality (re-measuring the time due to the occurrence of the transmission completion interrupt) using the detected transmission completion interrupt as a starting point. That is, upon detection of the transmission completion interrupt, the elapsed time for time monitoring is set to 0 (cleared to 0).
 車載装置1は、例えば通信線4にノイズ等が発生した場合等、通信線4が一時的に異常な状態となった際、エラー割込みを検出する。この場合、本来なら検出される送信完了割込みは、検出されない(発生しない)ものとなる。本説明図において、当該検出されなかった(発生しなかった)送信完了割込みは、破線にて示す。車載装置1は、検出したエラー割込みの検出時点を起算点として、異常判定を行うための時間(所定期間)の再計測(エラー発生による時間再計測)を行う処理を行う。すなわち、エラー割込みの検出により、時間監視を行うにあたっての経過時間が0に設定(0クリア)される。 The in-vehicle device 1 detects an error interrupt when the communication line 4 becomes temporarily abnormal, such as when noise or the like occurs on the communication line 4. In this case, the transmission completion interrupt that would normally be detected is not detected (does not occur). In this explanatory diagram, the transmission completion interrupt that was not detected (did not occur) is indicated by a broken line. The in-vehicle device 1 performs a process of re-measuring the time (predetermined period) for determining an abnormality (re-measuring the time due to the occurrence of an error) using the time of detection of the detected error interrupt as a starting point. That is, upon detection of an error interrupt, the elapsed time for time monitoring is set to 0 (cleared to 0).
 本説明図にて、車載装置1が送信完了割込み(実線で記載)を検出した後、車載装置1にて、例えばソフトウェア処理における異常(状態固着で送信不可)が発生した場合、送信完了割込み及びエラー割込みが共に非発生(非検出)な期間が生じる。当該期間において、本来(通信線4及び車載装置1が正常)なら、複数回の送信完了割込み(破線で記載)が検出されるところ、これら送信完了割込みのみならず、エラー割込みも、検出されないものとなる。 In this explanatory diagram, after the in-vehicle device 1 detects a transmission completion interrupt (indicated by a solid line), if, for example, an abnormality occurs in software processing (unable to transmit due to stuck state), the in-vehicle device 1 detects a transmission completion interrupt and There is a period in which neither error interrupt occurs (is not detected). During this period, if the communication line 4 and in-vehicle device 1 were normal, multiple transmission completion interrupts (indicated by broken lines) would be detected, but not only these transmission completion interrupts but also error interrupts are not detected. becomes.
 車載装置1は、車載ECU2への送信周期に応じた所定の期間(1スケジューラ時間)を、判定を行うための期間(検出単位期間)とし、当該1スケジューラ時間にて送信完了割込み及びエラー割込みを検出しなかった場合、状態固着等による送信不可(異常)が発生したと判定する。車載装置1は、状態固着等による送信不可(異常)を解消するため、復旧処理(リセット)を実行する。当該復旧処理(リセット)は、LIN通信に関するソフトウェア及びハードウェアを初期化する処理を含む。車載装置1は、復旧処理の実行を行うことにより再起動され、異常な状態から、正常な状態に復旧(遷移)する。 The in-vehicle device 1 sets a predetermined period (one scheduler time) according to the transmission cycle to the in-vehicle ECU 2 as a period (detection unit period) for making a determination, and issues a transmission completion interrupt and an error interrupt in the one scheduler time. If not detected, it is determined that transmission failure (abnormality) due to state fixation or the like has occurred. The in-vehicle device 1 executes a recovery process (reset) in order to resolve the inability to transmit (abnormality) due to a stuck state or the like. The recovery process (reset) includes a process of initializing software and hardware related to LIN communication. The in-vehicle device 1 is restarted by executing the recovery process, and recovers (transitions) from an abnormal state to a normal state.
 図4は、車載装置1の制御部11の処理を例示するフローチャートである。車載装置1の制御部11は、例えば、車両Cの起動状態又は停止状態において、以下の処理を行うことにより、割込み処理に対する監視等を実施する。車載装置1の制御部11は、LINの通信プロトコルを用いて車載ECU2とデータ(LINフレーム)の送受信に関する通信処理を定常的に行っている。その上で、車載装置1の制御部11は、当該LINの通信処理を行うことにより発生する割込み処理に対し、監視等を行う処理を実施する。 FIG. 4 is a flowchart illustrating the processing of the control unit 11 of the in-vehicle device 1. The control unit 11 of the in-vehicle device 1 monitors interrupt processing by performing the following processing, for example, when the vehicle C is activated or stopped. The control unit 11 of the in-vehicle device 1 regularly performs communication processing regarding transmission and reception of data (LIN frames) with the in-vehicle ECU 2 using the LIN communication protocol. Then, the control unit 11 of the in-vehicle device 1 performs processing such as monitoring of interrupt processing that occurs due to communication processing of the LIN.
 車載装置1の制御部11は、送信完了割込みを検出したか否かを判定する(S101)。車載装置1の制御部11は、送信完了割込みを検出したか否かを判定するにあたり、LINの通信制御プログラムを実行するプロセスから、送信完了割込みを示す割込みシグナルが発信されたか否かにより、当該判定を行うものであってもよい。すなわち、車載装置1の制御部11において、LINの通信制御プログラムを実行するプロセスと、監視処理を実行するプロセスとが生成されており、当該監視処理を実行するプロセスが、LINの通信制御プログラムを実行するプロセスが発信したシグナル(送信完了割込みシグナル)を受信した場合、送信完了割込みを検出したと判定するものであってもよい。又は、車載装置1の制御部11は、データ(LINフレーム)を送信した際、後処理として送信完了割込みの発生の有無に関するデータ又はシグナルの取得を試みる処理を行い、当該後処理の結果に基づき、送信完了割込みを検出したか否かを判定するものであってもよい。 The control unit 11 of the in-vehicle device 1 determines whether a transmission completion interrupt has been detected (S101). In determining whether or not a transmission completion interrupt has been detected, the control unit 11 of the in-vehicle device 1 determines whether or not an interrupt signal indicating a transmission completion interrupt has been transmitted from the process that executes the LIN communication control program. It may also be something that makes a determination. That is, in the control unit 11 of the in-vehicle device 1, a process that executes the LIN communication control program and a process that executes the monitoring process are generated, and the process that executes the monitoring process executes the LIN communication control program. When a signal (transmission completion interrupt signal) sent by the executing process is received, it may be determined that a transmission completion interrupt has been detected. Alternatively, when transmitting data (LIN frame), the control unit 11 of the in-vehicle device 1 performs post-processing to attempt to obtain data or a signal regarding whether or not a transmission completion interrupt has occurred, and based on the result of the post-processing, , it may be determined whether or not a transmission completion interrupt has been detected.
 送信完了割込みを検出したと判定した場合(S101:YES)、車載装置1の制御部11は、車載ECU2との通信は正常完了したと判定する(S102)。送信完了割込みは、車載装置1からデータが正常に送信された場合に発生する割込み処理である。車載装置1の制御部11は、送信完了割込みを検出したと判定した場合、車載ECU2とのLIN通信は正常完了したと判定する。 If it is determined that a transmission completion interrupt has been detected (S101: YES), the control unit 11 of the in-vehicle device 1 determines that communication with the in-vehicle ECU 2 has been successfully completed (S102). The transmission completion interrupt is an interrupt process that occurs when data is normally transmitted from the in-vehicle device 1. When determining that the transmission completion interrupt has been detected, the control unit 11 of the in-vehicle device 1 determines that the LIN communication with the in-vehicle ECU 2 has been successfully completed.
 車載装置1の制御部11は、送信完了割込みを検出した時点を示すタイムスタンプ又は時間等の時点情報(送信完了割込み検出時点)を記憶部12に記憶する。記憶部12に記憶した送信完了割込みの検出時点情報(送信完了割込み検出時点)は、次回のデータ(LINフレーム)を送信する際の送信周期の起算点とし用いられるものであり、車載装置1の制御部11は、送信完了割込みの検出(発生)により送信周期等の時間を再計測する処理を行う。 The control unit 11 of the in-vehicle device 1 stores time information such as a timestamp or time indicating the time when the transmission completion interrupt was detected (the transmission completion interrupt detection time) in the storage unit 12. The transmission completion interrupt detection time information (transmission completion interrupt detection time) stored in the storage unit 12 is used as the starting point for the transmission cycle when transmitting the next data (LIN frame), and is used as the starting point for the transmission cycle when transmitting the next data (LIN frame). The control unit 11 performs a process of re-measuring time such as a transmission cycle upon detection (occurrence) of a transmission completion interrupt.
 送信完了割込みを検出していないと判定した場合(S101:NO)、車載装置1の制御部11は、エラー割込みを検出したか否かを判定する(S103)。エラー割込みは、車載装置1からデータが正常に送信されなかった場合に発生する割込み処理であり、送信されたデータを、例えばループバック処理等にて受信し、当該受信したデータと、送信したデータとにおいて、差異が生じた場合に発生する割込み処理である。 If it is determined that a transmission completion interrupt has not been detected (S101: NO), the control unit 11 of the vehicle-mounted device 1 determines whether or not an error interrupt has been detected (S103). The error interrupt is an interrupt process that occurs when data is not transmitted normally from the in-vehicle device 1, and the transmitted data is received by loopback processing, etc., and the received data and the transmitted data are This is an interrupt process that occurs when a difference occurs between the two.
 車載装置1の制御部11は、エラー割込みを検出したと判定した場合、車載ECU2とのLIN通信は異常である(通信エラーが発生)と判定する。車載装置1の制御部11は、エラー割込みを検出したか否かを判定するにあたり、LINの通信制御プログラムを実行するプロセスから、エラー割込みを示す割込みシグナルが発信されたか否かにより、当該判定を行うものであってもよい。すなわち、車載装置1の制御部11において、LINの通信制御プログラムを実行するプロセスと、監視処理を実行するプロセスとが生成されており、当該監視処理を実行するプロセスが、LINの通信制御プログラムを実行するプロセスが発信したシグナル(エラー割込みシグナル)を受信した場合、エラー割込みを検出したと判定するものであってもよい。又は、車載装置1の制御部11は、データ(LINフレーム)を送信した際、後処理としてエラー割込みの発生の有無に関するデータ又はシグナルの取得を試みる処理を行い、当該後処理の結果に基づき、エラー割込みを検出したか否かを判定するものであってもよい。 If the control unit 11 of the vehicle-mounted device 1 determines that an error interrupt has been detected, it determines that the LIN communication with the vehicle-mounted ECU 2 is abnormal (a communication error has occurred). When determining whether or not an error interrupt has been detected, the control unit 11 of the in-vehicle device 1 makes the determination based on whether or not an interrupt signal indicating an error interrupt has been transmitted from the process that executes the LIN communication control program. It may be something you do. That is, in the control unit 11 of the in-vehicle device 1, a process that executes the LIN communication control program and a process that executes the monitoring process are generated, and the process that executes the monitoring process executes the LIN communication control program. If a signal (error interrupt signal) sent by the executing process is received, it may be determined that an error interrupt has been detected. Alternatively, when transmitting data (LIN frame), the control unit 11 of the in-vehicle device 1 performs post-processing to attempt to obtain data or signals regarding the occurrence of an error interrupt, and based on the result of the post-processing, It may be determined whether or not an error interrupt has been detected.
 エラー割込みを検出したと判定した場合(S103:YES)、車載装置1の制御部11は、車載ECU2との通信は異常終了したと判定する(S104)。車載装置1の制御部11は、エラー割込みを検出したと判定した場合、通信線4(障害)又は通信部13(LINトランシーバ)にてノイズの発生、又はショート(地絡)等の障害が発生し、車載ECU2との通信は異常であると判定する。 If it is determined that an error interrupt has been detected (S103: YES), the control unit 11 of the in-vehicle device 1 determines that communication with the in-vehicle ECU 2 has ended abnormally (S104). When the control unit 11 of the in-vehicle device 1 determines that an error interrupt has been detected, a failure such as noise generation or a short circuit (ground fault) has occurred in the communication line 4 (fault) or the communication unit 13 (LIN transceiver). However, it is determined that the communication with the in-vehicle ECU 2 is abnormal.
 車載装置1の制御部11は、エラー割込みを検出した時点を示すタイムスタンプ又は時間等の時点情報(エラー割込み検出時点)を記憶部12に記憶する。記憶部12に記憶したエラー割込みの検出時点情報(エラー割込み検出時点)は、次回のデータ(LINフレーム)を送信する際の送信周期の起算点とし用いられるものであり、車載装置1の制御部11は、エラー割込みの検出(発生)により送信周期等の時間を再計測する処理を行う。 The control unit 11 of the vehicle-mounted device 1 stores time information such as a timestamp or time indicating the time when the error interrupt was detected (the time of error interrupt detection) in the storage unit 12. The error interrupt detection time information (error interrupt detection time) stored in the storage unit 12 is used as a starting point for the transmission cycle when transmitting the next data (LIN frame), and is used by the control unit of the in-vehicle device 1. 11 performs a process of re-measuring time such as a transmission cycle upon detection (occurrence) of an error interrupt.
 車載装置1の制御部11は、通信部13の初期化を行う(S105)。車載装置1の制御部11は、エラー割込みを検出した際、通信部13(LINトランシーバ)の初期化処理を行う。当該通信部13(LINトランシーバ)の初期化処理は、例えば、通信部13への電力の遮断及び再開によるハードウェア的リセット(初期化)を行うものであってもよい。このように通信部13をリセットすることにより、通信部13を正常な状態に遷移させ、車載ECU2との通信を正常な状態に復旧させることができる。車載装置1の制御部11は、通信部13の初期化を行った日時等を含む履歴情報を、記憶部12に記憶するものであってもよい。車載装置1の制御部11は、S105の処理の実行後、再度S101からの処理を実行すべく、ループ処理を行う。 The control unit 11 of the in-vehicle device 1 initializes the communication unit 13 (S105). When the control unit 11 of the in-vehicle device 1 detects an error interrupt, it initializes the communication unit 13 (LIN transceiver). The initialization process of the communication unit 13 (LIN transceiver) may include, for example, performing a hardware reset (initialization) by cutting off and restarting power to the communication unit 13. By resetting the communication unit 13 in this manner, the communication unit 13 can be transitioned to a normal state, and communication with the in-vehicle ECU 2 can be restored to a normal state. The control unit 11 of the in-vehicle device 1 may store history information including the date and time when the communication unit 13 was initialized in the storage unit 12. After executing the process in S105, the control unit 11 of the in-vehicle device 1 performs a loop process to execute the process from S101 again.
 本実施形態において、車載装置1の制御部11は、処理S105として、エラー割込みを検出した場合、都度、通信部13の初期化を行うとしたがこれに限定されない。車載装置1の制御部11は、エラー割込みを検出した場合であっても通信部13の初期化を行くことなく、割込み処理の監視を継続するものであってもよい。エラー割込みは、通信線4にノイズが発生した場合、又は通信部13にて電荷が溜まる等による一時的な障害が発生した場合においても、発生し得るものであり、この際、時間経過により自然復旧することもあり得る。従って、車載装置1の制御部11は、エラー割込みを連続して複数回検出した場合等、エラー割込みの検出が継続した際、通信部13の初期化を行うものであってもよい。 In the present embodiment, the control unit 11 of the in-vehicle device 1 initializes the communication unit 13 each time an error interrupt is detected in step S105, but the invention is not limited to this. The control unit 11 of the in-vehicle device 1 may continue monitoring the interrupt processing without initializing the communication unit 13 even when an error interrupt is detected. Error interrupts can also occur when noise occurs in the communication line 4 or when a temporary failure occurs due to accumulation of electric charge in the communication section 13. It is possible that it will be restored. Therefore, the control unit 11 of the in-vehicle device 1 may initialize the communication unit 13 when error interrupts continue to be detected, such as when error interrupts are detected a plurality of times in succession.
 エラー割込みを検出していないと判定した場合(S103:NO)、車載装置1の制御部11は、所定期間、経過したか否かを判定する(S1031)。車載装置1の制御部11は、エラー割込みを検出していないと判定した場合、直前に検出した送信完了割込み又はエラー割込みの検出時点から、所定期間、経過したか否かを判定する。当該所定期間は、例えば、LINスケジュールにて定義されている送信周期に応じて決定される1スケジューラ時間とするものであってもよい。当該1スケジューラ時間は、LINスレーブである車載ECU2の個数(n)に、送信周期(T)を乗算した時間(T×n)に相当する。又は、1スケジューラ時間そのものが、LINスケジュールにて定義されているものであってもよい。又は、送信周期又は1スケジューラ時間とは別個に、判定を行うための期間(検出単位期間)がLINスケジュール、又は記憶部12に記憶される設定ファイル等にて定義されているものであってもよい。所定期間、経過していないと判定した場合(S1031:NO)、車載装置1の制御部11は、再度S101からの処理を実行すべく、ループ処理を行う。 If it is determined that an error interrupt has not been detected (S103: NO), the control unit 11 of the in-vehicle device 1 determines whether a predetermined period of time has elapsed (S1031). When determining that no error interrupt has been detected, the control unit 11 of the vehicle-mounted device 1 determines whether a predetermined period of time has elapsed since the most recently detected transmission completion interrupt or error interrupt. The predetermined period may be, for example, one scheduler time determined according to the transmission cycle defined in the LIN schedule. The one scheduler time corresponds to the time (T×n) obtained by multiplying the number (n) of in-vehicle ECUs 2 that are LIN slaves by the transmission period (T). Alternatively, one scheduler time itself may be defined in the LIN schedule. Or, even if the period for making the determination (detection unit period) is defined in the LIN schedule or the configuration file stored in the storage unit 12, separately from the transmission cycle or one scheduler time. good. If it is determined that the predetermined period has not elapsed (S1031: NO), the control unit 11 of the in-vehicle device 1 performs a loop process to execute the process from S101 again.
 所定期間、経過したと判定した場合(S1031:YES)、車載装置1の制御部11は、車載装置1は異常であると判定であると判定する(S1032)。本処理は、S101の分岐処理にて送信完了割込みを検出していない場合(S101:NO)に実行されるものであるため、所定期間にてエラー割込み検出していないと判定した場合、エラー割込みのみならず、送信完了割込みについても、検出していないものとなる。このように所定期間経過した場合、車載装置1の制御部11は、例えば1スケジューラ時間に相当する所定期間にて、送信完了割込み及びエラー割込みのいずれの割込み処理を検出しなかったと判定する。 If it is determined that the predetermined period has elapsed (S1031: YES), the control unit 11 of the vehicle-mounted device 1 determines that the vehicle-mounted device 1 is abnormal (S1032). This process is executed when a transmission completion interrupt is not detected in the branch process of S101 (S101: NO), so if it is determined that an error interrupt is not detected within a predetermined period, an error interrupt is executed. In addition, the transmission completion interrupt is also not detected. When the predetermined period of time has elapsed in this manner, the control unit 11 of the vehicle-mounted device 1 determines that neither the transmission completion interrupt nor the error interrupt has been detected in the predetermined period corresponding to, for example, one scheduler time.
 車載装置1の制御部11は、送信完了割込み及びエラー割込みのいずれの割込み処理を検出しなかった場合、LINの通信制御プログラムの実行状態に異常(状態固着によるデータ送信不可)が発生し、車載装置1は異常であると判定する。すなわち、車載装置1の制御部11は、LINの通信制御プログラムを実行するプロセスが例えばハング状態となり、ソフトウェア処理における状態固着が発生してデータ送信が不可となっており、送信完了割込み及びエラー割込みのいずれの割込み処理も発生しなかったと判定する。 If the control unit 11 of the in-vehicle device 1 does not detect either a transmission completion interrupt or an error interrupt, an abnormality occurs in the execution state of the LIN communication control program (data cannot be sent due to a stuck state), and the in-vehicle device Device 1 is determined to be abnormal. In other words, the control unit 11 of the in-vehicle device 1 is unable to send data due to a hang state in the process that executes the LIN communication control program, a stuck state in software processing, and a transmission completion interrupt and an error interrupt. It is determined that none of the interrupt processing has occurred.
 車載装置1の制御部11は、制御部11の初期化を行う(S1033)。車載装置1の制御部11は、通信部13の初期化を行う(S1034)。車載装置1の制御部11は、制御部11の初期化として、例えば、LINの通信制御プログラムの再起動、制御部11自体の再起動、又は、通信部13含む車載装置1自体の再起動を行う。車載装置1の制御部11は、これら各リセット(再起動)を段階的に行うものであってもよい。車載装置1の制御部11は、ソフトウェア的リセット(初期化)、ハードウェア的リセット(初期化)又は、ソフトウェア及びハードウェアの双方のリセット(初期化)を行うものであってもよい。車載装置1の制御部11は、制御部11の初期化を行った上で、もしくは当該初期化と同時に、通信部13の初期化を行うものであってもよい。本処理(S1034)における通信部13の初期化は、S105と同様の処理であってもよい。制御部11の初期化の一例として記載した車載装置1自体の再起動が、制御部11及び通信部13の双方の初期化を含むものである場合、これらS1033及びS1034の処理は、実質的に同じタイミングで行われるものとなる。 The control unit 11 of the in-vehicle device 1 initializes the control unit 11 (S1033). The control unit 11 of the in-vehicle device 1 initializes the communication unit 13 (S1034). The control unit 11 of the in-vehicle device 1 initializes the control unit 11 by restarting the LIN communication control program, restarting the control unit 11 itself, or restarting the in-vehicle device 1 itself including the communication unit 13, for example. conduct. The control unit 11 of the in-vehicle device 1 may perform each of these resets (restarts) in stages. The control unit 11 of the in-vehicle device 1 may perform software reset (initialization), hardware reset (initialization), or both software and hardware reset (initialization). The control unit 11 of the in-vehicle device 1 may initialize the communication unit 13 after initializing the control unit 11 or simultaneously with the initialization. The initialization of the communication unit 13 in this process (S1034) may be the same process as S105. If the restart of the in-vehicle device 1 itself described as an example of initialization of the control unit 11 includes initialization of both the control unit 11 and the communication unit 13, the processes of S1033 and S1034 are performed at substantially the same timing. It will be held in
 このような初期化を行うことにより、例えば極めて小さい不具合ウィンドウ等にて、すなわち比較的に短い期間となる処理単位期間において、複数の処理が重なったことにより発生した偶発的な動作不良により、LIN通信が不通となり、車載ECU2に接続されるワイパー等のアクチュエータ(車載負荷3)等、車両C機能が動作しなくなった場合でも、復旧することができる。車載装置1の制御部11は、制御部11の初期化を行った日時等を含む履歴情報を、記憶部12に記憶するものであってもよい。車載装置1の制御部11は、S1033の処理の実行後、再度S101からの処理を実行すべく、ループ処理を行う。 By performing this kind of initialization, for example, in an extremely small defect window, that is, in a processing unit period that is a relatively short period, an accidental malfunction that occurs due to overlapping multiple processes can cause the LIN to fail. Even if communication is interrupted and vehicle C functions such as actuators (on-vehicle loads 3) such as wipers connected to the on-vehicle ECU 2 stop operating, recovery is possible. The control unit 11 of the in-vehicle device 1 may store history information including the date and time when the control unit 11 was initialized in the storage unit 12. After executing the process of S1033, the control unit 11 of the vehicle-mounted device 1 performs a loop process to execute the process from S101 again.
 今回開示された実施形態は全ての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。 The embodiments disclosed herein are illustrative in all respects and should not be considered restrictive. The scope of the present invention is indicated by the scope of the claims, not the meaning described above, and is intended to include meanings equivalent to the scope of the claims and all changes within the scope.
 C 車両 
 S 車載システム
 1 車載装置(LINマスター)
 11 制御部
 12 記憶部
 M 記録媒体
 P プログラム(プログラム製品)
 13 通信部(LINトランシーバ)
 2 車載ECU(LINスレーブ)
 3 車載負荷
 4 通信線(LINバス)
 
C Vehicle
S In-vehicle system 1 In-vehicle device (LIN master)
11 Control unit 12 Storage unit M Recording medium P Program (program product)
13 Communication department (LIN transceiver)
2 In-vehicle ECU (LIN slave)
3 On-vehicle load 4 Communication line (LIN bus)

Claims (6)

  1.  車両に搭載され、LINの通信プロトコルを用いて車載ECUと通信可能に接続される車載装置であって、
     前記車載ECUとの通信に関する制御を行う制御部を備え、
     前記制御部は、
     前記車載ECUへのデータの送信後に発生する割込み処理を検出し、
     前記検出結果に基づき、前記車載ECUとの通信が正常に行われているか否かを判定する
     車載装置。
    An in-vehicle device installed in a vehicle and communicably connected to an in-vehicle ECU using a LIN communication protocol,
    comprising a control unit that controls communication with the in-vehicle ECU,
    The control unit includes:
    detecting an interrupt process that occurs after data is transmitted to the in-vehicle ECU;
    An in-vehicle device that determines whether communication with the in-vehicle ECU is being performed normally based on the detection result.
  2.  前記割込み処理は、送信完了割込みと、エラー割込みとを含み、
     前記制御部は、
     前記送信完了割込みを検出した場合、前記車載ECUとの通信は正常であると判定し、
     前記送信完了割込み及び前記エラー割込みのいずれの割込み処理を検出しなかった場合、前記車載ECUとの通信は異常であると判定し、
     前記制御部の初期化処理を行う
     請求項1に記載の車載装置。
    The interrupt processing includes a transmission completion interrupt and an error interrupt,
    The control unit includes:
    If the transmission completion interrupt is detected, determining that communication with the in-vehicle ECU is normal;
    If neither the transmission completion interrupt nor the error interrupt processing is detected, determining that the communication with the in-vehicle ECU is abnormal;
    The in-vehicle device according to claim 1, wherein the in-vehicle device performs initialization processing of the control unit.
  3.  前記車載ECUへのデータの送信は、所定の送信周期にて行われ、
     前記制御部は、前記送信周期に基づく所定の期間にて、前記送信完了割込み及び前記エラー割込みのいずれの割込み処理を検出しなかった場合、前記車載ECUとの通信は異常であると判定する
     請求項2に記載の車載装置。
    Transmission of data to the in-vehicle ECU is performed at a predetermined transmission cycle,
    The control unit determines that communication with the in-vehicle ECU is abnormal if it does not detect any of the transmission completion interrupt and the error interrupt during a predetermined period based on the transmission cycle. The in-vehicle device according to item 2.
  4.  前記車載ECUとの通信は、LINバスを介して行われ、
     前記LINバスが接続される通信部を備え、
     前記制御部は、
     前記エラー割込みを検出した場合、前記車載ECUとの通信は異常であると判定し、
     前記通信部の初期化処理を行う
     請求項2又は請求項3に記載の車載装置。
    Communication with the in-vehicle ECU is performed via a LIN bus,
    comprising a communication unit to which the LIN bus is connected,
    The control unit includes:
    If the error interrupt is detected, determining that communication with the in-vehicle ECU is abnormal;
    The in-vehicle device according to claim 2 or 3, wherein the in-vehicle device performs initialization processing of the communication unit.
  5.  車両に搭載され、LINの通信プロトコルを用いて車載ECUと通信可能に接続され、前記車載ECUとの通信に関する制御を行うコンピュータに、
     前記車載ECUへのデータの送信後に発生する割込み処理を検出し、
     前記検出結果に基づき、前記車載ECUとの通信が正常に行われているか否かを判定する
     処理を実行させる情報処理方法。
    A computer installed in a vehicle, communicably connected to an in-vehicle ECU using a LIN communication protocol, and controlling communication with the in-vehicle ECU;
    detecting an interrupt process that occurs after data is transmitted to the in-vehicle ECU;
    An information processing method that executes a process of determining whether communication with the in-vehicle ECU is being performed normally based on the detection result.
  6.  車両に搭載され、LINの通信プロトコルを用いて車載ECUと通信可能に接続され、前記車載ECUとの通信に関する制御を行うコンピュータに、
     前記車載ECUへのデータの送信後に発生する割込み処理を検出し、
     前記検出結果に基づき、前記車載ECUとの通信が正常に行われているか否かを判定する
     処理を実行させるプログラム。
     
    A computer installed in a vehicle, communicably connected to an in-vehicle ECU using a LIN communication protocol, and controlling communication with the in-vehicle ECU;
    detecting an interrupt process that occurs after data is transmitted to the in-vehicle ECU;
    A program that executes a process of determining whether communication with the in-vehicle ECU is being performed normally based on the detection result.
PCT/JP2023/009483 2022-03-25 2023-03-13 In-vehicle device, program, and information processing method WO2023182020A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022050510A JP2023143241A (en) 2022-03-25 2022-03-25 On-vehicle device, program and information processing method
JP2022-050510 2022-03-25

Publications (1)

Publication Number Publication Date
WO2023182020A1 true WO2023182020A1 (en) 2023-09-28

Family

ID=88101402

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/009483 WO2023182020A1 (en) 2022-03-25 2023-03-13 In-vehicle device, program, and information processing method

Country Status (2)

Country Link
JP (1) JP2023143241A (en)
WO (1) WO2023182020A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009214830A (en) * 2008-03-12 2009-09-24 Fujitsu Ten Ltd Device, method and system for controlling power generation
JP2014099698A (en) * 2012-11-13 2014-05-29 Toyota Motor Corp Communication system, communication node, and communication method
JP2016126716A (en) * 2015-01-08 2016-07-11 株式会社デンソー Electronic control device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009214830A (en) * 2008-03-12 2009-09-24 Fujitsu Ten Ltd Device, method and system for controlling power generation
JP2014099698A (en) * 2012-11-13 2014-05-29 Toyota Motor Corp Communication system, communication node, and communication method
JP2016126716A (en) * 2015-01-08 2016-07-11 株式会社デンソー Electronic control device

Also Published As

Publication number Publication date
JP2023143241A (en) 2023-10-06

Similar Documents

Publication Publication Date Title
US9251632B2 (en) Vehicle diagnostic system
CN108427609B (en) Controller and control program update method
JP2010285001A (en) Electronic control system and functional agency method
US6076172A (en) Monitoting system for electronic control unit
JP2002158668A (en) Abnormality detector of network system for vehicle
JP4509200B2 (en) Network system
JP2011022934A (en) Electronic control unit and method for detecting failure
JP6207987B2 (en) In-vehicle electronic control unit
US9875166B2 (en) Method for operating a data processing unit of a driver assistance system and data processing unit
EP3761568B1 (en) Method of controlling communication over a local interconnect network bus
US20220055637A1 (en) Electronic control unit and computer readable medium
Suwatthikul Fault detection and diagnosis for in-vehicle networks
CN110147090A (en) Controller Area Network BUS closing fault processing method and system
WO2023182020A1 (en) In-vehicle device, program, and information processing method
WO2023223940A1 (en) In-vehicle device, program, and information processing method
US20090177890A1 (en) Method and Device for Forming a Signature
JP4013592B2 (en) Vehicle communication system
US10963354B2 (en) Control apparatus and recovery processing method for control apparatus
JP4820679B2 (en) Electronic control device for vehicle
WO2020217928A1 (en) Electronic control device
JP2015112962A (en) Information processing apparatus
JP7504222B2 (en) In-vehicle control systems
JP3397496B2 (en) Multiplex transmission system
WO2021106353A1 (en) Electronic control device
JP7391242B2 (en) Control device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23772754

Country of ref document: EP

Kind code of ref document: A1