An AUTOSAR-based method, apparatus, and storage medium for XCP calibration of motor controllers.

By building the XCP protocol stack through the AUTOSAR standardized interface, the problems of closure and compatibility in the motor controller calibration process are solved, achieving efficient calibration data transmission and simplified code development, thus reducing development costs.

CN121455124BActive Publication Date: 2026-07-31JIANGSU XCMG CONSTRUCTION MACHINERY RESEARCH INSTITUTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU XCMG CONSTRUCTION MACHINERY RESEARCH INSTITUTE LTD
Filing Date
2025-11-21
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies for motor controller calibration suffer from issues of closure, poor compatibility, complex implementation methods, long code development cycles, and inconvenient code portability in the later stages.

Method used

The XCP protocol stack is constructed using the AUTOSAR standardized interface. The AUTOSAR configuration tool parses the XML communication description and DBC file, configures the XCP protocol stack and application layer API, generates an A2L file, and loads it through the host computer to realize RAM remapping and periodic uploading of calibration parameters.

Benefits of technology

It enables seamless calibration interaction across ECUs of different product series, improves calibration data transmission efficiency by 3-5 times, reduces interface development workload by more than 50%, and simplifies code development cycle and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455124B_ABST
    Figure CN121455124B_ABST
Patent Text Reader

Abstract

This invention discloses an AUTOSAR-based XCP calibration method, device, and storage medium for motor controllers, belonging to the field of automotive electronic control technology. The method includes: parsing a pre-generated XML communication description and DBC file using an AUTOSAR configuration tool, configuring the XCP protocol stack and associated XCP application layer API; integrating and compiling the configuration code generated in the above steps, and generating an A2L file based on the calibration address information in the compilation result; loading the A2L file through a host computer, connecting to the motor controller using standard XCP commands, obtaining the observation address and the RAM remapping address of the calibration value from the motor controller, writing the calibration parameter values ​​to the corresponding RAM remapping address, and periodically uploading the calibration parameter values ​​to the host computer using a static DAQ list. This achieves a highly compatible ECU calibration scheme and provides diverse fieldbus solutions for engineering machinery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automotive electronic control technology, and particularly relates to an AUTOSAR-based method, device and storage medium for XCP calibration of motor controllers. Background Technology

[0002] With the rapid development of automotive electronics technology, modern cars are integrating an increasing number of Electronic Control Units (ECUs). These ECUs control various vehicle functions, such as engine management, transmission control, safety systems, and infotainment systems. Traditional automotive electronic systems were often developed independently by various suppliers, lacking unified standards, resulting in complex and costly system integration. To address these issues, major manufacturers and suppliers in the automotive industry jointly launched the AutoSAR project.

[0003] Motor and electronic control system calibration refers to the process of precisely setting and calibrating the parameters of the motor and electronic control system. This process aims to ensure that the motor and electronic control system operate accurately and reliably, achieving the required performance and functions. The calibration primarily targets parameters such as motor speed, torque, gradeability, and energy efficiency, as well as the feedback loop and control logic of the electronic control system.

[0004] Existing technical solutions such as Figure 1 As shown, the implementation steps are as follows: Step 1: Integrate non-AUTOSAR code into the compiler to implement the private protocol stack calibration function, compile and burn the program; Step 2: Use tools or other methods to generate an A2L file and import it into the host computer software; Step 3: Complete the electrical connection of the host computer software, calibration device and ECU and verify the communication establishment, and you can prepare for calibration; Step 4: The host computer sends a command, the ECU returns a CAN message according to the regulations, the host computer parses and obtains the expected parameters, and so on until the calibration work is completed.

[0005] As can be seen from the above, the existing technology uses a private toolchain for calibration, which has the problem of closedness, poor compatibility with mainstream calibration tools, complex implementation methods, long code development cycle, and inconvenient code portability in the later stage. Summary of the Invention

[0006] The purpose of this invention is to provide a motor controller XCP calibration method, device, and storage medium based on AUTOSAR. It utilizes AUTOSAR to implement XCP calibration function based on CAN communication. The implementation process is simple, the flow is clear, and the interface is standardized, which makes it very convenient for later code porting, reduces the code development cycle, and saves development costs.

[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0008] In a first aspect, the present invention provides a motor controller XCP calibration method based on AUTOSAR, characterized in that it includes:

[0009] XCP protocol implementation phase: The pre-generated XML communication description and DBC file are parsed using the AUTOSAR configuration tool, and the XCP protocol stack and associated XCP application layer APIs are configured; the XML communication description is generated based on the parameters of the CAN driver node used by XCP, and the DBC file defines the XCP message ID; configuring the XCP protocol stack includes configuring the DAQ and Eventchannel used and configuring the RAM remapping function.

[0010] A2L file generation stage: The configuration code generated in the XCP protocol implementation stage is integrated and compiled, and A2L files are generated using automated scripts based on the calibrated address information in the compilation results;

[0011] Calibration and verification phase: After loading the A2L file through the host computer, the XCP standard command is used to connect to the motor controller and obtain the RAM remapping address of the observed quantity and the calibration quantity from the motor controller. The calibration quantity parameter value is written into the corresponding RAM remapping address and the calibration parameter value is uploaded to the host computer periodically by the static DAQ list.

[0012] Optionally, before parsing the pre-generated XML communication description and DBC file using the AUTOSAR configuration tool, the method further includes:

[0013] Use the MCAL configuration tool to configure the CAN controller node parameters used by XCP in the CAN driver, and generate an XML communication description based on the CAN controller node parameters;

[0014] Use the CANDB++ tool to create a DBC file containing XCP information and determine the XCP message ID.

[0015] Optionally, the step of parsing the pre-generated XML communication description and DBC file using the AUTOSAR configuration tool includes:

[0016] Read the CAN controller node parameters from the XML communication description and load them into the AUTOSAR configuration tool;

[0017] Read the XCP message ID from the DBC file and establish a mapping relationship between the message ID and the CAN channel.

[0018] Alternatively, methods for configuring DAQ using the AUTOSAR configuration tool include:

[0019] Event channels are created according to a preset cycle and bound to the corresponding DAQ list; each DAQ list contains multiple ODTs and ODT Entries for transmitting information between the motor controller and the host computer.

[0020] Optionally, methods for configuring RAM remapping functionality include:

[0021] Ensure that the addresses of the calibrated variables all fall within the FLASH area specified after compiling and linking the BSW project;

[0022] The XCP application layer API is used to remap memory, transferring the scalar value from the FLASH region to the shared RAM memory region.

[0023] Optionally, the configuration code generated in the above steps is integrated and compiled. Based on the calibrated address information contained in the compilation result, an A2L file is generated using an automated script, including:

[0024] Read the calibrated address and length of a specified FLASH area using an A2L script;

[0025] Call the ASW layer in the AUTOSAR architecture to pre-generate A2L files and A2L header files containing actual project information, and obtain the calibrated data types and annotations;

[0026] The A2L script combines the calibrated address, length, calibrated data type, and comments to generate a complete A2L file.

[0027] Optionally, the step of connecting to the motor controller using XCP standard commands and obtaining the RAM remapping address of the observed address and the calibrated quantity from the motor controller includes:

[0028] Establish a connection with the motor controller by sending the CONNECT command from the host computer;

[0029] The host computer sends a GET_CAL_PAGE message to enable the motor controller to read the type of the current working page.

[0030] The host computer sends a SET_MTA message to set the subsequent DOWNLOAD target address to the RAM remapping address corresponding to the working page address.

[0031] Optionally, the step of writing the calibration parameter values ​​to the corresponding RAM remapping address and periodically uploading the calibration parameter values ​​to the host computer by the static DAQ list includes:

[0032] The new calibration parameter value is written to the RAM address specified by SET_MTA by executing DOWNLOAD through the host computer.

[0033] The calibrated parameter values ​​in the corresponding RAM address are copied to the running variables via the motor controller;

[0034] The corresponding RAM address data is packaged into CAN frames and sent back to the host computer according to the event channel period using a static DAQ list.

[0035] Secondly, the present invention provides an AUTOSAR-based motor controller XCP calibration device, comprising:

[0036] The XCP protocol implementation module is used to parse the pre-generated XML communication description and DBC file through the AUTOSAR configuration tool, and to configure the XCP protocol stack and associated XCP application layer APIs. The XML communication description is generated based on the parameters of the CAN driver node used by XCP, and the DBC file defines the XCP message ID. The configuration of the XCP protocol stack includes configuring the DAQ and Eventchannel used by it and configuring the RAM remapping function.

[0037] A2L file generation module: used to integrate and compile the configuration code generated during the XCP protocol implementation phase, and generate A2L files using automated scripts based on the calibrated address information in the compilation results;

[0038] Calibration and verification module: After loading the A2L file through the host computer, it connects to the motor controller using XCP standard commands, obtains the RAM remapping address of the observed quantity and the calibration quantity from the motor controller, writes the calibration quantity parameter value to the corresponding RAM remapping address, and uploads the calibration parameter value to the host computer periodically by the static DAQ list.

[0039] Thirdly, the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the AUTOSAR-based motor controller XCP calibration method as described in any of the first aspects.

[0040] Compared with existing technologies, the beneficial effects achieved by this invention are as follows: In the motor controller calibration process, compared with the non-standardized architecture of proprietary protocols that rely on point-to-point communication, this invention builds an XCP protocol stack based on the AUTOSAR standardized interface, breaking through the limitations of traditional proprietary protocols in terms of scalability and realizing seamless calibration interaction across product series ECUs; Addressing the communication efficiency bottleneck caused by the lack of a layered architecture in non-AUTOSAR systems, this invention establishes a dynamic parameter mapping mechanism based on PDU routing through a layered decoupling design of the AUTOSAR communication stack and the XCP protocol, improving calibration data transmission efficiency by 3-5 times compared to traditional proprietary protocols; Unlike the drawback of proprietary protocols requiring customized development of BSW interfaces, this invention adopts an ASW-MCAL bidirectional mapping channel to achieve automatic association between XCP calibration parameters and AUTOSAR atomic-level variables, reducing interface development workload by more than 50%. Attached Figure Description

[0041] Figure 1 The diagram shown is a schematic of a conventional motor controller calibration method in one embodiment of the present invention;

[0042] Figure 2 The diagram shown is a schematic of an AUTOSAR-based motor controller XCP calibration method in one embodiment of the present invention.

[0043] Figure 3 The diagram shown is a schematic representation of the processing procedure after successful XCP protocol data transmission in one embodiment of the present invention. Detailed Implementation

[0044] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0045] Example 1

[0046] This embodiment proposes a solution to the inherent defects of existing non-AUTOSAR architecture calibration systems and proprietary calibration protocols, such as... Figure 2 As shown, this paper presents an AUTOSAR-based motor controller XCP calibration method using the standardized AUTOSAR interface, layered architecture, and standard XCP protocol to solve problems in the ECU calibration process. The specific steps are as follows:

[0047] Step 1: Use the MCAL configuration tool EB_tresos_Studio to configure the CAN controller node parameters used by XCP in the CAN driver, including the mailbox, baud rate, ID and frame format of the CAN controller node, and generate XML files and configuration code.

[0048] Step 2: Use the CANDB++ tool to create a DBC file containing XCP information and determine the ID of the XCP message.

[0049] Step 3: Import the XML file generated in Step 1 and the DBC file generated in Step 2 into the AUTOSAR configuration tool (EAS_Configurator), parse the information in the loaded files; first write the parsed CAN controller node parameters into the shared memory in the AUTOSAR architecture, and then write the parsed message ID into the CanIf routing table to complete the mapping of message ID to CAN channel.

[0050] Step 4: Use the AUTOSAR configuration tool to generate the XCP protocol stack. Create three sets of static DAQ lists based on the CAN channel numbers in shared memory. Each DAQ set contains 7 ODTs, and each ODT contains 10 ODTEntries. Bind the three sets of static DAQ lists to Event channels with trigger periods of 2ms, 10ms, and 100ms respectively, responsible for implementing the XCP DAQ functionality. Write the Event attributes to shared memory, which is then periodically triggered by an OS task to generate the AUTOSAR configuration code.

[0051] Step 5: Use the AUTOSAR configuration tool to configure the functionality of the XCP initialization function and main function, and create three new OSTASKs: XCP_2ms_Task, XCP_10ms_Task, and XCP_100ms_Task. The entry points for each TASK call Xcp_Init() and Xcp_MainFunction(), associating the XCP initialization function and main function with the corresponding OSTASKs. In this embodiment, the initialization function reads shared memory to bind the CAN interface ID to the DAQ list, ensuring periodic updates.

[0052] Step 6: Integrate the configuration code generated by the MCAL configuration tool, the MCAL static code, the AUTOSAR tool configuration code, and the AUTOSAR static code into the compiler: Add the Can_Cfg.c and CanIf_Cfg.c generated by EB and the XCP_Cfg.c, Xcp_DAQ.c, and CDD_Overlay.c generated by EAS to the project. Set the CALRAM segment start and length in the linker script, retain the symbol table in the compilation options, and generate the ELF file BSW.elf obtained from the BSW compilation project.

[0053] Step 7: Manually write complex device driver code for the CDD (Overlay) part to realize the memory remapping of calibration data from the flash area to the RAM area, and associate it with the corresponding XCP application layer API. Internally, switch the MTA pointer to the RAM address to realize the complete XCP function, including seed & key secure access, connection request, disconnection, data synchronization, uploading, downloading, signal observation and calibration.

[0054] Step 8: Based on the known information, use an automated script to read BSW.elf, extract the symbol address and length of the CALRAM segment, and then read the A2L header file pre-generated by the ASW layer, which contains variable data types and comments. Concatenate the header files according to the variable address, length, variable data type and comment format to generate the A2L file required for calibration.

[0055] Step 9: Burn the HEX file generated by the compiler into the controller. Load the A2L file in a standard XCP host computer (such as CANape) to establish a communication connection between the ECU and the host computer, and the calibration work can begin. In this embodiment, CANape sequentially sends CONNECT, GET_CAL_PAGE, and SET_MTA to obtain the RAM remapping address; executes DOWNLOAD to write the new calibration parameter values ​​to the RAM address corresponding to the target address, and the ECU takes effect immediately; triggers DAQ through the Event channel, and packages the new calibration parameter values ​​into a CAN message according to the trigger cycle of the Event channel and sends it back to CANape, completing the closed loop.

[0056] First, it should be noted that in the AUTOSAR software architecture, the communication module connects to the driver module through the interface module. This system uses the CAN bus to transmit calibration data. Embedding the AUTOSAR software architecture through the CAN Interface module complies with the requirements of the AUTOSAR software architecture, which can improve the reusability of the software code. After changing the processor, the amount of code modification is small, reducing the R&D cost of the software system and shortening the development cycle.

[0057] The AUTOSAR communication protocol stack is generally abstracted into a bus driver module, a bus interface module, a network management module, a communication management module, a transport layer module, and an internal data interaction module. Among them, the bus driver module implements hardware communication driving, the bus interface module provides protocol layer data routing; the protocol layer routing communicates with the diagnostic module through the diagnostic protocol to realize diagnostic functions; the network management module manages the network through the network management module protocol; the internal data interaction module realizes data interaction between ECUs; and the runtime environment abstraction layer connects with the communication management module to realize communication with the application layer.

[0058] The XCP protocol enables data measurement and calibration, while the AUTOSAR software architecture's bus interface enables data transmission and reception. The embedded operating system's task scheduling enables DAQ periodic uploading for different channels.

[0059] like Figure 3 As shown, the XCP protocol sends data through the CanIf_Transmit function of the CAN interface module. After successful transmission, the CanIf_TxConfirmation callback function is called to confirm that the data transmission was successful.

[0060] The XCP protocol receives and processes measurement data through the CanIf_RxIndication function of the CAN interface module. Specifically, it implements XCP's unique Block transmission response mechanism, including DAQ and STIM processing flows, as well as event and command error handling mechanisms. Since each CAN message frame contains a maximum of 8 bytes of data, data shorter than 8 bytes needs to be padded with 0xFF. Therefore, after receiving the data, the message length needs to be checked, the correctness of the received command needs to be determined, and finally, the appropriate processing is performed. (XCP has 64 request commands, and the processing method for each request command can be configured in the Autosar tool.)

[0061] In Block mode, when processing DOWNLOAD and PROGRAM commands, the command data packet needs to be stored in the buffer pool first. It is then determined whether the total byte length of the current calibration or write command is greater than 6. If not, the status is set to receive; if it is greater than 6, the status is set to module receive, the buffer pool ID is set to DNLOAD_NEXT or PROGRAM_NEXT, and the receiving process ends.

[0062] The XCP protocol communicates in a master-slave mode. The master typically refers to the PC-side calibration software, while the slave typically refers to the ECU module containing the XCP protocol. The master connects to the slave via the CONNECT command in the calibration command group. After establishing a connection, the master can send DOWNLOAD and UPLOAD commands from the calibration command group to calibrate and measure data, send the SET_CAL_PAGE command from the page switching group to switch between different areas of RAM and Flash, send commands such as WRITE_DAQ from the DAQ / STIM command group to upload calibration data in real time, and also send the PROGRM command from the Flash write command group to store command data.

[0063] In the XCP protocol, calibration commands are mainly used for establishing connections between the host and slave devices, uploading and downloading data, and verifying data. Some of the commands included are shown in the table below:

[0064] Table 1

[0065] Some standard commands Function CONNECT Establish connection DISCONNECT Disconnect GET_STATUS Get XCP status SET_MTA Set address UPLOAD Upload DOWNLOAD download DOWNLOAD_NEXT Continuous download GET_SEED Get seeds UNLOCK Unlock GET_CAL_PAGE Get the work page SET_CAL_PAGE Set up work page

[0066] The master and slave devices establish a connection using the CONNECT command. If uploading or downloading data requires unlocking, the key must be obtained using the GET_SEED command, and then the UNLOCK command must be used to unlock. After successful unlocking, the working address is specified using the SET_MTA command, and then the data corresponding to that address can be downloaded using the DOWNLOAD command or uploaded using the UPLOAD command. After the data transmission is complete, the connection between the master and slave devices can be disconnected using the DISCONNECT command.

[0067] The SET_CAL_PAGE command is used to invoke the Overlay driver function via the XCP CALLOUT callback function to complete the memory remapping work and prepare for the calibration work.

[0068] Example 2

[0069] This embodiment provides an AUTOSAR-based motor controller XCP calibration device, including:

[0070] The XCP protocol implementation module is used to parse the pre-generated XML communication description and DBC file through the AUTOSAR configuration tool, and to configure the XCP protocol stack and associated XCP application layer APIs. The XML communication description is generated based on the parameters of the CAN driver node used by XCP, and the DBC file defines the XCP message ID. The configuration of the XCP protocol stack includes configuring the DAQ and Eventchannel used by it and configuring the RAM remapping function.

[0071] A2L file generation module: used to integrate and compile the configuration code generated during the XCP protocol implementation phase, and generate A2L files using automated scripts based on the calibrated address information in the compilation results;

[0072] Calibration and verification module: After loading the A2L file through the host computer, it connects to the motor controller using XCP standard commands, obtains the RAM remapping address of the observed quantity and the calibration quantity from the motor controller, writes the calibration quantity parameter value to the corresponding RAM remapping address, and uploads the calibration parameter value to the host computer periodically by the static DAQ list.

[0073] The device provided in this embodiment can execute the AUTOSAR-based motor controller XCP calibration method provided in any step of Embodiment 1, and has the corresponding functional modules and beneficial effects of the execution method.

[0074] Example 3

[0075] This embodiment provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the AUTOSAR-based motor controller XCP calibration method provided in any step of Embodiment 1.

[0076] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0077] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0078] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0079] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0080] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. An AUTOSAR-based motor controller XCP calibration method, characterized in that, include: XCP protocol implementation phase: The pre-generated XML communication description and DBC file are parsed using the AUTOSAR configuration tool, and the XCP protocol stack and associated XCP application layer APIs are configured; the XML communication description is generated based on the parameters of the CAN driver node used by XCP, and the DBC file defines the XCP message ID; configuring the XCP protocol stack includes configuring the DAQ and Event channels used and configuring the RAM remapping function. A2L file generation stage: The configuration code generated in the XCP protocol implementation stage is integrated and compiled, and A2L files are generated using automated scripts based on the calibrated address information in the compilation results; Calibration and verification phase: After loading the A2L file through the host computer, connect to the motor controller using the XCP standard command and obtain the RAM remapping address of the observation address and the calibration quantity from the motor controller. Write the calibration quantity parameter value into the corresponding RAM remapping address and upload the calibration parameter value to the host computer periodically using the static DAQ list. Methods for configuring RAM remapping functionality include: This ensures that the addresses of the calibrated values ​​all fall within the FLASH area specified after compiling and linking the BSW project; Memory remapping is achieved through the XCP application layer API, remapping the FLASH area where the calibrator is located to the shared RAM memory area; The step of integrating and compiling the configuration code generated in the above steps, and generating an A2L file using an automated script based on the calibrated address information contained in the compilation result, includes: Read the calibrated address and length of a specified FLASH area using an A2L script; Call the ASW layer in the AUTOSAR architecture to pre-generate A2L files and A2L header files containing actual project information, and obtain the calibrated data types and annotations; The A2L script combines the calibrated address, length, calibrated data type, and comments to generate a complete A2L file.

2. The AUTOSAR-based motor controller XCP calibration method according to claim 1, characterized in that, Before parsing the pre-generated XML communication description and DBC file using the AUTOSAR configuration tool, the following steps are also included: Use the MCAL configuration tool to configure the CAN controller node parameters used by XCP in the CAN driver, and generate an XML communication description based on the CAN controller node parameters; Use the CANDB++ tool to create a DBC file containing XCP information and determine the XCP message ID.

3. The AUTOSAR-based motor controller XCP calibration method according to claim 1, characterized in that, The step of parsing the pre-generated XML communication description and DBC file using the AUTOSAR configuration tool includes: Read the CAN controller node parameters from the XML communication description and load them into the AUTOSAR configuration tool; Read the XCP message ID from the DBC file and establish a mapping relationship between the message ID and the CAN channel.

4. The AUTOSAR-based motor controller XCP calibration method according to claim 3, characterized in that, The methods for configuring DAQ using the AUTOSAR configuration tool include: Event channels are created according to a preset cycle and bound to the corresponding DAQ list; each DAQ list contains multiple ODTs and ODT Entries for transmitting information between the motor controller and the host computer.

5. The AUTOSAR-based motor controller XCP calibration method according to claim 1, characterized in that, The step of connecting to the motor controller using XCP standard commands and obtaining the RAM remapping address of the observed address and the calibrated quantity from the motor controller includes: Establish a connection with the motor controller by sending the CONNECT command from the host computer; The host computer sends a GET_CAL_PAGE message to enable the motor controller to read the type of the current working page. The host computer sends a SET_MTA message to set the subsequent DOWNLOAD target address to the RAM remapping address corresponding to the working page address.

6. The AUTOSAR-based motor controller XCP calibration method according to claim 5, characterized in that, The step of writing the calibration parameter values ​​to the corresponding RAM remapping address and periodically uploading the calibration parameter values ​​to the host computer by the static DAQ list includes: The new calibration parameter value is written to the RAM address specified by SET_MTA by executing DOWNLOAD through the host computer. The calibrated parameter values ​​in the corresponding RAM address are copied to the running variables via the motor controller; The corresponding RAM address data is packaged into CAN frames and sent back to the host computer according to the event channel period using a static DAQ list.

7. A motor controller XCP calibration device based on AUTOSAR, characterized in that, include: The XCP protocol implementation module is used to parse the pre-generated XML communication description and DBC file through the AUTOSAR configuration tool, and to configure the XCP protocol stack and associated XCP application layer APIs. The XML communication description is generated based on the parameters of the CAN driver node used by XCP, and the DBC file defines the XCP message ID. The configuration of the XCP protocol stack includes configuring the DAQ and Eventchannel used by it and configuring the RAM remapping function. A2L file generation module: used to integrate and compile the configuration code generated during the XCP protocol implementation phase, and generate A2L files using automated scripts based on the calibrated address information in the compilation results; Calibration and verification module: After loading the A2L file through the host computer, it connects to the motor controller using XCP standard commands, obtains the RAM remapping address of the observation address and the calibration quantity from the motor controller, writes the calibration quantity parameter value to the corresponding RAM remapping address, and uploads the calibration parameter value to the host computer periodically by the static DAQ list; Methods for configuring RAM remapping functionality include: This ensures that the addresses of the calibrated values ​​all fall within the FLASH area specified after compiling and linking the BSW project; Memory remapping is achieved through the XCP application layer API, remapping the FLASH area where the calibrator is located to the shared RAM memory area; The step of integrating and compiling the configuration code generated in the above steps, and generating an A2L file using an automated script based on the calibrated address information contained in the compilation result, includes: Read the calibrated address and length of a specified FLASH area using an A2L script; Call the ASW layer in the AUTOSAR architecture to pre-generate A2L files and A2L header files containing actual project information, and obtain the calibrated data types and annotations; The A2L script combines the calibrated address, length, calibrated data type, and comments to generate a complete A2L file.

8. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the AUTOSAR-based motor controller XCP calibration method as described in any one of claims 1-6.