Summary of the invention
For solving the problems referred to above, the invention provides the update method of a kind of Vehicle Controller and update system
Uniting, this update method and renewal system can solve the problems referred to above, and system connected mode is simple.
For achieving the above object, the present invention provides following technical scheme:
The update method of a kind of Vehicle Controller, described Vehicle Controller includes: main control chip and monitoring
Chip, described update method includes:
After host computer sets up communication connection with described Vehicle Controller, described main control chip obtains by described
The first instruction that host computer generates;
Described first instruction is sent to described monitoring chip by described main control chip;
Described monitoring chip wipes mounted program to be updated according to described first instruction;
When, after described program erasure completion to be updated, described monitoring chip generates the first feedback information;
Described main control chip obtains described first feedback information, and described first feedback information is sent to institute
State host computer;After described host computer receives described first feedback information, issue to described main control chip
Installation data;
Described main control chip obtains described installation data, and described installation data is sent to described monitoring core
Sheet;
Described monitoring chip is according to the set-mounted target program of described installation data.
Preferably, in above-mentioned update method, described foundation at host computer and described Vehicle Controller communicates
After connection, described main control chip obtains the first instruction generated by described host computer and includes:
It is communicatively coupled by CAN between described host computer and described Vehicle Controller, described master
Control chip obtains the first instruction generated by described host computer by described CAN.
Preferably, in above-mentioned update method, described main control chip is obtained by institute by described CAN
The first instruction stating host computer generation includes:
After setting up communication connection between described host computer and described Vehicle Controller, described main control chip and institute
Stating monitoring chip and enter loading mode, described host computer generates described first instruction, and described main control chip leads to
Cross described CAN and obtain described first instruction.
Preferably, in above-mentioned update method, described first instruction is sent to described by described main control chip
Monitoring chip includes:
Described first instruction is sent to described monitoring chip by SPI communication mode by described main control chip.
Preferably, in above-mentioned update method, described installation data is the S19 literary composition that described host computer generates
Part, described issues installation when described host computer receives the described first backward described main control chip of feedback information
Data include:
Described S19 is issued when described host computer receives the described first backward described main control chip of feedback information
File.
Preferably, in above-mentioned update method, when described monitoring chip installs described target program, institute
State host computer and obtain the described target program of expression that described monitoring chip is fed back by described main control chip in real time
The renewal progress msg of installation progress, when described monitoring chip completes, described host computer generates the second instruction;
Described update method also includes:
Described main control chip obtains described second instruction by described CAN;
Described second instruction is sent to described monitoring chip by described main control chip;
Described monitoring chip shuts down procedure renewal according to described second instruction, and generates the second feedback information;
Described main control chip obtains described second feedback information, and described second feedback information is sent to institute
State host computer;
Generate for pointing out described monitoring chip complete after described host computer receives described second feedback information
Become the information updated.
Present invention also offers a kind of renewal system, for performing the update method described in any of the above-described item,
Described renewal system includes: Vehicle Controller and host computer, and described Vehicle Controller includes: master control core
Sheet and monitoring chip;
Described main control chip, after generating described first instruction at described host computer, obtains from described host computer
Taking the first instruction, described first instruction is sent to described monitoring chip, described first instruction is used for controlling
Described monitoring chip wipes mounted program to be updated;
When, after described program erasure completion to be updated, described host computer is obtained by institute by described main control chip
State the first feedback information that monitoring chip generates, issue installation data to described main control chip;
Wherein, described installation data is issued to described monitoring chip, described monitoring by described main control chip
Chip is according to the set-mounted target program of described installation data.
Preferably, in above-mentioned renewal system, described host computer is by CAN and described main control chip
Connect.
Preferably, in above-mentioned renewal system, enter loading at described main control chip with described monitoring chip
After pattern, described host computer generates described first instruction.
Preferably, in above-mentioned renewal system, described main control chip is led to by SPI with described monitoring chip
Letter mode carries out data interaction.
Preferably, in above-mentioned renewal system, described host computer is additionally operable to install institute at described monitoring chip
When stating target program, described host computer obtains what described monitoring chip was fed back by described main control chip in real time
Represent the renewal progress msg of described target program installation progress, on described monitoring chip completes, be described
Position machine generates the second instruction;Described second instruction is sent to described main control chip by described main control chip,
Shut down procedure renewal for controlling described monitoring chip, and generate the second feedback information;
After described host computer obtains described second feedback information, described host computer is additionally operable to generate for carrying
Show that described monitoring chip completes the information updated.
By foregoing description, the update method of the Vehicle Controller that the present invention provides, described vehicle-mounted control
Device processed includes: main control chip and monitoring chip, it is characterised in that described update method includes: upper
After position machine sets up communication connection with described Vehicle Controller, described main control chip obtains and is given birth to by described host computer
The first instruction become;Described first instruction is sent to described monitoring chip by described main control chip;Described prison
Control chip wipes mounted program to be updated according to described first instruction;When described program to be updated is wiped
After completing, described monitoring chip generates the first feedback information;Described main control chip obtains described first feedback
Information, and described first feedback information is sent to described host computer;When described host computer receives described
After first feedback information, issue installation data to described main control chip;Described main control chip obtains described peace
Dress data, and described installation data is sent to described monitoring chip;Described monitoring chip is according to described peace
The target program that dress data are set-mounted.
By foregoing description, when using described update method that monitoring chip is updated, host computer
And it is mutual to carry out information by main control chip between monitoring chip, it is only necessary to host computer is carried out with main control chip
Communicating to connect, this update method connected mode is simple.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out
Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and
It is not all, of embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing
Go out the every other embodiment obtained under creative work premise, broadly fall into the scope of protection of the invention.
According to background technology, when Vehicle Controller is updated by prior art, need main control chip
Being communicatively coupled with host computer respectively with monitoring chip, system connected mode is complicated.
In order to solve the problems referred to above, embodiments provide the update method of a kind of Vehicle Controller,
This update method includes:
After host computer sets up communication connection with described Vehicle Controller, described main control chip obtains by described
The first instruction that host computer generates;
Described first instruction is sent to described monitoring chip by described main control chip;
Described monitoring chip wipes mounted program to be updated according to described first instruction;
When, after described program erasure completion to be updated, described monitoring chip generates the first feedback information;
Described main control chip obtains described first feedback information, and described first feedback information is sent to institute
State host computer;After described host computer receives described first feedback information, issue to described main control chip
Installation data;
Described main control chip obtains described installation data, and described installation data is sent to described monitoring core
Sheet;
Described monitoring chip is according to the set-mounted target program of described installation data.
By foregoing description, use update method described in the embodiment of the present invention that monitoring chip is carried out more
Time new, carry out information by main control chip between host computer and monitoring chip mutual, it is only necessary to host computer and
Main control chip is communicatively coupled, and this update method connected mode is simple.
For the more detailed explanation embodiment of the present invention, below in conjunction with the accompanying drawings the embodiment of the present invention is carried out
Specifically describe.
The flow process of the update method of a kind of Vehicle Controller that reference Fig. 1, Fig. 1 provide for the embodiment of the present application
Schematic diagram.
Step S11: after host computer sets up communication connection with described Vehicle Controller, described main control chip obtains
The first instruction generated by described host computer.
Wherein, it is communicatively coupled by CAN between described host computer and described Vehicle Controller,
Described main control chip enters loading mode with described monitoring chip, and described host computer generates described first instruction,
Described main control chip obtains described first instruction by described CAN.Described main control chip and described prison
After control chip all has to enter into loading mode, just can carry out the renewal of program, if the most described master
Control chip enters loading mode, then can not be updated described monitoring chip, if the most described monitoring
Chip enters loading mode, then can not be updated described monitoring chip.
Described main control chip enters loading mode and includes: described host computer asks the entrance of described main control chip to add
Load pattern, after described main control chip enters loading mode, and returns correct order to described host computer
After, just can proceed program, otherwise program stopped.
After described main control chip enters loading mode, described monitoring chip enters loading mode and includes: institute
Stating host computer asks described monitoring chip to enter loading mode, when described main control chip and described monitoring chip
After all entering loading mode, after described main control chip and described monitoring chip all return correct order,
Program, otherwise program stopped can be proceeded.
Wherein, described host computer asks described monitoring chip entrance loading mode to include: described upper prow
First needing to be sent to request command described main control chip, described request command is sent out by described main control chip again
Give described monitoring chip.
Described monitoring chip returns correct order and includes: first correctly order is sent to by described monitoring chip
Described main control chip, described correct order is sent to described host computer by described main control chip again.
The loading mode that described main control chip enters with described monitoring chip is Bootloader pattern.
Step S12: described first instruction is sent to described monitoring chip by described main control chip.
Described first instruction is sent to described monitoring chip by SPI communication by described main control chip.
Step S13: described monitoring chip wipes mounted program to be updated according to described first instruction.
Step S14: when, after described program erasure completion to be updated, described monitoring chip generates the first feedback letter
Breath.
Step S15: described main control chip obtains described first feedback information, and by described first feedback information
It is sent to described host computer;When described host computer receives the described first backward described master control core of feedback information
Sheet issues installation data.
Described installation data is the S19 file that described host computer generates.
Step S16: described main control chip obtains described installation data, and described installation data is sent to institute
State monitoring chip.
The S19 file received is sent to described monitoring by the way of SPI communication by described main control chip
Chip.
Step S17: described monitoring chip is according to the set-mounted target program of described installation data.
In the embodiment of the present invention, when described monitoring chip installs described target program, described host computer is real
Time obtain described monitoring chip and represent described target program installation progress by what described main control chip fed back
Updating progress msg, when described monitoring chip completes, described host computer generates the second instruction;Described renewal
Method also includes:
Described main control chip obtains described second instruction by described CAN.
Described second instruction is sent to described monitoring chip by described main control chip.
Described monitoring chip shuts down procedure renewal according to described second instruction, and generates the second feedback information.
Described main control chip obtains described second feedback information, and described second feedback information is sent to institute
State host computer.
Generate for pointing out described monitoring chip complete after described host computer receives described second feedback information
Become the information updated.
So far, the described monitoring chip in described Vehicle Controller has updated.
By foregoing description, when using described update method that monitoring chip is updated, host computer
And it is mutual to carry out information by main control chip between monitoring chip, it is only necessary to host computer is carried out with main control chip
Communicating to connect, this update method connected mode is simple.
Based on above-mentioned update method, another embodiment of the present invention additionally provides a kind of renewal system, this renewal
System includes:
Vehicle Controller and host computer, described Vehicle Controller includes: main control chip and monitoring chip;
Described main control chip, after generating described first instruction at described host computer, obtains from described host computer
Taking the first instruction, described first instruction is sent to described monitoring chip, described first instruction is used for controlling
Described monitoring chip wipes mounted program to be updated;
When, after described program erasure completion to be updated, described host computer is obtained by institute by described main control chip
State the first feedback information that monitoring chip generates, issue installation data to described main control chip;
Wherein, described installation data is issued to described monitoring chip, described monitoring by described main control chip
Chip is according to the set-mounted target program of described installation data.
Described host computer is additionally operable to when described monitoring chip installs described target program, and described host computer is real
Time obtain described monitoring chip and represent described target program installation progress by what described main control chip fed back
Updating progress msg, when described monitoring chip completes, described host computer generates the second instruction;Described second
Instruction is sent to described main control chip by described main control chip, is used for controlling described monitoring chip and stops journey
Sequence updates, and generates the second feedback information;
After described host computer obtains described second feedback information, described host computer is additionally operable to generate for carrying
Show that described monitoring chip completes the information updated.
For the more detailed explanation embodiment of the present invention, below in conjunction with the accompanying drawings the embodiment of the present invention is carried out
Specifically describe.
System construction drawing with reference to a kind of Vehicle Controller that Fig. 2, Fig. 2 provide for the embodiment of the present application.
This system includes: host computer 20, CAN card 21, Vehicle Controller 22;Wherein, described vehicle-mounted
Controller 22 includes: main control chip and monitoring chip.
Wherein, described host computer 20 is computer, such as: computer, and industrial computer etc..It is mainly used for user
Operate.In the embodiment of the present application, user can operate described host computer 20 can be to described monitoring core
Sheet carries out program renewal.
Described CAN card 21 is to send the data of coming for receiving described host computer 20, and to receiving
Data are changed, and the data received are converted to CAN data, described CAN data are sent out afterwards
Deliver in CAN.
Wherein, described host computer 20 is connected with described main control chip by CAN, described master control core
Sheet and described monitoring chip carry out data interaction by SPI communication mode.
By foregoing description, when using described renewal system that monitoring chip is updated, host computer
And it is mutual to carry out information by main control chip between monitoring chip, it is only necessary to host computer is carried out with main control chip
Communicating to connect, this update method connected mode is simple.
It should be noted that described renewal system is based on above-mentioned update method, identical similarity can phase
Supplementary notes mutually.
Described above to the disclosed embodiments, makes professional and technical personnel in the field be capable of or uses
The present invention.Multiple amendment to these embodiments will be aobvious and easy for those skilled in the art
See, generic principles defined herein can without departing from the spirit or scope of the present invention,
Realize in other embodiments.Therefore, the present invention is not intended to be limited to the embodiments shown herein,
And it is to fit to the widest scope consistent with principles disclosed herein and features of novelty.