CN115480790A - Method and device for remotely upgrading firmware of electronic control unit - Google Patents

Method and device for remotely upgrading firmware of electronic control unit Download PDF

Info

Publication number
CN115480790A
CN115480790A CN202110661560.1A CN202110661560A CN115480790A CN 115480790 A CN115480790 A CN 115480790A CN 202110661560 A CN202110661560 A CN 202110661560A CN 115480790 A CN115480790 A CN 115480790A
Authority
CN
China
Prior art keywords
control unit
electric control
power supply
whole vehicle
controlling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110661560.1A
Other languages
Chinese (zh)
Inventor
陈彦伶
盛冬
欧阳文慧
黄丰标
陈艳子
王万荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SAIC Motor Corp Ltd
Original Assignee
SAIC Motor Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SAIC Motor Corp Ltd filed Critical SAIC Motor Corp Ltd
Priority to CN202110661560.1A priority Critical patent/CN115480790A/en
Publication of CN115480790A publication Critical patent/CN115480790A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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
    • B60R16/0231Circuits relating to the driving or the functioning of the vehicle

Abstract

The application discloses a method and a device for remotely upgrading firmware of an electric control unit, wherein the method comprises the following steps: after the upgrade main control unit checks that the vehicle meets the upgrade condition, the whole vehicle is informed to be in the FOTA mode; when the target electric control unit is a type of electric control unit, the upgrading main control unit sends a signal for closing a relay for controlling the power supply mode of the whole vehicle to the electric control unit for controlling the power supply mode of the whole vehicle; when the target electric control unit is the second-class electric control unit, the upgrading main control unit sends a signal of no-relay request to the electric control unit for controlling the power supply mode of the whole vehicle, namely, a relay for controlling the power supply mode of the whole vehicle is not required to be closed; and the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file packet and upgrades the firmware for the target electronic control unit. The firmware of the first-class electric control unit and the firmware of the second-class electric control unit are remotely upgraded when the power supply mode of the whole vehicle is OFF by changing the on/OFF state of a relay for controlling the power supply mode of the whole vehicle.

Description

Method and device for remotely upgrading firmware of electronic control unit
Technical Field
The application relates to the technical field of equipment upgrading, in particular to a method and a device for remotely upgrading firmware of an electronic control unit.
Background
Along with the continuous development and revolution of the automobile industry, the automobile electronization degree is higher and higher, the number of nodes of some automobile electric control units is up to 80, the code quantity of the whole automobile is over 1 hundred million lines, and the difficulty in controlling various performances of the automobile is gradually increased. When the performance of the automobile electric control unit is in fault or the electric control unit needs to be updated and upgraded, the corresponding electric control unit needs to be refreshed and upgraded in a 4S shop before through an interface of an on-board self-diagnosis system (OBD) of the whole automobile. The existing FOTA technology, namely the firmware over-the-air upgrading technology, does not need to refresh the electric control unit from a 4S shop, and can remotely download the upgrading file package of the electric control unit in a cloud upgrading mode, so that the updating and upgrading of the firmware of the electric control unit are realized, and the functions of the system are optimized iteratively.
In the design of the FOTA technical scheme, the upgrade safety of the vehicle is considered, the vehicle is ensured to be kept static, and meanwhile, the electric quantity loss of the whole vehicle in the upgrade process is reduced, so that the upgrade of the electric control unit (namely the vehicle ignition switch is in an OFF position) is realized under the condition that the power supply mode of the whole vehicle is kept OFF in the FOTA technical scheme. The second type of electric control unit of the automobile has a network awakening function, and CAN realize CAN network communication and support firmware upgrading when the power mode of the whole automobile is OFF. However, in the conventional automotive electronic architecture, part of the electronic control units in the power domain and the chassis domain are similar to each other, and have no network wake-up function, and only when the power mode of the entire vehicle meets the KL15 power supply, firmware upgrade of the similar electronic control units is supported, that is, the power mode of the entire vehicle needs to be switched to ON. Therefore, the current FOTA technical scheme cannot support the upgrade of the whole vehicle electric control unit, and when one type of electric control unit is upgraded, a user needs to switch the power mode of the whole vehicle into ON to meet the requirement of KL15 power supply.
Disclosure of Invention
The embodiment of the application provides a method for remotely upgrading firmware of an electric control unit, so that firmware upgrading of a target electric control unit is realized when the power mode of a whole vehicle is OFF.
In a first aspect, an embodiment of the present application provides a method for remotely upgrading firmware of an electronic control unit, where the method includes:
after the upgrade main control unit checks that the vehicle meets the upgrade condition, the whole vehicle is informed to be in the FOTA mode;
when the target electric control unit is a type of electric control unit, the upgrading main control unit sends a signal for closing a relay for controlling the whole vehicle power supply mode to the electric control unit for controlling the whole vehicle power supply mode, so that the electric control unit for controlling the whole vehicle power supply mode closes the relay for controlling the whole vehicle power supply mode; when the target electric control unit is a second-class electric control unit, the upgrading main control unit sends a signal of no-relay request to the electric control unit for controlling the power supply mode of the whole vehicle;
the upgrading main control unit starts an FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on the target electronic control unit;
the first type of electric control unit is an electric control unit without a network awakening function, and the second type of electric control unit is an electric control unit with a network awakening function.
In some possible embodiments, the method further comprises:
when the whole vehicle is in the FOTA mode, the electric control unit for controlling the power mode of the whole vehicle keeps the power mode OFF and forbids switching of the power mode.
In some possible embodiments, the method further comprises:
after receiving a signal that the whole vehicle is in an FOTA mode and the relay for controlling the power supply mode of the whole vehicle is closed, the vehicle-mounted gateway electric control unit GW delays for a signal period and sets the power modes of the power CAN and the chassis CAN to RUN.
In some possible embodiments, the method further comprises:
when the target electric control unit is a type of electric control unit, the electric control unit for controlling the power supply mode of the whole vehicle feeds back a response result of whether the relay for controlling the power supply mode of the whole vehicle is successfully closed or not to the upgrading main control unit;
and when the target electric control unit is the second-class electric control unit, the electric control unit for controlling the power supply mode of the whole vehicle feeds back a response result of whether the relay-free request signal is successfully sent or not to the upgrading main control unit.
In some possible embodiments, the method further comprises:
and if the electric control unit controlling the power supply mode of the whole vehicle does not feed back a message of successful response to the upgrading main control unit within two seconds, judging that the FOTA request task fails.
In some possible embodiments, the method further comprises:
and when the target electric control unit is a type of electric control unit, the upgrading main control unit sends a signal for releasing a relay for controlling the power supply mode of the whole vehicle to the electric control unit for controlling the power supply mode of the whole vehicle.
In some possible embodiments, the method further comprises:
after receiving a signal that the whole vehicle exits the FOTA mode and releases the relay for controlling the power supply mode of the whole vehicle, the vehicle-mounted gateway electric control unit GW delays for a signal period and sets the power modes of the power CAN and the chassis CAN to be OFF.
In some possible embodiments, the method further comprises:
after the target electric control unit finishes firmware upgrading, if the electric control unit for controlling the power mode of the whole vehicle does not receive a signal for exiting the FOTA mode within preset time, the electric control unit actively executes the operation of switching the power mode when the power mode is allowed to be OFF, and if the target electric control unit is an electric control unit of the same type, if the electric control unit for controlling the power mode of the whole vehicle does not receive a signal for releasing the relay for controlling the power supply mode of the whole vehicle within the calibration time, the relay for controlling the power supply mode of the whole vehicle is actively released.
In some possible embodiments, the method further comprises:
and after the upgrade main control unit informs the whole vehicle to exit the FOTA mode, the electric control unit controlling the power mode of the whole vehicle switches the power mode when the power mode is allowed to be OFF.
In a second aspect, an embodiment of the present application provides an apparatus for remotely upgrading firmware by an electronic control unit, where the apparatus includes:
the sending module is used for informing the whole vehicle of being in an FOTA mode and sending a signal for closing/releasing a relay for controlling the power supply mode of the whole vehicle to an electric control unit for controlling the power supply mode of the whole vehicle;
and the upgrading module is used for starting the FOTA engine to analyze the downloaded upgrading file package and upgrading the firmware of the target electronic control unit.
In the implementation manner provided by the embodiment of the application, after the vehicle meets the upgrade condition, the upgrade main control unit notifies the whole vehicle to be in the FOTA mode, and prepares for remotely upgrading the firmware for the target electronic control unit. When the target electric control unit is a type of electric control unit, the upgrading main control unit sends a signal for closing a relay for controlling the whole vehicle power supply mode to the electric control unit for controlling the whole vehicle power supply mode so as to control the electric control unit for controlling the whole vehicle power supply mode to close the relay for controlling the whole vehicle power supply mode; when the target electric control unit is the second-class electric control unit, the upgrading main control unit sends a signal of a relay-free request to the electric control unit for controlling the power supply mode of the whole vehicle; and the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on the target electronic control unit.
By changing the on/OFF state of the relay for controlling the whole vehicle power supply mode, the firmware of the target electric control unit is upgraded when the power supply mode of the whole vehicle is OFF, a user does not need to switch the power supply mode, and the user experience is optimized. When the whole vehicle is in the FOTA mode, switching of a power supply mode is prohibited to change the on/off state of the relay, and firmware upgrading of a target electronic control unit is prevented from being damaged. When the target electric control unit is a type of electric control unit, the vehicle-mounted gateway electric control unit GW sets the power modes of the power CAN and the chassis CAN as RUN, reduces diagnostic fault codes DTC for reporting inconsistency of network signals of a power hard wire and the power modes, and has less influence on the electric control unit.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of the position of an automobile ignition switch in the embodiment of the application;
fig. 2 is a flowchart of a method for remotely upgrading firmware of an electronic control unit according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for remotely upgrading firmware of an electronic control unit according to another embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a remote firmware upgrade of an electronic control unit according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for remotely upgrading firmware of an electronic control unit according to another embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for remotely upgrading firmware of an electronic control unit according to another embodiment of the present application;
FIG. 7 is a flowchart of a method for completing an upgrade task of an electronic control unit according to an embodiment of the present application;
FIG. 8 is a flowchart of a method for completing an upgrade task for an electronic control unit according to another embodiment of the present application;
FIG. 9 is a timing diagram illustrating a remote firmware upgrade of an electronic control unit according to an embodiment of the present application;
FIG. 10 is a flowchart illustrating a method for remotely upgrading firmware of an electronic control unit according to another embodiment of the present application;
fig. 11 is a structural diagram of an apparatus for remotely upgrading firmware of an electronic control unit according to an embodiment of the present application.
Detailed Description
When firmware of an electric control unit of an automobile is upgraded by the FOTA technology, the power mode of the whole automobile needs to be kept OFF, and at the moment, only the KL30 power supply mode is adopted, power can be supplied to the second type of electric control unit with the network awakening function, so that the second type of electric control unit can remotely upgrade the firmware when the power mode of the whole automobile is OFF. Only when the power mode of the whole vehicle meets the power supply of KL15, the firmware can be refreshed and upgraded by one type of electric control unit, so that the current FOTA technical scheme cannot support the upgrade of the whole electric control unit, and the firmware can be upgraded by switching the power mode of the whole vehicle to ON by a user and meeting the power supply of KL 15.
Based on this, the embodiment of the application provides a method for remotely upgrading firmware of an electronic control unit, which can realize remote upgrading of the firmware of a target electronic control unit when a power supply mode of a whole vehicle is OFF, wherein the target electronic control unit can be a first-class electronic control unit or a second-class electronic control unit, and a user does not need to switch the power supply mode. Specifically, after the whole vehicle meets the upgrade precondition, the upgrade main control unit notifies the whole vehicle to be in the FOTA mode, and the firmware of the target electronic control unit is prepared to be upgraded remotely. When the target electric control unit is a type of electric control unit, the upgrading main control unit sends a signal for closing a relay for controlling the whole vehicle power supply mode to the electric control unit for controlling the whole vehicle power supply mode so as to control the electric control unit for controlling the whole vehicle power supply mode to close the relay for controlling the whole vehicle power supply mode; when the target electric control unit is the second-class electric control unit, the upgrading main control unit sends a signal of a relay-free request to the electric control unit for controlling the power supply mode of the whole vehicle; and the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on the target electronic control unit. The firmware of the first-class electric control unit and the firmware of the second-class electric control unit are remotely upgraded when the power supply mode of the whole vehicle is OFF by changing the on/OFF state of the relay for controlling the power supply mode of the whole vehicle without switching the power supply mode by a user.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and the described embodiments are only exemplary embodiments of the present application, and not all implementations. Those skilled in the art can combine the embodiments of the present application to obtain other embodiments without inventive work, and these embodiments are also within the scope of the present application.
Generally, an ignition switch of an automobile has four positions, which are shown in fig. 1, and includes an OFF/OFF position, an auxiliary/ACC position, a running/ON position, and a START/START position, and the ignition switch includes a push-button switch, a rotary switch, etc., and the position of the ignition switch can generate five power supply modes of the whole automobile, which are mainly used for supplying power to the automobile and can also be used as a network wake-up line and a signal line, and the corresponding relationship between the ignition switch position and the power supply modes of the automobile is shown in table 1, and the power supply modes of KL30 and KL15 are set forth in the embodiment of the present application.
TABLE 1 ignition switch position and Power supply mode relationship
OFF/OFF Assist/ACC run/ON Start/START
Power supply KL30 Is provided with Is provided with Is provided with Is provided with
Auxiliary power supply KLR Is free of Is provided with Is provided with Is free of
Time-delay auxiliary power supply RAP Is free of Is provided with Is provided with Is free of
Operation power supply KL15 Is free of Is free of Is provided with Is provided with
Starting power supply Crank Is free of Is free of Is free of Is provided with
The KL30 power supply system is directly connected to a battery, and is a main power supply system in an automobile. The power supply mode is generally used for power supply of an electric control unit with a network wake-up function and power supply of a whole vehicle connected to a sensor, an actuator and the like of the electric control unit, and an electronic controller can generate quiescent current in the power supply mode. As CAN be seen from Table 1, when the power mode of the entire vehicle is OFF, namely the ignition switch is in the OFF position, the KL30 is provided for supplying power at the time, and the second type of electric control unit is an electric control unit with a network wake-up function, so that CAN network communication CAN be maintained in a KL30 power supply mode to realize firmware upgrading.
The KL15 power supply mode is indirectly connected with a battery, provides KL15 power supply when the key is in the running position, and is a secondary power supply mode on the automobile. The power supply mode is generally used for power supply of an electric control unit without a network awakening function and power supply of a whole vehicle without a sensor, an actuator and the like connected to the electric control unit, and in the power supply mode, static current cannot be generated by electronic and electric parts. Because firmware upgrading can be realized only when the KL15 supplies power to one type of electric control unit, and only the KL30 supplies power when the power mode of the whole vehicle is OFF, in the existing FOTA technical scheme, a user is required to cooperate to switch the power mode of the whole vehicle to ON so as to provide a KL15 power supply mode.
The vehicle end upgrading in the existing FOTA technical scheme is an end-to-end upgrading mode realized by an upgrading main control unit on an electric control unit of a vehicle, when a target electric control unit is a second-class electric control unit, main basic steps executed by the upgrading main control unit are shown in fig. 2, fig. 2 shows a basic flow of firmware upgrading on the electric control unit of the vehicle by the existing FOTA technology, and the method specifically comprises the following steps:
s201: inquiring version information of a target electronic control unit;
s202: after the communication with the Internet of vehicles platform, downloading the upgrade file package of the target electronic control unit;
s203: displaying an upgrade prompt when the vehicle is flamed out, and informing a user of the content of the upgrade and the concerned matters such as the need of keeping the vehicle still during the upgrade;
s204: checking an upgrade condition of the vehicle;
s205: starting an FOTA engine to analyze the downloaded upgrade file packet of the target electric control unit and carrying out firmware upgrade on the target electric control unit;
s206: and after the target electronic control unit is restarted, inquiring the version information of the target electronic control unit again, and judging the upgrading result.
If the upgraded electric control unit is the first-class electric control unit, firstly, a user is required to cooperate to switch the power supply mode of the whole vehicle to ON, and the KL15 is satisfied to supply power, so that the first-class electric control unit can be upgraded. The principle of upgrading the first type of electric control unit by utilizing the FOTA technology is the same as that of upgrading the second type of electric control unit, and the details are not repeated here. The user operation is additionally needed, the willingness of the user to upgrade actively is reduced, the risk in the upgrading process is brought when the power mode of the whole vehicle is ON, and if the user carelessly switches the power mode or starts the vehicle in the upgrading process, the FOTA upgrading is likely to fail.
Therefore, the embodiment of the application provides a method for remotely upgrading firmware of an electric control unit, which can upgrade a first-class electric control unit and a second-class electric control unit of a whole vehicle through an FOTA technology under the condition that the power supply mode of the whole vehicle is kept OFF. In the embodiment of the present application, a KL15 relay is taken as an example to describe a relay for controlling a power supply mode of a whole vehicle, which is not limited to the protection range of the present application, and other relays capable of controlling the power supply mode of the whole vehicle are also within the protection range of the present application. Referring to fig. 3, a flowchart of a method for remotely upgrading firmware by an electronic control unit is shown, where the method specifically includes the following steps:
s301: the upgrade main control unit checks the upgrade condition of the vehicle, and if the upgrade condition is satisfied, performs step S302; otherwise, ending the FOTA process;
before upgrading the electronic control unit using FOTA technology, it is necessary to check whether the vehicle meets the upgrade conditions, which include: the power mode of the whole vehicle is OFF, the current vehicle speed is 0, the gear of the vehicle is in N/P gear and the engine is in a non-starting state. And when the vehicle meets the upgrading condition, the FOTA technical scheme is continuously executed, and if the vehicle does not meet the upgrading condition, the FOTA process is directly ended.
S302: the upgrading main control unit informs the whole vehicle of being in the FOTA mode;
s303: judging whether the target electric control unit is a type of electric control unit, if so, jumping to a step S304, and then executing a step S306; if not, jumping to step S305, and then continuing to execute step S306;
s304: the upgrading main control unit sends a signal for closing the KL15 relay to an electric control unit for controlling the power supply mode of the whole vehicle so as to control the electric control unit for controlling the power supply mode of the whole vehicle to pull up the KL15 relay to close the same;
s305: the upgrading main control unit sends a signal of a relay-free request to an electric control unit for controlling the power mode of the whole vehicle, namely the KL15 relay does not need to be closed;
when the target electric control unit is the first-class electric control unit, the upgrading main control unit sends a signal for closing the KL15 relay to the electric control unit for controlling the power supply mode of the whole vehicle, and the electric control unit for controlling the power supply mode of the whole vehicle pulls up the KL15 relay to close the same, so that the KL15 power supply mode is met, and firmware upgrading of the first-class electric control unit is supported. When the target electric control unit is the second-class electric control unit, the upgrading main control unit sends a signal of no-relay request to the electric control unit for controlling the power supply mode of the whole vehicle, namely, the KL15 relay does not need to be closed. On the premise of not changing the power supply mode of the whole vehicle, the state of the KL15 relay is changed by controlling the electric control unit in the power supply mode of the whole vehicle, so that the power supply requirement of the upgrading target electric control unit is met.
S306: and the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on the target electronic control unit.
After the power supply mode of the target electronic control unit is met, the upgrade master control unit can analyze the upgrade file packet and upgrade the firmware of the target electronic control unit.
Because the power mode of the whole vehicle needs to be kept OFF in the whole process of upgrading the electric control unit by the FOTA technology, if a user carelessly switches the power mode in the upgrading process, the upgrading of the electric control unit can be failed, preferably, when the whole vehicle is in the FOTA mode, the electric control unit for controlling the power mode of the whole vehicle can be utilized to forbid the switching of the power mode when the power mode of the whole vehicle is kept OFF, and thus, the upgrading failure of a target electric control unit caused by the fact that the user operates a power supply gear in the whole FOTA upgrading process can be avoided.
In the implementation manner provided by the embodiment of the application, referring to fig. 4, the basic principle of firmware upgrade of the automobile electronic control unit by using the FOTA technology is utilized, and after the upgrade main control unit is communicated with the internet of vehicles platform, the upgrade file package of the target electronic control unit can be downloaded. And after the vehicle is checked to meet the upgrading condition, the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file packet of the target electric control unit, and firmware upgrading is carried out on the target electric control unit.
In the FOTA upgrading process, the upgrading main control unit needs to send a signal for closing/releasing the KL15 relay to the electric control unit for controlling the finished vehicle power supply mode so as to control the electric control unit for controlling the finished vehicle power supply mode to close/release the KL15 relay and change the finished vehicle power supply mode, so that the electric control unit for controlling the finished vehicle power supply mode can feed back a response result of the FOTA task request to the upgrading main control unit, for example, when a target electric control unit is a type of electric control unit, the upgrading main control unit needs to send a signal for closing the KL15 relay to the electric control unit for controlling the finished vehicle power supply mode so as to control the electric control unit for controlling the finished vehicle power supply mode to close the KL15 relay, at this time, after the electric control unit for controlling the finished vehicle power supply mode closes the KL15 relay, the FOTA task request response success message can be fed back to the upgrading main control unit, and if the electric control unit for controlling the finished vehicle power supply mode does not feed back a response success message to the upgrading main control unit within two seconds, the FOTA task request failure is determined, and the FOTA process is ended; on the other hand, if the electric control unit controlling the power supply mode of the whole vehicle feeds back a response failure message to the upgrade main control unit, the FOTA process is ended. Similarly, when the target electric control unit is the second-class electric control unit, the upgrading main control unit sends a signal without a relay request to the electric control unit for controlling the power mode of the whole vehicle, after the electric control unit for controlling the power mode of the whole vehicle sends the operation without the relay request, the electric control unit feeds back a message that the response of the FOTA task request is successful to the upgrading main control unit, if the electric control unit for controlling the power mode of the whole vehicle does not feed back the message that the response is successful to the upgrading main control unit within two seconds, the FOTA task request is judged to be failed, and the FOTA process is ended; on the other hand, if the electronic control unit controlling the vehicle power supply mode feeds back a message of response failure to the upgrade main control unit, the FOTA process is ended. Referring to fig. 5, a flowchart of a method provided in an embodiment of the present application specifically includes the following steps:
s501: the upgrade main control unit checks the upgrade condition of the vehicle, and if the upgrade condition is satisfied, performs step S502; otherwise, ending the FOTA process;
the upgrade condition of the vehicle includes: the power mode of the whole vehicle is OFF, the current vehicle speed is 0, the gear of the vehicle is N/P gear, and the engine is in a non-starting state. And when the vehicle meets the upgrading condition, the FOTA technical scheme is continuously executed, and if the vehicle does not meet the upgrading condition, the FOTA process is directly ended.
S502: the upgrading main control unit informs the whole vehicle of being in the FOTA mode;
s503: judging whether the target electric control unit is a type of electric control unit, if so, jumping to a step S504, and then executing a step S506; if not, jumping to step S505, and then continuing to execute step S506;
s504: the upgrade main control unit sends a signal for closing the KL15 relay to an electric control unit for controlling the power supply mode of the whole vehicle so as to control the electric control unit for controlling the power supply mode of the whole vehicle to pull up the KL15 relay to close the same;
s505: the upgrading main control unit sends a signal of a relay-free request to an electric control unit for controlling the power mode of the whole vehicle, namely the KL15 relay does not need to be closed;
s506: the electric control unit controlling the power supply mode of the whole vehicle feeds back a message whether the FOTA task request is successfully responded to the upgrade main control unit, and if so, the step S507 is executed; otherwise, ending the FOTA process;
s507: and the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on the target electronic control unit.
When firmware of one type of electric control unit is upgraded, the KL15 relay needs to be closed to meet the requirement of power supply of the KL15, and because a strategy for detecting whether a power supply hard wire is matched with a network signal exists in a plurality of electric control units, when the KL15 relay is closed and the power supply mode of the whole vehicle is OFF, a diagnosis fault code DTC with inconsistent power supply hard wire and network signals is possibly reported, and at the moment, the electric control unit needs to be modified. During specific implementation, after the GW receives signals that the whole vehicle is in an FOTA mode and closes the KL15 relay, the power mode of the power CAN and the power mode of the chassis CAN are set to RUN after delaying for one signal period, and DTC of inconsistency of power reporting hard lines and network signals is reduced. In the embodiment of the present application, the period of the signal sent by the GW is 100ms, and referring to fig. 6, a flowchart of a method for remotely upgrading firmware for a type of electronic control unit is shown, where the method specifically includes the following steps:
s601: the upgrade main control unit checks the upgrade condition of the vehicle, and if the upgrade condition is satisfied, performs step S602; otherwise, ending the FOTA process;
the upgrade condition of the vehicle includes: the power mode of the whole vehicle is OFF, the current vehicle speed is 0, the gear of the vehicle is in N/P gear and the engine is in a non-starting state. And when the vehicle meets the upgrading condition, the FOTA technical scheme is continuously executed, and if the vehicle does not meet the upgrading condition, the FOTA process is directly ended.
S602: the upgrading main control unit informs the whole vehicle of being in the FOTA mode;
s603: the upgrading main control unit sends a signal for closing the KL15 relay to an electric control unit for controlling the power supply mode of the whole vehicle so as to control the electric control unit for controlling the power supply mode of the whole vehicle to pull up the KL15 relay to close the same;
because the target electric control unit is a type of electric control unit, the main control unit needs to be upgraded to send a signal for closing the KL15 relay to the electric control unit for controlling the power supply mode of the whole vehicle, and the electric control unit for controlling the power supply mode of the whole vehicle pulls up the KL15 relay to close the same, so that the KL15 is supplied with power, and the firmware upgrade of the type of electric control unit is supported.
S604: after the GW receives a signal that the whole automobile is in an FOTA mode and closes the KL15 relay, delaying 100ms to set the power supply modes of the power CAN and the chassis CAN to RUN;
after the master control unit is upgraded to send signals for closing the KL15 relays, the electric control unit controlling the power mode of the whole vehicle CAN delay the KL15 relays for a certain time, and the period for sending the signals by the electric control unit is 100ms, so the GW needs to delay 100ms to set the power modes of the power CAN and the chassis CAN to be RUN, the power hard line signals and the power mode network signals of the electric control units at the moment are kept consistent, and the risk of reporting DTC is reduced.
S605: the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on one type of electric control unit.
If the target electronic control unit in the upgrading task has one type of electronic control unit, the implementation method provided by the embodiment of the application is to set the power mode of the power CAN and the chassis CAN to RUN by using GW, so that the risk of DTC with inconsistent power reporting hard line and network signal is reduced. In practical application, the power supply modes of the power CAN and the chassis CAN are not changed, and after the whole vehicle exits the FOTA mode, the upgrading main control unit immediately sends a request for clearing the DTC to all the electric control units with inconsistent DTCs, and the electric control units are not required to be modified. However, after the upgrading main control unit sends a request for clearing the DTC, there is also a risk that the controller cannot respond to the request for clearing the DTC, and in addition, the electronic control units mounted on different vehicle models are different, so that the DTC of the clearing target electronic control unit is different, the code consistency of the upgrading main control unit is poor, and the operation of clearing the DTC has certain complexity.
After the target electronic control unit finishes firmware upgrading, a user can normally use the automobile only after the whole automobile exits the FOTA task. When the target electric control unit is a type of electric control unit, the upgrade main control unit informs the whole vehicle to exit the FOTA mode, and informs the electric control unit controlling the power supply mode of the whole vehicle to release a KL15 relay; when the target electronic control unit is a second-class electronic control unit, only the whole vehicle needs to be informed to exit the FOTA mode, and then the whole FOTA process is ended, and a specific implementation method is shown in fig. 7, which shows a flow chart of a method for exiting the FOTA upgrade task after the target electronic control unit finishes firmware upgrade, and the method specifically comprises the following steps:
s701: the upgrading main control unit finishes the firmware upgrading of the target electric control unit;
s702: the upgrading main control unit informs the whole vehicle to exit the FOTA mode;
s703: judging whether the target electric control unit is a type of electric control unit or not, if so, judging whether the target electric control unit is a type of electric control unit or not; step S704 is executed; otherwise, skipping to execute step S705;
s704: the upgrading main control unit sends a signal for releasing the KL15 relay to an electric control unit for controlling the power supply mode of the whole vehicle;
s705: and ending the FOTA task.
In the technical method provided by the above embodiment of the application, since the power mode of the entire vehicle needs to be kept OFF in the process of upgrading the electronic control unit by the FOTA technology, if a user carelessly switches the power mode in the upgrading process, the upgrading of the electronic control unit may fail, when the entire vehicle is in the FOTA mode, the electronic control unit controlling the power mode of the entire vehicle may be used, and the power mode is prohibited to be switched when the power mode of the entire vehicle is kept OFF, so that the problem that the upgrading of the target electronic control unit fails due to the fact that the user operates the power gear in the whole FOTA upgrading process can be avoided. According to the technical scheme of the embodiment, after the target electronic control unit finishes firmware upgrading, the upgrading main control unit informs the whole vehicle to exit the FOTA mode, at the moment, the electronic control unit controlling the electric mode of the whole vehicle forbids switching when the power mode of the whole vehicle needs to be released and is OFF, and a user is allowed to switch the power mode to normally use the vehicle.
For the method shown in the embodiment of fig. 6, because the target electronic control unit is a type of electronic control unit, the KL15 relay needs to be closed to meet the power supply of the KL15, the type of electronic control unit can be upgraded, and many electronic control units have a strategy for detecting whether the power supply hard line and the network signal are matched, when the KL15 relay is closed and the power supply mode of the whole vehicle is OFF, a diagnostic fault code DTC with inconsistent power supply hard line and network signal is likely to be reported, at this time, the network signal of the power supply mode can be forwarded in a delayed manner through the vehicle gateway electronic control unit GW, and the risk of reporting the DTC is reduced. After receiving signals that the whole vehicle is in an FOTA mode and the KL15 relay is closed, the GW sets the power mode of the power CAN and the power mode of the chassis CAN to RUN after delaying for 100ms, and DTC of inconsistency of power reporting hard lines and network signals is reduced. Therefore, after the firmware upgrade of one type of electronic control unit is completed, after the GW receives the signal of exiting the FOTA mode and releasing the KL15 relay, it needs to delay 100ms to set the power modes of the power CAN and the chassis CAN to OFF, and then the whole FOTA task is ended, the flowchart of the method is shown in fig. 8, and specifically includes the following steps:
s801: the upgrading main control unit finishes the firmware upgrading of one type of electric control unit;
s802: the upgrading main control unit informs the whole vehicle to exit the FOTA mode;
s803: the upgrading main control unit sends a signal for releasing the KL15 relay to an electric control unit for controlling the power supply mode of the whole vehicle;
s804: after receiving signals of exiting the FOTA mode and releasing the KL15 relay, GW delays 100ms and sets the power modes of the power CAN and the chassis CAN to be OFF;
after an electric control unit for controlling the power mode of the whole vehicle receives a signal for releasing the KL15 relay, the KL15 relay is released for a certain time delay, so that the GW needs to delay 100ms and then sets the power modes of the power CAN and the chassis CAN to be OFF, and the consistency of a power hard wire and a network signal is kept.
S805: and ending the FOTA task.
When the whole vehicle is in the FOTA mode, if the electronic control unit controlling the whole vehicle power supply mode does not receive a request signal for quitting the FOTA mode within a preset time due to the communication fault of the whole vehicle and the like, the electronic control unit controlling the whole vehicle power supply mode actively quits the FOTA mode. If the target electric control unit is a type of electric control unit, the electric control unit for controlling the power supply mode of the whole vehicle does not receive a signal for releasing the KL15 relay within the preset time, and the electric control unit for controlling the power supply mode of the whole vehicle also needs to actively release the KL15 relay.
In addition, according to the scheme provided by the above embodiment, when the entire vehicle is in the FOTA mode, the electronic control unit controlling the power mode of the entire vehicle may keep the power mode OFF and prohibit switching, so if the electronic control unit controlling the power mode of the entire vehicle does not receive a request signal for exiting the FOTA mode over a predetermined time, the electronic control unit controlling the power mode of the entire vehicle actively exits the FOTA mode, and allows the power mode to switch the power mode OFF.
For each embodiment provided by the present application, a complete timing chart of the whole FOTA technical scheme can be known, as shown in fig. 9, the execution state of the actual KL15 relay has a certain delay.
As an example, the technical solution of the embodiment of the present application will be described below with reference to a specific application scenario, in which a target electronic control unit is a type of electronic control unit, and when a whole vehicle is in a FOTA mode, an electronic control unit controlling a power mode of the whole vehicle keeps the power mode OFF and prohibits switching of the power mode, and a specific method flow refers to fig. 10, where the method specifically includes the following steps:
s1001: the upgrade main control unit checks the upgrade condition of the vehicle, and if the upgrade condition is satisfied, the step S1002 is executed; otherwise, ending the FOTA process;
before upgrading the electronic control unit using FOTA technology, it is necessary to check whether the vehicle meets the upgrade conditions, which include: the power mode of the whole vehicle is OFF, the current vehicle speed is 0, the gear of the vehicle is in N/P gear and the engine is in a non-starting state. And step S1002 is executed continuously when the vehicle meets the upgrade condition, and if the vehicle does not meet the upgrade condition, the FOTA process is directly ended.
S1002: the upgrading main control unit informs the whole vehicle of being in the FOTA mode;
s1003: the upgrading main control unit sends a signal for closing the KL15 relay to an electric control unit for controlling the power supply mode of the whole vehicle so as to control the electric control unit for controlling the power supply mode of the whole vehicle to pull up the KL15 relay to close the same;
s1004: after the GW receives a signal that the whole automobile is in an FOTA mode and closes the KL15 relay, delaying 100ms to set the power supply modes of the power CAN and the chassis CAN to RUN;
s1005: the electric control unit controlling the power supply mode of the whole vehicle feeds back a message whether the FOTA task request is successfully responded to the upgrading main control unit, and if so, the step S1006 is executed; otherwise, ending the FOTA process; the FOTA task request comprises keeping a power supply mode OFF and forbidding switching of the power supply mode, and closing a KL15 relay;
s1006: the upgrading main control unit starts the FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on one type of electric control unit.
It should be noted that the above application scenario is only one example of a scenario applied in the embodiment of the present application, and is not limited to this scenario.
In addition, an embodiment of the present application provides an apparatus for remotely upgrading firmware of an electronic control unit, referring to fig. 11, where fig. 11 shows a schematic structural diagram of the apparatus, and the apparatus 1100 specifically includes:
a sending module 1101, configured to notify that the entire vehicle is in the FOTA mode, and send a signal for closing/releasing a relay that controls a power supply mode of the entire vehicle to an electronic control unit that controls a power supply mode of the entire vehicle;
and the upgrading module 1102 is used for starting the FOTA engine to analyze the downloaded upgrading file package and upgrading the firmware of the target electronic control unit.
Each embodiment in this specification focuses on differences from other embodiments, and similar parts between the embodiments may be referred to each other, and especially for the device embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and related parts may be referred to the part of the method embodiment. The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to implement the solution of the present embodiment.
The foregoing is illustrative of the present application and is not to be construed as limiting thereof in any way. Equivalent changes or modifications of the above embodiments are within the scope of the present application.

Claims (10)

1. A method for remotely upgrading firmware by an electronic control unit, the method comprising:
after the upgrade main control unit checks that the vehicle meets the upgrade condition, the whole vehicle is informed to be in the FOTA mode;
when the target electric control unit is a type of electric control unit, the upgrading main control unit sends a signal for closing a relay for controlling the whole vehicle power supply mode to the electric control unit for controlling the whole vehicle power supply mode, so that the electric control unit for controlling the whole vehicle power supply mode closes the relay for controlling the whole vehicle power supply mode; when the target electric control unit is a second-class electric control unit, the upgrading main control unit sends a signal of no-relay request to the electric control unit for controlling the power supply mode of the whole vehicle;
the upgrading main control unit starts an FOTA engine to analyze the downloaded upgrading file package and carries out firmware upgrading on the target electronic control unit;
the first-class electric control unit is an electric control unit without a network awakening function, and the second-class electric control unit is an electric control unit with a network awakening function.
2. The method of claim 1, further comprising:
when the whole vehicle is in the FOTA mode, the electric control unit for controlling the power supply mode of the whole vehicle keeps the power supply mode OFF and forbids switching of the power supply mode.
3. The method of claim 1, further comprising:
after receiving a signal that the whole vehicle is in an FOTA mode and the relay for controlling the power supply mode of the whole vehicle is closed, the vehicle-mounted gateway electric control unit GW delays for a signal period and sets the power modes of the power CAN and the chassis CAN to RUN.
4. The method of claim 1, further comprising:
when the target electric control unit is a type of electric control unit, the electric control unit for controlling the power supply mode of the whole vehicle feeds back a response result of whether the relay for controlling the power supply mode of the whole vehicle is successfully closed or not to the upgrading main control unit;
and when the target electric control unit is the second-class electric control unit, the electric control unit for controlling the power supply mode of the whole vehicle feeds back a response result of whether the relay-free request signal is successfully sent or not to the upgrading main control unit.
5. The method of claim 4, further comprising:
and if the electric control unit controlling the power supply mode of the whole vehicle does not feed back a message of successful response to the upgrading main control unit within two seconds, judging that the FOTA request task fails.
6. The method of claim 1, further comprising:
when the target electric control unit finishes firmware upgrading, the upgrading main control unit informs the whole vehicle to exit the FOTA mode, and when the target electric control unit is a type of electric control unit, the upgrading main control unit sends a signal for releasing a relay for controlling the power supply mode of the whole vehicle to the electric control unit for controlling the power supply mode of the whole vehicle.
7. The method of claim 6, further comprising:
after receiving a signal that the whole vehicle exits the FOTA mode and releases the relay for controlling the power supply mode of the whole vehicle, the vehicle-mounted gateway electric control unit GW delays for a signal period and sets the power modes of the power CAN and the chassis CAN to be OFF.
8. The method of claim 1, further comprising:
after the target electric control unit finishes firmware upgrading, if the electric control unit controlling the power supply mode of the whole vehicle does not receive a signal of exiting the FOTA mode within preset time, the electric control unit actively executes the operation of switching the power supply mode when the power supply mode is allowed to be OFF, and if the target electric control unit is a type of electric control unit, the electric control unit controlling the power supply mode of the whole vehicle actively releases the relay controlling the power supply mode of the whole vehicle if the electric control unit controlling the power supply mode of the whole vehicle does not receive a signal of releasing the relay controlling the power supply mode of the whole vehicle within a set time.
9. The method of claim 1, further comprising:
and after the upgrade main control unit informs the whole vehicle to exit the FOTA mode, the electric control unit controlling the power mode of the whole vehicle switches the power mode when the power mode is allowed to be OFF.
10. An apparatus for remotely upgrading firmware by an electronic control unit, the apparatus comprising:
the sending module is used for informing the whole vehicle of being in an FOTA mode and sending a signal for closing/releasing a relay for controlling the power supply mode of the whole vehicle to an electric control unit for controlling the power supply mode of the whole vehicle;
and the upgrading module is used for starting the FOTA engine to analyze the downloaded upgrading file package and upgrading the firmware of the target electronic control unit.
CN202110661560.1A 2021-06-15 2021-06-15 Method and device for remotely upgrading firmware of electronic control unit Pending CN115480790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110661560.1A CN115480790A (en) 2021-06-15 2021-06-15 Method and device for remotely upgrading firmware of electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110661560.1A CN115480790A (en) 2021-06-15 2021-06-15 Method and device for remotely upgrading firmware of electronic control unit

Publications (1)

Publication Number Publication Date
CN115480790A true CN115480790A (en) 2022-12-16

Family

ID=84420069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110661560.1A Pending CN115480790A (en) 2021-06-15 2021-06-15 Method and device for remotely upgrading firmware of electronic control unit

Country Status (1)

Country Link
CN (1) CN115480790A (en)

Similar Documents

Publication Publication Date Title
US11163549B2 (en) Vehicle information communication system
US10592231B2 (en) Vehicle information communication system
JP6519708B2 (en) CONTROL DEVICE, PROGRAM UPDATE METHOD, AND COMPUTER PROGRAM
US10915310B2 (en) Control apparatus, program updating method, and computer program
JP6566144B2 (en) Control device, control method, and computer program
US11061659B2 (en) Control apparatus, transfer method, and computer program
CN105691330A (en) telematics update software compatibility
US11704104B2 (en) Control apparatus, control method, and computer program
CN110753905B (en) Control device, control method, and computer program
JP6620891B2 (en) Relay device, relay method, and computer program
US20190256109A1 (en) Control apparatus, control method, and computer program
US11579865B2 (en) Vehicle information communication system
WO2018230084A1 (en) Updating control device, control method, and computer program
US11416237B2 (en) Control apparatus, control method, and computer program
CN115480790A (en) Method and device for remotely upgrading firmware of electronic control unit
JP7367630B2 (en) Server, software update device, vehicle, software update system, method and program
US20240086174A1 (en) Vehicular electronic control device and update program
US20230256983A1 (en) Vehicle controller, vehicle control method and recording medium
WO2023063068A1 (en) In-vehicle device, program, and method for updating program
WO2018189951A1 (en) Relay device, relay method, and computer program
CN116668432A (en) Vehicle OTA method taking performance test into consideration and storage medium
CN116610335A (en) Vehicle control device, vehicle control method, and recording medium
CN117992083A (en) Mobile terminal and software updating system
CN117793084A (en) Mobile terminal and software distribution system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination