| With the electronic control unit being widely applied to vehicle,more and more car corporations prefer calibration software to optimize ECU characteristic variables.During run time of the ECU,measurement and calibration system can realize prarmeters calibration and data acquisition,and it can show variable information in real time via PC interface,which plays an important role in the development of the vehicle.Under this background,based on the CAN Calibration Protocol(CCP)of the international ASAP standards,a visualization measurement and calibration system has been developed,the system used Freescale microcontroller MC9S12P64 as ECU.In this paper,based on the deeply study of the calibration system at home and abroad and combines with the practical demands of the project and the CCP communication mode,the system functions is analyzed,and then constructs the hardware and software solution for system.According to the functional requirements of the system,the software design is spilt into the ECU side and the PC side.The ECU side is mainly for the design of CAN driver,CCP driver and FLASH driver,and then the interface of the PC side is built by applying the MFC,dividing the PC side by module into drive design,system initialization,measurement and calibration,file resolution,Bootlloader loading,data management,graph visualization,analyzing the business process of each module in detail.The design of the peripheral circuit based on MC9S12P64 is completed with the EDA tool platform Altium,including power filter,clock,reset,CAN transceiver and BDM interface ect.The software design of the bottom driver and the Bootlader module is completed with the embedded application development software CodeWarrior.Altering the ECU’s PC value according to CCP commands from the Upper computer to control the run time of the Bootloader,and then realize the ECU’s on-line updating.This paper has finished the design and implement of the PC side of the measurement and calibration software.Based on the proposed functional modules and business processes,adopting the object-oriented programming techniques for application development,and it focuses on the development of calibration module and measurement module,realizing the communication mode of polling and DAQ by using multithreading technology,calibrating the calibration variables in the RAM and storing them into the FLASH though address mapping method.The system constructs the two-dimension and three-dimension’s display model of measurement and calibration data with combining the OpenGL with the computer graphics theory so that it can monitor the process of data variation of the ECU to enhance the development efficiency.Using MC9S12P64 processor of the lower computer to build physical experimental bench and then testing the integrated and installed measurement and calibration system.In the control program of the processor embedded CCP driver code and CAN driver code,achieving respond to the CCP command of the upper computer,and then carring out the tests of measurement and calibration units etc,through the visual window and CAN messages to verify the test results.The results show that independent development of measurement and calibration system can achieve the various requirements of the project,stable and good real-time performance during system testing. |