CN109542086A - Data calibration method - Google Patents

Data calibration method Download PDF

Info

Publication number
CN109542086A
CN109542086A CN201811435125.1A CN201811435125A CN109542086A CN 109542086 A CN109542086 A CN 109542086A CN 201811435125 A CN201811435125 A CN 201811435125A CN 109542086 A CN109542086 A CN 109542086A
Authority
CN
China
Prior art keywords
data
ram
space
calibration
flash
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
CN201811435125.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.)
Chery Automobile Co Ltd
Original Assignee
Chery Automobile 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 Chery Automobile Co Ltd filed Critical Chery Automobile Co Ltd
Priority to CN201811435125.1A priority Critical patent/CN109542086A/en
Publication of CN109542086A publication Critical patent/CN109542086A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0221Preprocessing measurements, e.g. data collection rate adjustment; Standardization of measurements; Time series or signal analysis, e.g. frequency analysis or wavelets; Trustworthiness of measurements; Indexes therefor; Measurements using easily measured parameters to estimate parameters difficult to measure; Virtual sensor creation; De-noising; Sensor fusion; Unconventional preprocessing inherently present in specific fault detection methods like PCA-based methods

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a data calibration method, which adopts a product ECU to calibrate data, divides an RAM space of the product ECU into a plurality of sections, simultaneously divides a flash space of the calibrated data into a plurality of sections with the same space size, then establishes a mapping relation between each section of space in the RAM and each section of space of the flash, sequentially loads the section of space of the calibrated data into the RAM in sections according to the section of space in the flash of the data when calibrating the data, and then calibrates the data. The invention has the advantages that: the product ECU replaces a development ECU to realize data calibration, so that the development cost of a project can be greatly saved, and the cost is saved; the method is simple to implement, and can be realized only by mapping the XCP calibration page through a dynamic mapping method.

Description

A kind of data scaling method
Technical field
The present invention relates to vehicle electric control field, in particular to the method for data scaling in automobile electrically-controlled development process.
Background technique
With increasingly strict, the car engine of continuous improvement and discharge fuel economy regulation of the automobile on dynamic property, comfort Machine ECU internal control software also becomes increasingly complex.The quantity of parameter inside engine diagnostic function and ECU is also constantly increasing Long, the variable that this just needs to need to demarcate in exploitation calibration phase is also more and more.Therefore the vehicle electronic development stage in order to Staking-out work is completed, main engine plants and EFI producer will use exploitation ECU to carry out the staking-out work of data.Develop ECU and product ECU is completely compatible on single-chip microcontroller pin and function, but possesses ram spaces more more than product E CU, can meet automatically controlled mark Determine development phase demand.But since the single-chip microcontroller of exploitation ECU is expensive and demand is small, single cost is very expensive, city Valence is generally at 30,000 yuan or so, and the price of a product E CU only needs 300 yuan or so.So if can be replaced by product E CU In generation, develops ECU to realize data scaling, then can greatly save project development cost.
Summary of the invention
It is an object of the invention to overcome the deficiencies of the prior art and provide a kind of data scaling methods, for using more Cheap product E CU realizes that the development phase demarcates the variable of automobile ECU.
To achieve the goals above, the technical solution adopted by the present invention are as follows: a kind of data scaling method, using product E CU Data scaling is carried out, the ram space of product E CU is divided into several segments, while with same space size by nominal data The space flash is divided into several sections, then establishes the mapping relations in RAM between each section of space in each section of space and flash, when into When row data scaling, according to the section space in flash where data, the section space where nominal data is successively segmented and is loaded into In RAM, staking-out work is then carried out again.
Mapping relations establish 8 TLB of the memory mapping block MMU including the use of product E CU, will be in scalar quantity flash 8 logical address regions be respectively mapped to 8 sections in RAM according to applicable cases, and other non-mapped flash are kept Global mapping before remains as the address of flash itself.
When being demarcated using calibration facility to ECU, calibration facility and ECU establish connection and have secure access to and pass through it Afterwards, it needs section where the data demarcated will to be needed to be mapped to ram space by calibration page select command, when data scaling is completed Afterwards, the data of calibration are saved using download command into Flash.
Firstly, completing the memory mapping that MMU needs to be mapped to 8 TLB of RAM in XCP initialization function, and one fixed Variable characterizes each section in RAM of use state, defines another variable to characterize the flash mapped section;
When calibration facility, which sends SET_CAL_PAGE order, carrys out modification page, current selected is reference page, then leads to It crosses TLB entry and maps the address into the space in flash, and check whether working page is consistent with the content of reference page, if Data unanimously indicate that calibration is completed;If selection is working page, need to confirm whether 8 pages of current RAM are available free, such as The flash space address for needing the data demarcated then is mapped as ram space address by the available free ram space of fruit, and is started just Normal staking-out work process, if ram space not can be carried out the calibration of new data without the free time;
After the completion of staking-out work, calibration facility sends DOWN_LOAD order to save the data of calibration, and ECU is received It after order, checks whether the section of current data has been mapped in RAM, if mapped, directly the data of calibration is written It in RAM, if not yet mapped, needs to check the whether available free space RAM, can be incited somebody to action if the available free space RAM The data of calibration are stored in RAM, are waited calibration that RAM is written after the completion, are finished if RAM is occupied, need to wait other numbers According to calibration completion exit after, can just continue the calibration of new data, to be gradually completing staking-out work.
The product E CU is used to be realized on Freescale MPC5634 monolithic machine platform.
Calibration RAM space is divided into 8 sections as unit of 4K, the space flash is divided into 24 sections as unit of 4K, then built Vertical mapping relations.
The product E CU is that engine controls ECU.
The present invention has the advantages that replacing exploitation ECU to realize data scaling by product E CU, item can be greatlyd save Purpose development cost, save the cost;And realize simple, it is only necessary to XCP be carried out by the method for dynamic mapping and demarcate reflecting for page Penetrating can be realized.
Detailed description of the invention
Below to each width attached drawing of description of the invention expression content and figure in label be briefly described:
Fig. 1 is nominal data mapping relations schematic diagram of the present invention;
Fig. 2 is present invention calibration message flow chart.
Specific embodiment
A specific embodiment of the invention is made further detailed below against attached drawing by the description to optimum embodiment Thin explanation.
Exploitation ECU is replaced to carry out variable calibration using product E CU, this method is in Freescale MPC5634 monolithic machine platform Upper realization (other chip microcontroller methods are same).This single-chip microcontroller ram space total size is 92K, but general engine It is about 90K that project, which needs the variable space demarcated, if realizing nominal data in the Complete Mappings of RAM, scalar quantity is to RAM resource It consumes excessive, influences whether operation of the other applications in RAM, be infeasible.In this method, by the sky of nominal data Between be divided into several segments, when carrying out on-line proving, first by where scalar quantity section segmentation be loaded into RAM, then carry out again Staking-out work.
In this method, address range of the variable for needing to demarcate in flash is: 0x00160000-0x00178000, greatly Small is 96K, and the address range being mapped in RAM is 0x40000000-0x40008000, size 32K, will not be occupied so very More ram spaces will not influence the normal operation of other programs.According to the design in this method, by Calibration RAM space with 4K is that unit is divided into 8 sections, and the space flash is equally divided into 24 sections, mapping relations such as Fig. 1 as unit of 4K.
Calibration access is divided into working page and reference page, and working page, that is, ram space can carry out direct read-write behaviour to data Make, reference page, that is, space flash is read-only to be write, therefore general staking-out work process is, the data that needs are demarcated from Flash is copied in RAM, after staking-out work is completed, in being written to flash, to complete staking-out work.
As shown in Figure 1,8 TLB of MMU (memory mapping) module using MPC5634 chip, it will be in scalar quantity flash 8 logical address regions be respectively mapped to 8 sections in RAM according to applicable cases, and other non-mapped regions flash It is whole that the region flash is mapped to using a TLB.
When being demarcated using calibration facility to ECU, by Fig. 2 be demarcation flow schematic diagram, Cong Tuzhong message flow it is found that Calibration facility and ECU establish connection and have secure access to pass through after, need by calibration page selection (SET_CAL_PAGE) order The data of calibration are mapped to ram space, after the completion of data scaling, are ordered using downloading (DOWN_LOAD) to save calibration Data into Flash, therefore this method by modification calibration page selection (SET_CAL_PAGE) order and downloading (DOWN_ LOAD) the operation ordered, to complete the realization of this method, the method is as follows:
Step 1: firstly, the memory mapping that MMU needs to be mapped to 8 TLB of RAM is completed in XCP initialization function, and A variable is determined to characterize each section in RAM of use state, defines another variable to characterize the flash mapped section;
Step 2: when calibration facility, which sends SET_CAL_PAGE order, carrys out modification page, if not using this method Dynamic mapping then directly arrives Flash Address space mappinD when receive current selected is working page or reference page order The space RAM or Flash, and be that current selected is reference page for the function operation process of this method dynamic calibration, then pass through TLB entry maps the address into the space in flash, and checks whether working page is consistent with the content of reference page, if number Indicate that calibration is completed according to consistent;If selection is working page, need to confirm whether 8 pages of current RAM are available free, if The flash space address for needing the data demarcated then is mapped as ram space address by available free ram space, and is started normal Staking-out work process, if ram space without free time, not can be carried out the calibration of new data.
Step 3;After the completion of staking-out work, calibration facility sends DOWN_LOAD order to save the data of calibration, ECU After receiving order, check whether the section of current data has been mapped in RAM, if mapped, directly the number of calibration According in write-in RAM, if not yet mapped, need to check the whether available free space RAM, if the available free space RAM The data of calibration can be stored in RAM, wait calibration that RAM is written after the completion, be finished, need if RAM is occupied After the calibration completion of other data is exited, it can just continue the calibration of new data, to be gradually completing staking-out work.
The method of dynamic calibration page realizes the method that product E CU carries out variable calibration, and disadvantage is exactly once can only be to certain The parameter of quantity completes calibration, when selected argument address is more dispersed, after 8 mapped segments that RAM is distributed have used Need multi-pass operation that could complete staking-out work.But cost can be greatlyd save, for exploitation enterprise in project development And its it is advantageous.
In order to verify this method, modified software is tested by INCA and debugging tool, is selected by INCA Variable in fixed such as table 3,
Variable name Numerical value before demarcating
VAL_AftrunEEPROM 1
VAL_AngAbsCamCrkLm 15.000
Table 3
Not demarcated due to data in ECU at this time, MMU mapping table does not map, and all holding initial values are mapped to one A not used space, MMU initial value are corresponding such as table 1.
Enter slogan Physical address Logical address
Entry4-11 0x3000000 0x30000000
Table 1
When modifying VAL_AftrunEEPROM and VAL_AngAbsCamCrkLm numerical value, mapping table changes such as table 2,
Enter slogan Physical address Logical address
Entry4 0x40000000 0x00162000
Entry5 0x40001000 0x00173000
Entry6-11 0x30000000 0x30000000
Table 2
The address that VAL_AftrunEEPROM variable is checked by MAP is 0x00162dc0, VAL_AngAbsCamCrkLm The address of variable is 0x001730ae, therefore entrance 4 is the mapping to VAL_AftrunEEPROM, and entrance 5 is to VAL_ The mapping of AngAbsCamCrkLm variable, two variables are a to occupy a mapping entrance since address is more dispersed, this When INCA in numerical value complete modification, such as table 4.
Variable name Numerical value after calibration
VAL_AftrunEEPROM 2
VAL_AngAbsCamCrkLm 18.000
Table 4
Can be seen that the method by INCA software debugging result may be implemented the dynamic mapping that XCP demarcates page, realize Calibrating function can greatly save project development expense to be truly realized the function of product E CU substitution exploitation ECU.
Obviously present invention specific implementation is not subject to the restrictions described above, as long as using method concept and skill of the invention The improvement for the various unsubstantialities that art scheme carries out, it is within the scope of the present invention.

Claims (7)

1. a kind of data scaling method, it is characterised in that: data scaling is carried out using product E CU, by the ram space of product E CU It is divided into several segments, while the space flash of nominal data is divided by several sections with same space size, then establishes RAM In mapping relations between each section of space in each section of space and flash, when carrying out data scaling, according in flash where data Section space, the section space where nominal data is successively segmented and is loaded into RAM, then carries out staking-out work again.
2. a kind of data scaling method as described in claim 1, it is characterised in that: mapping relations are established including the use of product 8 TLB of the memory mapping block MMU of ECU distinguish 8 logical address regions in scalar quantity flash according to applicable cases 8 sections being mapped in RAM, and other non-mapped flash region entireties are mapped to the region flash using a TLB.
3. a kind of data scaling method as claimed in claim 1 or 2, it is characterised in that: when use calibration facility carries out ECU When calibration, after calibration facility and ECU establish connection and have secure access to and pass through, need calibration through calibration page select command Data are mapped to ram space, and after the completion of data scaling, the data of calibration are saved using download command into Flash.
4. a kind of data scaling method a method according to any one of claims 1-3, it is characterised in that: firstly, in XCP initialization function Middle completion MMU needs to be mapped to the memory mapping of 8 TLB of RAM, and determines a variable to characterize each section in RAM of use State defines another variable to characterize the flash mapped section;
When calibration facility, which sends SET_CAL_PAGE order, carrys out modification page, current selected is reference page, then passes through TLB Entry maps the address into the space in flash, and checks whether working page is consistent with the content of reference page, if data one It causes to indicate that calibration is completed;If selection is working page, need to confirm whether 8 pages of current RAM are available free, if free The flash space address for needing the data demarcated then is mapped as ram space address by not busy ram space, and starts normal mark Workflow is determined, if ram space not can be carried out the calibration of new data without the free time;
After the completion of staking-out work, calibration facility sends DOWN_LOAD order to save the data of calibration, and ECU receives order Afterwards, check whether the section of current data has been mapped in RAM, if mapped, directly in the data write-in RAM of calibration It goes, if not yet mapped, needs to check the whether available free space RAM, it can be by calibration if the available free space RAM Data are stored in RAM, are waited calibration that RAM is written after the completion, are finished if RAM is occupied, need to wait the mark of other data It is fixed to complete after exiting, it can just continue the calibration of new data, to be gradually completing staking-out work.
5. a kind of data scaling method as described in claim 1-4 is any, it is characterised in that: the product E CU is thought using winged It is realized on karr MPC5634 monolithic machine platform.
6. a kind of data scaling method as described in claim 1-4 is any, it is characterised in that: be with 4K by Calibration RAM space Unit is divided into 8 sections, and the space flash is divided into 24 sections as unit of 4K, then establishes mapping relations.
7. a kind of data scaling method as described in claim 1, it is characterised in that: the product E CU is engine control ECU。
CN201811435125.1A 2018-11-28 2018-11-28 Data calibration method Pending CN109542086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811435125.1A CN109542086A (en) 2018-11-28 2018-11-28 Data calibration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811435125.1A CN109542086A (en) 2018-11-28 2018-11-28 Data calibration method

Publications (1)

Publication Number Publication Date
CN109542086A true CN109542086A (en) 2019-03-29

Family

ID=65850943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811435125.1A Pending CN109542086A (en) 2018-11-28 2018-11-28 Data calibration method

Country Status (1)

Country Link
CN (1) CN109542086A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732309A (en) * 2021-01-14 2021-04-30 潍柴动力股份有限公司 Updating method and device of Flash memory and electronic equipment
CN112765053A (en) * 2021-01-04 2021-05-07 潍柴动力股份有限公司 Data processing method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765053A (en) * 2021-01-04 2021-05-07 潍柴动力股份有限公司 Data processing method and device
CN112732309A (en) * 2021-01-14 2021-04-30 潍柴动力股份有限公司 Updating method and device of Flash memory and electronic equipment
CN112732309B (en) * 2021-01-14 2023-08-18 潍柴动力股份有限公司 Flash memory updating method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US7310800B2 (en) Method and system for patching ROM code
US8683456B2 (en) Test partitioning for a non-volatile memory
US8717370B2 (en) Method and system for automatically analyzing GPU test results
CN103577308B (en) Method for obtaining log files of mobile device
CN105373476B (en) Method and system for generating automatic test case in automobile controller
CN109542086A (en) Data calibration method
CN106648547A (en) Distributed unified management method for GPU graphic state parameters
CN102306127A (en) Novel method for identifying and initializing DDRIII (double-data-rate III) memory
US10635494B2 (en) Memory pool allocation for a multi-core system
SE1250017A1 (en) System and method for providing diagnostic error information based on content from two databases
US20070094534A1 (en) RRAM memory error emulation
US6762965B2 (en) Method for integrating imperfect semiconductor memory devices in data processing apparatus
CN109697022A (en) A kind of processing method, device and the computer readable storage medium of message descriptor PD
CN106024066A (en) SRAM detection method and system
CN103777907A (en) Method for automatically obtaining EEPROM (Electrically Erasable Programmable Read-Only Memory) storage capacity
CN116736792B (en) Logic control programming method and device embedded in CNC system
US8219881B2 (en) Memory controlling method, program and device
JP4740553B2 (en) Data access request remapping system
CN109408301A (en) Internal storage testing method based on 64 bit processor of Godson under a kind of PMON
US11755211B2 (en) Overhead reduction in data transfer protocol for NAND memory
CN104200181B (en) A kind of difunctional intelligent programming module and method
CN100590444C (en) Variegated BIST test approach
US7047444B2 (en) Address selection for testing of a microprocessor
CN114443403A (en) Method, device, equipment and storage medium for generating register function covering group
CN114035844B (en) Configuration table-based on-orbit modification method, system and medium for satellite-borne software parameters

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190329