Application of XCP on FlexRay on Audi

Application of XCP on FlexRay on Audi

In order to optimize the ECU that communicates through the FelxRay bus, Audi uses XCP on FlexRay to calibrate it. One of Audi's needs is that AUTOSAR is compatible with the XCP embedded software module inside the ECU. In response, Vector updated XCP's master and slave software to enable electronic development engineers to effectively perform measurement and calibration.

In 2009, Audi will use the FlexRay bus to communicate on the next generation of sports luxury cars. Compared with the CAN bus, the FlexRay bus provides a bandwidth of up to 10MBit / s. Both the chassis and the driver assistance system are connected to this bus. This means that Audi development engineers must directly parameterize thousands of parameters in AUTOSAR's FlexRay protocol stack. With XCP on FlexRay, it is possible to obtain twice the measured value of CAN communication, and at the same time, high-throughput data transmission is possible.

XCP on FlexRay

Using laboratory models to determine the parameters of control algorithms is greatly restricted. Although the functional algorithm is determined, like the characteristic map, the characteristic curve and some parameter values ​​must be optimized on the test bench and the real vehicle. Audi engineers adjusted their chassis and auxiliary systems in the calibration architecture of the ECU and downloaded the parameter setting files to the ECU's memory.

In order to have a unified interface throughout the development process, measurement and calibration protocol standards must be unified. In 2003, ASAM (AssociaTIon for StandardizaTIon of AutomaTIon and Measuring Systems) defined a unified measurement and calibration protocol-XCP protocol, which is based on the CCP protocol. The XCP communication topology is also the Master-Slave structure mode. As a slave, in order to be able to communicate, the ECU must integrate the XCP software module. The biggest advantage of XCP protocol is that the transport layer and protocol layer are independent. Whether it is CAN bus, FlexRay bus, Ethernet or SPI / SCI, the protocol layer is the same. In February 2006, ASAM released version 1.0 of the XCP on FlexRay protocol.

In the earlier CAN projects, the Audi development team used XCP and CANape in ECU measurement, calibration and diagnosis (see Figure 1). Since 2005, CANape has supported the XCP on FlexRay interface. Audi requires the supplier ’s XCP master device to be CANape, while using XCP on FlexRay protocol in the slave device.

As the XCP on FlexRay master device, CANape directly measures and calibrates a single ECU via the FlexRay bus

Figure 1: As the XCP on FlexRay master device, CANape measures and calibrates a single ECU directly through the FlexRay bus

XCP integrated in AUTOSAR module

Audi integrates XCP software modules for ECUs from different vendors. Even after the ECU calibration is completed, the XCP software module is also useful, so that the memory can be effectively used and the execution time is minimized. In addition, the XCP software module must be compatible with AUTOSAR. By using PDU router, Vector realizes the compatibility of XCP and AUTOSAR. During integration, the GENy configuration tool and FIBEX format network description file can help configure the XCP protocol and XCP transport layer.

Vector provides XCP software module and AUTOSAR3.0 compatible architecture diagram

Figure 2: XCP software module provided by Vector is compatible with AUTOSAR3.0

Dynamic management of FlexRay bandwidth

Since the XCP on FlexRay software module must be compatible with AUTOSAR, this means that the PC supporting the master must also perform special tasks. During the ECU calibration, the XCP master device and slave device exchange FlexRay messages. These messages either contain a command transmission object (CTO), or a data transmission object (DTO) or excitation data. When the XCP object is transmitted to the master (see Figure 3), the "XCP transport layer" transmits the data to the PDU router, and then to the "FlexRay interface". Since it is compatible with AUTOSAR, these transmissions must be performed in accordance with the format of AUTOSAR PDU (Protocol Data Unit). Because the PDU comes from the XCP module, it is called XCP-PDU. The FlexRay interface completes the received XCP-PDU by adding specific information in the form of PCI (Protocol Control InformaTIon), thereby forming an L-PDU (Data Link Layer PDU), which is handed over to the FlexRay driver. Finally, the FlexRay controller transmits XCP data as a frame in a FlexRay time slot.

It is enough to assign two XCP time slots to the ECU control commands (CTOs) separately; for DTOs, the XCP time slot corresponding to each ECU is different.

Block diagram of data transmission via different software modules

Figure 3: Block diagram of data transmission via different software modules

In order to ensure that Audi engineers can effectively transmit XCP data, bandwidth must be dynamically allocated while the ECUs are running. However, AUTOSAR does not allow the FlexRay driver to be reconfigured at runtime. Therefore, when integrating the FlexRay driver, all XCP time slots must be allocated to all ECUs. Gap (see Figure 3). Therefore, the FlexRay schedule for each ECU has a unique XCP time slot, and this time slot is available for each individual XCP buffer. Before each measurement, in order to make ECUs have good flexibility, the XCP transport layer command "FLX_ASSIGN" can be used to change the allocation of XCP buffers for different L-PDUs (Figure 4). In software integration, the most important thing is to configure all ECUs participating in communication with the largest XCP time slot, so that the XCP time slot of each ECU is consistent. Dynamic bandwidth management ensures that there is a unique XCP time slot allocation among all slaves. CANape can manipulate these tasks in the ECU description file A2L database, and the A2L description file provides information about ECU buffering.


Before each measurement

Figure 4: Before each measurement, the XCP object is dynamically configured in the dynamic section

XCP optimizes the internal data of the ECU through the FlexRay bus

The dynamic bandwidth management function of CANape is only one of CANape functions, which can help Audi to effectively calibrate the ECU. The other three functions are: FlexRay bus can transmit up to 254 bytes of data, while CAN bus can only transmit 8 bytes of data in each frame of the message; "Short DownLoad" function can be in a single L-PDU Encode the address and content so that the master and slave exchange memory areas faster than CAN.

In addition, in order to measure each dynamic signal (Figure 5), XCP can be sampled independently of the FlexRay cycle. In each FlexRay basic cycle, CANape can use a function called "multiple DAQlist transmission cycles" to obtain pre-defined DAQlist measurement signals and their multiple time stamps (usually 5ms).

Transfer multiple DAQlists periodically

Figure 5: Periodic transmission of multiple DAQlist

In order to improve the measurement efficiency, the function of the Write-DAQ command is enhanced. The new command Write-DAQ-Multiple replaces the Write-DAQ command, which has been used to configure multiple signals in the XCP protocol version 1.1.

Summary of this article

Audi engineers rely on the MCD tool CANape to successfully use XCP on FlexRay to measure and calibrate the internal parameters of the ECU. Vector has expanded the functions of CANape and XCP software modules. In addition to extending the compatibility of XCP software modules and AUTOSAR, the greater feature is the realization of FlexRay's dynamic bandwidth management. It is very easy for Audi to choose Vector as a software supplier and development partner, because the XCP software modules and XCP master CANape required by Slaves are all from Vector; and all the extensions can be used with XCP on FlexRay software from the current CANape version. Obtained in the module.

SFF-8644

Sff-8644,12G High Speed Cable,Data Communication Cable,Communication Cable,SAS3.0

Dongguan Aiqun Industrial Co.,Ltd , https://www.gdoikwan.com

This entry was posted in on