---
# System prepended metadata

title: 'Survey: XCP Protocol'
tags: [XCP, SC, Autosar]

---

# Survey: XCP Protocol

###### tags: `XCP` `Autosar` `SC`

:::info
Note ID: D01A0000
:::

## Note
- XCP (Universal Measurement and Calibration Protocol)
    - Master & Slave
        - A key functionality of XCP is that it enables read and write access to the memory of the Slave.
            - ![](https://i.imgur.com/M3o8RH1.png)
        - CTO & DTO Mode 

    
- XCP commands (7 groups)
    - DTO Related: DAQ, STIM
        - STIM: Master to Slave
        - DAQ : Slave to Master
    - CTO Related: CMD, RES, ERR, EV, SERV
        - CMD: the commands from Master to Slave
        - RES: the responses from slave to master
        - ERR: the errors from slave to master 
        - EV: the events from slave to master
        - SERV: the requests about service from slave to master
- XCP a2l document
    - Including some information about XCP processing, e.g. ECU data. 

## XCP Message

![](https://i.imgur.com/c1zztbk.png)

## XCP Message Flow in Autosar

- CAN Driver -> CAN Interface -> XCP Module -> RTE -> SWM7
    - CAN Interface -> XCP Module
        - ![](https://i.imgur.com/JXI0jnz.png)
          > CanIf_Cfg.h
    - RTE -> SWM7
        - ![](https://i.imgur.com/e2zAvZL.png)
          > Define extern parametr in CtAp_SWM7_CANHandler_EDSF.h
        - ![](https://i.imgur.com/iNH3ITz.png)




Reference:
- [AUTOSAR中的CAN信息是如何转换的](https://zhuanlan.zhihu.com/p/33040632)


## Issue List
- [Issue : PC tool can't read value from memory through XCP](/XWWmxl7qRZy5vRMp_K5k-g)

## Reference
- [工控学习，搞工控的到底什么是上位机，什么是下位机？](https://zhuanlan.zhihu.com/p/60860072)
- [基于XCP协议分析和理解](https://blog.csdn.net/AgingMoon/article/details/78207245)
- [xcp标定协议与接口](https://blog.csdn.net/qq_25920091/article/details/106422071#XCP_1)
- [Adaptive AUTOSAR中的标定和测量方案-XCP](https://zhuanlan.zhihu.com/p/366979342)
- [Autosar Specification: XCP](/OpUoQQdHT_i5zWmFQFWIgw)
- [Vector XCP Reference Book](https://cdn.vector.com/cms/content/application-areas/ecu-calibration/xcp/XCP_ReferenceBook_V3.0_EN.pdf)
- [ASAM XCP Wiki](https://www.asam.net/standards/detail/mcd-1-xcp/wiki/)
- [5分钟看懂XCP协议](https://zhuanlan.zhihu.com/p/148276769)