With the continuous improvement of automotive intelligence,the frequency of on-board application software needs to repair bugs or add new functions is increasing.The traditional disassembly and upgrade will not only damage the circuit board,but also cost a lot of manpower and material resources,resulting in huge economic losses.In order to meet the market demand,it is particularly important to design and implement a safe,reliable and stable Bootloader software by combining Bootloader technology in embedded system with Unified Diagnostic Services protocol of automobile.First of all,this paper completed the overall design,and then from the two aspects of hardware and software respectively designed how to achieve the car application refresh.Hardware design FS32K144 as the main controller,Micro Controller Unit minimum system module,Controller Area Network communication module,storage module and watchdog module circuit design.The software design is divided into two parts: software architecture of Bootloader and refresh tool of upper computer.The software architecture of the Bootloader is mainly divided into four functional components: diagnostic communication protocol stack,refresh control management,security module,memory management and interrupt vector remapping.In the security module,One-Time Password dynamic password authentication technology based on Hash-based Message Authentication Code algorithm is used to restrict the access of illegal upper computer to the controller.The upper computer is designed based on CAN open environment software,and the human-machine interface is designed by Panel Designer.The bidirectional control between interface components and background logic processing is realized by environment variables.The background logic processing of the refresh process is completed by CAN Access Programming Language.Finally,a physical test environment for joint debugging of upper and lower computers was built to configure the upper computer and verify the refresh function and test.In the test stage,the basic functional test was designed to verify the feasibility of the update and download function of Bootloader.The anomaly test verifies the anti-pressure performance of the update download function.Automatic diagnostic protocol tests verify the correctness of the Electronic Control Unit node’s response to Unified Diagnostic Services diagnostic service requests.The OTP technology was applied to the Bootloader to generate Seed and the traditional Seed=F(CNT sampling value)function was compared and analyzed.With 2ms as the sampling cycle,4000 Seed values were sampled within 8000 ms.There was no regularity in the Seed values generated by the OTP technology.Solve recurring Seed problems,limit illegal refresh tools’ access to the ECU,and improve the security of refreshed data.Through the analysis of the above test results,it is proved that the system runs stably,has strong resistance to pressure,is safe and reliable,and has high social application value. |