CN107678771A - A kind of method for optimizing battery management system online upgrading - Google Patents

A kind of method for optimizing battery management system online upgrading Download PDF

Info

Publication number
CN107678771A
CN107678771A CN201710994608.4A CN201710994608A CN107678771A CN 107678771 A CN107678771 A CN 107678771A CN 201710994608 A CN201710994608 A CN 201710994608A CN 107678771 A CN107678771 A CN 107678771A
Authority
CN
China
Prior art keywords
data
ecu
transmission
program
frame
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
CN201710994608.4A
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.)
Wuxi Jiwei New Energy Co Ltd
Original Assignee
Wuxi Jiwei New Energy Co 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 Wuxi Jiwei New Energy Co Ltd filed Critical Wuxi Jiwei New Energy Co Ltd
Priority to CN201710994608.4A priority Critical patent/CN107678771A/en
Publication of CN107678771A publication Critical patent/CN107678771A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/24Resetting means
    • 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
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3013Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of method for optimizing battery management system online upgrading, which includes multiframe data transfer and encapsulation, the diagnosis of pre-programming phase, programming phases realization, software general frame, the design of software and test and interpretation of result;Because the new-energy automobile industry development time is short, a specification is not yet formed to the software upgrading of battery bag internal controller, battery management system producer develops the Bootloader based on CAN accordingly according to oneself master and slave control controller, realizes on-line software updating.The beneficial effects of the invention are as follows:Self-defined communications protocol is abandoned, using international, the ISO15765 agreements based on CAN, makes communication more stable, and meet the demand of versatility;Upgrade function is embedded into the inline diagnosis function of battery management system based on ISO15765 diagnostic datas communication protocol, realizes upgrading, the integration of diagnostic system, networking;The sequential control and flow control that transmitting message is standardized in escalation process, improve the reliability of message transmissions.

Description

A kind of method for optimizing battery management system online upgrading
Technical field
The present invention relates to the mode of online upgrading, more particularly to a kind of method for optimizing battery management system online upgrading.
Background technology
Existing technical parameter and standard have lacked, also BMS (the battery management systems without authoritative institution to manufacturer production System) authoritative detection is carried out, this is the quagmire in current domestic BMS markets, result in the very different of BMS products, it is difficult to large area Promote.Meanwhile many automobile vendors domestic at present and battery PACK enterprises are insufficient for BMS understanding of importance, as long as thinking Each cell core can be chained, it is ensured that vehicle is run, its security is left things to chance, in BMS buyings simply Low price is pursued, to ask the signing of contract, some bad BMS suppliers only reduce BMS functional parameters or simply castrate part Function, so as to bury potential safety hazard, this is also the irresponsibility and injury to whole industry.Unified industry is only established as early as possible Standard, the manufacturer for not meeting market demands is suppressed, establish sound detection architecture, battery management system and new-energy automobile are The future of sustainable development can be possessed, this is also all multi-vendor and demand of consumer.
The content of the invention
The purpose of the present invention is to develop a kind of energy to realize upgrading, the integration of diagnostic system, the battery management of networking The mode of system online upgrading.
The present invention technical solution be:A kind of method for optimizing battery management system online upgrading, the optimization electricity The mode of pond management system online upgrading includes:Multiframe data transfer and encapsulation, the diagnosis of pre-programming phase, programming phases are real The existing, design of software general frame, software and test and interpretation of result.
Preferably, the multiframe data transfer includes with encapsulation process:
Host computer reads S19 files (recordable paper), by S-Record document analysis into Hex files;Based on ISO15765 Data transfer rule, the data of transmission by the way of PC ends host computer is transmitted using multiframe, will be solved more than 6 or 7 bytes The data in HEX files after analysis are divided into multiframe transmission, the first frame (FF) are sent first, after being controlled by flow control (FC) The each traffic volume and time interval of continuous frame (CF), having sequence number to each CF frames, (0 arrives F numbering cycles, first next number Except for 1);FF defines the maximum length of data, and slave (master controller) is verified according to the length of data, verifies data Integrality, feed back corresponding DTC;Data transfer rule according to ISO15765 greatly improve message order and Accuracy;
More frame data encapsulate packing algorithm:Statistics will send the size databyte of amount of bytes first, then calculate frame number Frame_Amount is measured, if not integer takes its integer value to add one again;Next circulation packing number is calculated, if not integer, Its value rounds adds one again;Transmission message is started the cycle over, and records and cycles through number, a cycle has been sent and counting is subtracted one, Sent at one in the cycle, record the counting per frame message, often send a frame, record number adds one, until record number is added to 16, one Individual end cycle, into next transmission cycle, cycle through, until it is that 0 i.e. data are sent to cycle through record number;
The mode transmitted according to multiframe, the first frame can only carry the data of 6 bytes, and subsequent frame carries the number of 7 bytes According to, then need pack frame quantity following manner calculate:
Frame_Amount=(databyte+1)/7
Using 0-F, as cycle period, the calculation formula for carrying out circulation packing number is totally 16 frame data:
Fcycnum=(databyte+1)/(16*7)
Fcycnum=(databyte+1)/(16*7)+1.
Preferably, the diagnosis process of the pre-programming phase includes:
Pre-programming phase in program renewal process is the preparation to programming phases, to enter extension in this stage Conversation modes terminate the detection to DTC, terminate the communication etc. of normal message, to ensure normally entering for program downloads stage OK;
It is as follows that pre-programming phase diagnostic service holds step:
Step 1, mode of extension request (02 10 03) is sent, sending method is functional addressing, makes to own in battery bag ECU enters under mode of extension, because being given instructions by telegraph on ECU mono- under default mode, needs to enter row mode to ECU this moment and redirects, jumps Go to the diagnostic service such as executive termination DTC under mode of extension;
Step 2, diagnosis online service (0 2 3E 80), this design, which uses, to be sent once every 3S to ensure that ECU is in Non-default pattern, Normal Diagnosis session is maintained, if ECU does not receive diagnosis message in 5 seconds, ECU will recall to default mode automatically;
Step 3, which is sent, terminates DTC setting services (02 85 10) so that ECU stops detecting DTC, prevention in bag Unusual failure code produces under deagnostic communication mode again;
Step 4, Control on Communication service request (03 28 00 01) is carried out, for terminating proper communication, ensured under data Transmission rate during load is to avoid being disturbed.
Preferably, the programming phases implementation process includes:
Programming phases will primarily make ECU enter programming conversation modes, then could carry out subsequent download work to ECU unblocks Make;Three sections of programs are mainly downloaded, download erasing program first, write-in program is being downloaded, is finally downloading application program;End of transmission The data transmitted are verified, ECU resetted afterwards finally;The execution step of diagnostic service in programming phases is such as Under:
Step 1, programming mode session request (02 10 02) so that ECU enters under programming mode, can enter under line program Service is carried, still host computer online service is sent every 3s to maintain diagnostic session pattern under this pattern;
Step 2, secure access service perform (27), and ECU is under safeguard protection state, need to unlock the same ability Carry out data download;
Step 3, request download (the * * * * * * of * * * * 34 00 33), inform that ECU will send the initial address of data With data volume size, required initial address is now taken out from S19 files, and calculate the data total amount to be sent
Data are transmitted by step 4, transmission data (the * * of * * * * 36) according to host-host protocol, should now be incited somebody to action The application layer data to be sent in S19 files adds transport layer protocol control information in case packing transmission;
Step 5, (01 37) are exited in request transmission, after the completion of transmitting data transfer, to be sent request transmission and be exited clothes Transmission is exited in business;
Step 6, ECU reset (02 11 01), and download program simultaneously resets after verifying successfully to ECU.
Preferably, the software general frame process includes:
Slave computer software is mainly made up of application layer and FBL layers (Bootloader) two parts;FBL, which is used to update, to be applied Layer, its code focus primarily on code protection area, because FBL is placed on code protection area, ensure that code is never destroyed, FBL is needed To be solidificated in by BDM in FLASH;Application layer is used to deposit application layer program, and writing with a brush dipped in Chinese ink instrument by FBL and host computer is carried out more Newly;It can ensure user during application layer code is updated by using this software architecture, occur resetting suddenly, power During the abnormal and abnormal conditions such as upper computer software Communications failure, the erasable mistakes of Flash, the ECU in battery bag will not be locked, Software is updated after re-powering by host computer to remain to continue to update application layer code;
FBL layers mainly include hardware initialization, internal memory mapping, host-host protocol, Flash erasable, diagnostic service and locking etc. Function;
Diagnostic horizon:All download dependent diagnostic services, it is as shown in the table;
Transport layer:ISO15765-2 transport layer protocols;
Drive layer:The CAN drivings of minimum, all bottom hardware relevant portions, Flash Driver interface;
Preferably, the design process of the software includes:
Software memory maps:Using FreeScale MC9S12XET256 microcontrollers, Bootloader should be placed on by In the Flash of protection, but not all Flash can set protection, so being typically placed in 0xc000~0xfeff sections It is interior;
ROM_C000=READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFF0F;
PAGE_FE=READ_ONLY DATA_FAR IBCC_FAR 0xFE8000 TO 0xFEBFFF;
APPL_VECT_TABLE_SEG=READ_ONLY 0x007F10 TO 0x007FFF;
ROM_VEC_TABLE=READ_ONLY 0xFF10 TO 0xFFFF;
RAM_CPU=READ_WRITE 0x2000 TO 0x39FF;
USERSTACK=NO_INIT 0x3A00 TO 0x3FFF.
ECU workflows:
Step 1, flow is initialized, after ECU resets, before main program is called, into Start12.c source files.Perform Initialization function, the operation of completion empty ram space, and initialization data is copied to RAM etc. from ROM;
Step 2, electrifying startup flow, ECU it is upper electricity or reset after, first carry out some basic initialization operations, further according to External programming request is whether there is to determine to enter Bootloader or application program.One wait timer is set, in wait In the case that timer is not timed-out, if receiving Stay-In-Boot CAN Message, ECU is rested on In Bootloader;If wait timer are expired, and application program is effective, then into application program.Can so have Effect avoids occurring surprisingly leading to not brush news again during more new procedures, ensure that the stability of program;
Step 3, major cycle flow, after ECU enters Bootloader, global variable waitTime is set, enters receive every time Hair interrupts subtracts 1 by waitTime, and waitTime value is constantly detected in for circulations of main program, if zero, is then jumped to Application program launching address, otherwise continue to detect in CAN network whether there is data receivable.In order to ensure the data in CAN network Can completely it receive, waitTime is set very big by the design, is arranged to 5000;
Program writes with a brush dipped in Chinese ink flow instance:
Preferably, the test and interpretation of result process include:
The Bootloader of realization is burnt in FreeScale MC9S12XET256 single-chip microcomputers with BDM programming tools. Sent by host computer and write " * .s19 " files, data flow being sent in single-chip microcomputer by CAN network, and run for completion. Multiple burning does not occur the situation of loss of data, can intactly decode the data flow of host computer transmission, and after burning Application program can be successfully downloaded, application program energy normal work, can also continue the diagnosis request of response PC ends host computer.
The beneficial effects of the invention are as follows:Self-defined communications protocol is abandoned, using international, based on CAN ISO15765 agreements, make communication more stable, and meet the demand of versatility;Based on ISO15765 diagnostic data communication protocols Upgrade function is embedded into the inline diagnosis function of battery management system, realizes upgrading, the integration of diagnostic system, network Change;The sequential control and flow control that transmitting message is standardized in escalation process, improve the reliability of message transmissions.
Brief description of the drawings
Fig. 1 is that host computer of the present invention downloads flow chart.
Fig. 2 is the first frame data transmission figure of the invention.
Fig. 3 is the transmission figure of flow control frames of the present invention.
Fig. 4 is the transmission figure of subsequent frame of the present invention.
Fig. 5 is the test data frame figure that the present invention encapsulates.
Fig. 6 is slave computer software Organization Chart of the present invention.
Fig. 7 is FBL Organization Charts of the present invention.
Embodiment
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 clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
Refer to shown in Fig. 1-7, a kind of method for optimizing battery management system online upgrading, optimization battery management system exists The mode of line upgrading includes:Multiframe data transfer is realized with encapsulation, the diagnosis of pre-programming phase, programming phases, software totality frame Structure, the design of software and test and interpretation of result.
Preferably, multiframe data transfer includes with encapsulation process:
Host computer reads S19 files (recordable paper), by S-Record document analysis into Hex files;Based on ISO15765 Data transfer rule, the data of transmission by the way of PC ends host computer is transmitted using multiframe, will be solved more than 6 or 7 bytes The data in HEX files after analysis are divided into multiframe transmission, the first frame (FF) are sent first, after being controlled by flow control (FC) The each traffic volume and time interval of continuous frame (CF), having sequence number to each CF frames, (0 arrives F numbering cycles, first next number Except for 1);FF defines the maximum length of data, and slave (master controller) is verified according to the length of data, verifies data Integrality, feed back corresponding DTC;Data transfer rule according to ISO15765 greatly improve message order and Accuracy;
More frame data encapsulate packing algorithm:Statistics will send the size databyte of amount of bytes first, then calculate frame number Frame_Amount is measured, if not integer takes its integer value to add one again;Next circulation packing number is calculated, if not integer, Its value rounds adds one again;Transmission message is started the cycle over, and records and cycles through number, a cycle has been sent and counting is subtracted one, Sent at one in the cycle, record the counting per frame message, often send a frame, record number adds one, until record number is added to 16, one Individual end cycle, into next transmission cycle, cycle through, until it is that 0 i.e. data are sent to cycle through record number;
The mode transmitted according to multiframe, the first frame can only carry the data of 6 bytes, and subsequent frame carries the number of 7 bytes According to, then need pack frame quantity following manner calculate:
Frame_Amount=(databyte+1)/7
Using 0-F, as cycle period, the calculation formula for carrying out circulation packing number is totally 16 frame data:
Fcycnum=(databyte+1)/(16*7)
Fcycnum=(databyte+1)/(16*7)+1.
Preferably, the diagnosis process of pre-programming phase includes:
Pre-programming phase in program renewal process is the preparation to programming phases, to enter extension in this stage Conversation modes terminate the detection to DTC, terminate the communication etc. of normal message, to ensure normally entering for program downloads stage OK;
It is as follows that pre-programming phase diagnostic service holds step:
Step 1, mode of extension request (02 10 03) is sent, sending method is functional addressing, makes to own in battery bag ECU enters under mode of extension, because being given instructions by telegraph on ECU mono- under default mode, needs to enter row mode to ECU this moment and redirects, jumps Go to the diagnostic service such as executive termination DTC under mode of extension;
Step 2, diagnosis online service (0 2 3E 80), this design, which uses, to be sent once every 3S to ensure that ECU is in Non-default pattern, Normal Diagnosis session is maintained, if ECU does not receive diagnosis message in 5 seconds, ECU will recall to default mode automatically;
Step 3, which is sent, terminates DTC setting services (02 85 10) so that ECU stops detecting DTC, prevention in bag Unusual failure code produces under deagnostic communication mode again;
Step 4, Control on Communication service request (03 28 00 01) is carried out, for terminating proper communication, ensured under data Transmission rate during load is to avoid being disturbed.
Preferably, programming phases implementation process includes:
Programming phases will primarily make ECU enter programming conversation modes, then could carry out subsequent download work to ECU unblocks Make;Three sections of programs are mainly downloaded, download erasing program first, write-in program is being downloaded, is finally downloading application program;End of transmission The data transmitted are verified, ECU resetted afterwards finally;The execution step of diagnostic service in programming phases is such as Under:
Step 1, programming mode session request (02 10 02) so that ECU enters under programming mode, can enter under line program Service is carried, still host computer online service is sent every 3s to maintain diagnostic session pattern under this pattern;
Step 2, secure access service perform (27), and ECU is under safeguard protection state, need to unlock the same ability Carry out data download;
Step 3, request download (the * * * * * * of * * * * 34 00 33), inform that ECU will send the initial address of data With data volume size, required initial address is now taken out from S19 files, and calculate the data total amount to be sent
Data are transmitted by step 4, transmission data (the * * of * * * * 36) according to host-host protocol, should now be incited somebody to action The application layer data to be sent in S19 files adds transport layer protocol control information in case packing transmission;
Step 5, (01 37) are exited in request transmission, after the completion of transmitting data transfer, to be sent request transmission and be exited clothes Transmission is exited in business;
Step 6, ECU reset (02 11 01), and download program simultaneously resets after verifying successfully to ECU.
Preferably, software general frame process includes:
Slave computer software is mainly made up of application layer and FBL layers (Bootloader) two parts;FBL, which is used to update, to be applied Layer, its code focus primarily on code protection area, because FBL is placed on code protection area, ensure that code is never destroyed, FBL is needed To be solidificated in by BDM in FLASH;Application layer is used to deposit application layer program, and writing with a brush dipped in Chinese ink instrument by FBL and host computer is carried out more Newly;It can ensure user during application layer code is updated by using this software architecture, occur resetting suddenly, power During the abnormal and abnormal conditions such as upper computer software Communications failure, the erasable mistakes of Flash, the ECU in battery bag will not be locked, Software is updated after re-powering by host computer to remain to continue to update application layer code;
FBL layers mainly include hardware initialization, internal memory mapping, host-host protocol, Flash erasable, diagnostic service and locking etc. Function;
Diagnostic horizon:All download dependent diagnostic services, it is as shown in the table;
Transport layer:ISO15765-2 transport layer protocols;
Drive layer:The CAN drivings of minimum, all bottom hardware relevant portions, Flash Driver interface.
Preferably, the design process of the software includes:
Software memory maps:Using FreeScale MC9S12XET256 microcontrollers, Bootloader should be placed on by In the Flash of protection, but not all Flash can set protection, so being typically placed in 0xc000~0xfeff sections It is interior;
ROM_C000=READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFF0F;
PAGE_FE=READ_ONLY DATA_FAR IBCC_FAR 0xFE8000 TO 0xFEBFFF;
APPL_VECT_TABLE_SEG=READ_ONLY 0x007F10 TO 0x007FFF;
ROM_VEC_TABLE=READ_ONLY 0xFF10 TO 0xFFFF;
RAM_CPU=READ_WRITE 0x2000 TO 0x39FF;
USERSTACK=NO_INIT 0x3A00 TO 0x3FFF.
ECU workflows:
Step 1, flow is initialized, after ECU resets, before main program is called, into Start12.c source files.Perform Initialization function, the operation of completion empty ram space, and initialization data is copied to RAM etc. from ROM;
Step 2, electrifying startup flow, ECU it is upper electricity or reset after, first carry out some basic initialization operations, further according to External programming request is whether there is to determine to enter Bootloader or application program.One wait timer is set, in wait In the case that timer is not timed-out, if receiving Stay-In-Boot CAN Message, ECU is rested on In Bootloader;If wait timer are expired, and application program is effective, then into application program.Can so have Effect avoids occurring surprisingly leading to not brush news again during more new procedures, ensure that the stability of program;
Step 3, major cycle flow, after ECU enters Bootloader, global variable waitTime is set, enters receive every time Hair interrupts subtracts 1 by waitTime, and waitTime value is constantly detected in for circulations of main program, if zero, is then jumped to Application program launching address, otherwise continue to detect in CAN network whether there is data receivable.In order to ensure the data in CAN network Can completely it receive, waitTime is set very big by the design, is arranged to 5000;
Program writes with a brush dipped in Chinese ink flow instance:
Preferably, test and interpretation of result process include:
The Bootloader of realization is burnt in FreeScale MC9S12XET256 single-chip microcomputers with BDM programming tools. Sent by host computer and write " * .s19 " files, data flow being sent in single-chip microcomputer by CAN network, and run for completion. Multiple burning does not occur the situation of loss of data, can intactly decode the data flow of host computer transmission, and after burning Application program can be successfully downloaded, application program energy normal work, can also continue the diagnosis request of response PC ends host computer.
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, Er Qie In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, the scope of the present invention is by appended power Profit requires rather than described above limits, it is intended that all in the implication and scope of the equivalency of claim by falling Change is included in the present invention.Any mark in claim should not be considered as to the involved claim of limitation.
Moreover, it will be appreciated that although the present specification is described in terms of embodiments, not each embodiment is only wrapped Containing an independent technical scheme, this narrating mode of specification is only that those skilled in the art should for clarity Using specification as an entirety, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the art It is appreciated that other embodiment.

Claims (7)

  1. A kind of 1. method for optimizing battery management system online upgrading, it is characterised in that the optimization battery management system is online The mode of upgrading includes:Multiframe data transfer and encapsulation, the diagnosis of pre-programming phase, programming phases realization, software general frame, The design and test and interpretation of result of software.
  2. 2. a kind of method for optimizing battery management system online upgrading according to claim 1, it is characterised in that described more Frame data transmission includes with encapsulation process:
    Host computer reads S19 files (recordable paper), by S-Record document analysis into Hex files;Number based on ISO15765 According to transmission rule, the data of transmission are more than 6 or 7 bytes, and PC ends host computer is by the way of multiframe transmission, after will parsing HEX files in data be divided into multiframe transmission, send the first frame (FF) first, subsequent frame controlled by flow control (FC) (CF) each traffic volume and time interval, having sequence number to each CF frames, (0 arrives F numbering cycles, except first next number For 1);FF defines the maximum length of data, and slave (master controller) is verified according to the length of data, verifies the complete of data Whole property, feeds back corresponding DTC;Data transfer rule according to ISO15765 greatly improves the order of message and accurate Property;
    More frame data encapsulate packing algorithm:Statistics will send the size databyte of amount of bytes first, then calculate number of frames Frame_Amount, if not integer takes its integer value to add one again;Next circulation packing number is calculated, if not integer, its Value rounds adds one again;Transmission message is started the cycle over, and records and cycles through number, a cycle has been sent and counting is subtracted one, One sent in the cycle, recorded the counting per frame message, often sent a frame, and record number adds one, until record number is added to 16, one End cycle, into next transmission cycle, cycle through, until it is that 0 i.e. data are sent to cycle through record number;
    The mode transmitted according to multiframe, the first frame can only carry the data of 6 bytes, and subsequent frame carries the data of 7 bytes, then The quantity following manner of packing frame is needed to calculate:
    Frame_Amount=(databyte+1)/7
    Using 0-F, as cycle period, the calculation formula for carrying out circulation packing number is totally 16 frame data:
    Fcycnum=(databyte+1)/(16*7)
    Fcycnum=(databyte+1)/(16*7)+1.
  3. 3. a kind of method for optimizing battery management system online upgrading according to claim 1, it is characterised in that described pre- The diagnosis process of programming phases includes:
    Pre-programming phase in program renewal process is the preparation to programming phases, to enter extension session in this stage Pattern terminates the detection to DTC, terminates the communication etc. of normal message, to ensure being normally carried out for program downloads stage;
    It is as follows that pre-programming phase diagnostic service holds step:
    Step 1, mode of extension request (02 10 03) is sent, sending method is functional addressing, makes in battery bag all ECU all Into under mode of extension, because being given instructions by telegraph on ECU mono- under default mode, need to enter row mode to ECU this moment and redirect, jump to expansion The diagnostic service such as executive termination DTC under exhibition pattern;
    Step 2, diagnosis online service (0 2 3E 80), this design, which uses, to be sent once every 3S to ensure that ECU is in non-silent Recognize pattern, maintain Normal Diagnosis session, if ECU does not receive diagnosis message in 5 seconds, ECU will recall to default mode automatically;
    Step 3, which is sent, terminates DTC setting services (02 85 10) so that ECU stops detecting DTC in bag, and prevention is examined again Unusual failure code produces under disconnected communication mode;
    Step 4, Control on Communication service request (03 28 00 01) is carried out, for terminating proper communication, when ensureing that data are downloaded Transmission rate to avoid being disturbed.
  4. A kind of 4. method for optimizing battery management system online upgrading according to claim 1, it is characterised in that the volume Journey stage implementation process includes:
    Programming phases will primarily make ECU enter programming conversation modes, then could carry out subsequent download work to ECU unblocks;It is main Three sections of programs are downloaded, download erasing program first, write-in program is being downloaded, is finally downloading application program;Will after end of transmission The data transmitted are verified, finally ECU resetted;The execution step of diagnostic service in programming phases is as follows:
    Step 1, programming mode session request (02 10 02) so that ECU enters under programming mode, can carry out download program clothes It is engaged in, still host computer online service is sent every 3s to maintain diagnostic session pattern under this pattern;
    Step 2, secure access service perform (27), and ECU is under safeguard protection state, and need to unlock the same to be carried out Data are downloaded;
    Step 3, request download (33****** of * * * * 34 00), inform ECU to send data initial address and data volume it is big It is small, required initial address is now taken out from S19 files, and calculate the data total amount to be sent
    Data are transmitted by step 4, transmission data (* * * * 36**) according to host-host protocol, now should be by S19 files The middle application layer data to be sent adds transport layer protocol control information in case packing transmission;
    Step 5, (01 37) are exited in request transmission, after the completion of transmitting data transfer, to be sent request transmission and be exited service and move back Go out transmission;
    Step 6, ECU reset (02 11 01), and download program simultaneously resets after verifying successfully to ECU.
  5. 5. a kind of method for optimizing battery management system online upgrading according to claim 1, it is characterised in that described soft Part general frame process includes:
    Slave computer software is mainly made up of application layer and FBL layers (Bootloader) two parts;FBL is used to update application layer, its Code focuses primarily on code protection area, because FBL is placed on code protection area, ensures that code is never destroyed, FBL needs to pass through BDM is solidificated in FLASH;Application layer is used to deposit application layer program, and writing with a brush dipped in Chinese ink instrument with host computer by FBL is updated;It is logical User can be ensured during application layer code update using this software architecture by crossing, appearance reset suddenly, abnormal electrical power supply, With upper computer software Communications failure, during the abnormal conditions such as the erasable mistakes of Flash, the ECU in battery bag will not be locked, again on Software is updated after electricity by host computer to remain to continue to update application layer code;
    FBL layers mainly include the functions such as hardware initialization, internal memory mapping, host-host protocol, Flash erasable, diagnostic service and locking.
  6. A kind of 6. method for optimizing battery management system online upgrading according to claim 1, it is characterised in that the software Design process include:
    Software memory maps:Using FreeScale MC9S12XET256 microcontrollers, Bootloader should be placed on protected Flash in, but not all Flash can set protection, so being typically placed in 0xc000~0xfeff sections;
    ROM_C000=READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFF0F;
    PAGE_FE=READ_ONLY DATA_FAR IBCC_FAR 0xFE8000 TO 0xFEBFFF;
    APPL_VECT_TABLE_SEG=READ_ONLY 0x007F10 TO 0x007FFF;
    ROM_VEC_TABLE=READ_ONLY 0xFF10 TO 0xFFFF;
    RAM_CPU=READ_WRITE 0x2000 TO 0x39FF;
    USERSTACK=NO_INIT 0x3A00 TO 0x3FFF;
    ECU workflows:
    Step 1, flow is initialized, after ECU resets, before main program is called, into Start12.c source files.Perform initial Change function, the operation of completion empties ram space, initialization data is copied to RAM etc. from ROM;
    Step 2, electrifying startup flow, after the upper electricity of ECU or reset, some basic initialization operations are first carried out, further according to whetheing there is External programming is asked to determine to enter Bootloader or application program.One wait timer is set, in wait timer In the case of being not timed-out, if receiving Stay-In-Boot CAN a Message, ECU rests on Bootloader In;If wait timer are expired, and application program is effective, then into application program.So it is possible to prevente effectively from renewal Occur surprisingly leading to not brush news again during program, ensure that the stability of program;
    Step 3, major cycle flow, after ECU enters Bootloader, global variable waitTime is set, entered every time in transmitting-receiving It is disconnected that waitTime is subtracted 1, waitTime value is constantly detected in for circulations of main program, if zero, then jumps to application Program starts address, otherwise continues to detect in CAN network whether there is data receivable.In order to which the data ensured in CAN network can Complete to receive, waitTime is set very big, is arranged to 5000 by the design;
  7. A kind of 7. method for optimizing battery management system online upgrading according to claim 1, it is characterised in that the survey Examination and interpretation of result process include:
    The Bootloader of realization is burnt in FreeScale MC9S12XET256 single-chip microcomputers with BDM programming tools.Pass through Host computer sends and writes " * .s19 " files, data flow being sent in single-chip microcomputer by CAN network, and run for completion.Repeatedly Burning does not occur the situation of loss of data, can intactly decode the data flow of host computer transmission, and can be into after burning yet Work(downloads application program, application program energy normal work, can also continue the diagnosis request of response PC ends host computer.
CN201710994608.4A 2017-10-23 2017-10-23 A kind of method for optimizing battery management system online upgrading Pending CN107678771A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710994608.4A CN107678771A (en) 2017-10-23 2017-10-23 A kind of method for optimizing battery management system online upgrading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710994608.4A CN107678771A (en) 2017-10-23 2017-10-23 A kind of method for optimizing battery management system online upgrading

Publications (1)

Publication Number Publication Date
CN107678771A true CN107678771A (en) 2018-02-09

Family

ID=61141079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710994608.4A Pending CN107678771A (en) 2017-10-23 2017-10-23 A kind of method for optimizing battery management system online upgrading

Country Status (1)

Country Link
CN (1) CN107678771A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874433A (en) * 2018-09-21 2018-11-23 歌尔科技有限公司 A kind of firmware upgrade method of head-mounted display apparatus, system and storage medium
CN109856546A (en) * 2019-01-07 2019-06-07 银隆新能源股份有限公司 Secondary battery material system detection method
CN110086566A (en) * 2019-03-18 2019-08-02 深圳市元征科技股份有限公司 A kind of transmission method and mobile unit of vehicle-mounted data
CN110659043A (en) * 2019-08-27 2020-01-07 中国第一汽车股份有限公司 Firmware upgrading method, device, equipment and storage medium
CN113702850A (en) * 2021-08-27 2021-11-26 深圳市新威尔电子有限公司 Battery detection method for transmitting CAN message based on process flow
CN114860277A (en) * 2022-03-28 2022-08-05 重庆长安汽车股份有限公司 Automobile ECU software compression upgrading system and method, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202782733U (en) * 2012-08-31 2013-03-13 惠州市亿能电子有限公司 Battery management system supporting diagnosis function
US20130113429A1 (en) * 2011-11-04 2013-05-09 Bong-Young KIM Battery pack, battery management system, and battery system
CN103294511A (en) * 2013-05-31 2013-09-11 哈尔滨工业大学 Bootloader software updating method based on CAN (controller area network) bus
CN104125113A (en) * 2014-07-30 2014-10-29 国家电网公司 Method for testing consistency on a protocol for electric automobile charger and battery management system
CN105446762A (en) * 2014-09-28 2016-03-30 比亚迪股份有限公司 Program updating method for battery management system, and program updating system
CN107222517A (en) * 2017-04-12 2017-09-29 惠州市蓝微新源技术有限公司 A kind of remote update system and remote upgrade method of battery management system software

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130113429A1 (en) * 2011-11-04 2013-05-09 Bong-Young KIM Battery pack, battery management system, and battery system
CN202782733U (en) * 2012-08-31 2013-03-13 惠州市亿能电子有限公司 Battery management system supporting diagnosis function
CN103294511A (en) * 2013-05-31 2013-09-11 哈尔滨工业大学 Bootloader software updating method based on CAN (controller area network) bus
CN104125113A (en) * 2014-07-30 2014-10-29 国家电网公司 Method for testing consistency on a protocol for electric automobile charger and battery management system
CN105446762A (en) * 2014-09-28 2016-03-30 比亚迪股份有限公司 Program updating method for battery management system, and program updating system
CN107222517A (en) * 2017-04-12 2017-09-29 惠州市蓝微新源技术有限公司 A kind of remote update system and remote upgrade method of battery management system software

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SHENHENGK24: "Flash Bootloader", 《HTTPS://WENKU.BAIDU.COM/VIEW/D6A27D4BC281E53A5902FF4F.HTML》 *
姚燕: "基于ISO15765的车载CAN网络上位机诊断软件设计", 《万方学位论文》 *
王琦 等: "基于CAN总线的Bootloader设计与实现", 《微型机与应用》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874433A (en) * 2018-09-21 2018-11-23 歌尔科技有限公司 A kind of firmware upgrade method of head-mounted display apparatus, system and storage medium
CN108874433B (en) * 2018-09-21 2022-08-26 歌尔光学科技有限公司 Firmware upgrading method and system for head-mounted display equipment and storage medium
CN109856546A (en) * 2019-01-07 2019-06-07 银隆新能源股份有限公司 Secondary battery material system detection method
CN109856546B (en) * 2019-01-07 2024-01-19 银隆新能源股份有限公司 Secondary battery material system detection method
CN110086566A (en) * 2019-03-18 2019-08-02 深圳市元征科技股份有限公司 A kind of transmission method and mobile unit of vehicle-mounted data
CN110659043A (en) * 2019-08-27 2020-01-07 中国第一汽车股份有限公司 Firmware upgrading method, device, equipment and storage medium
CN113702850A (en) * 2021-08-27 2021-11-26 深圳市新威尔电子有限公司 Battery detection method for transmitting CAN message based on process flow
CN113702850B (en) * 2021-08-27 2024-04-16 深圳市新威尔电子有限公司 Battery detection method for sending CAN message based on process flow
CN114860277A (en) * 2022-03-28 2022-08-05 重庆长安汽车股份有限公司 Automobile ECU software compression upgrading system and method, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107678771A (en) A kind of method for optimizing battery management system online upgrading
WO2020155777A1 (en) Ui automated function testing method, testing device, testing apparatus, and storage medium
CN111459415B (en) Cross-cloud data migration method, device, equipment and storage medium
TWI230885B (en) Computer network system, computer system, method for communication between computer systems, method for measuring computer system performance, and storage medium
CN103309709B (en) A kind of firmware upgrade method, device and communication equipment
CN103475682B (en) File transfer method and file transfer equipment
CN106445583A (en) Page display method, equipment and system
CN101340663A (en) Smart memory card system and method for implementing interaction by the system
CN103745167B (en) The IAP method and device of single-chip microcomputer
CN105791032B (en) Method and device for testing transmission protocol between intelligent household appliance and mobile terminal
CN109040207A (en) A kind of method, device and equipment accessing User space Network File System
CN108076457A (en) A kind of safety-type power grid private radio communication module of wisdom based on linux system
CN105704178A (en) Task platform access method and task platform access device
CN110515643A (en) A kind of host computer tool for writing with a brush dipped in Chinese ink BIN file
CN102035889A (en) Software testing method for telecommunication terminal
CN109361579A (en) A kind of smart machine control method, system and storage medium
CN110187986A (en) A kind of command management method, system, device and computer readable storage medium
CN113112641A (en) Vehicle ECU (electronic control Unit) flashing method and lower computer of vehicle diagnostic instrument
CN111400167A (en) Redfish service compliance verification method, device, equipment and medium
CN109491890A (en) The interface scans method and terminal device of application program
CN110392096A (en) A kind of method, apparatus of file distributing, master controller and storage medium
CN105812413A (en) Communication method and device
CN112423068A (en) Smart television debugging method and device, mobile terminal and readable storage medium
CN103542865A (en) Testing and controlling method and device
CN103188117B (en) Information interaction server simulation testing device and method

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180209