Open-source CAN Calibration Protocol (CCP) implementation
[Reference: CAN Calibration Protocol - Version 2.1. Author: H. Kleinknecht. Distribution: public] "The Controller Area Network CAN is a joint development of Robert Bosch GmbH and Intel Corporation. CAN is used in many high-end automotive control systems like engine management as well as in industrial control systems. Controller chips for CAN are available from various semiconductor manufacturers. The CAN Calibration Protocol is part of the ASAP standards. It was developed and introduced by Ingenieurbüro Helmut Kleinknecht, a manufacturer of calibration systems, and is used in several applications in the automotive industry. The CCP was taken over by the ASAP working group and enhanced with optional functions."
Subset of the standard implemented
The implementation privided by Erika distribution is limited to the following subset of CCP commands:
- CONNECT 0x01
- EXCHANGE_ID 0x17
- SET_MTA 0x02
- DNLOAD 0x03
- DNLOAD_6 0x23
- UPLOAD 0x04
- SHORT_UPLOAD 0x0F
- GET_DAQ_SIZE 0x14
- SET_DAQ_PTR 0x15
- WRITE_DAQ 0x16
- START_STOP 0x06
- DISCONNECT 0x07
- SET_S_STATUS 0x0C
- GET_S_STATUS 0x0D
- START_STOP_ALL 0x08
- BUILD_CHECKSUM 0x0E
- MOVE 0x19
- TEST 0x05
This implementation has been succesfully used by third party companies in conjunction with commercial suite (like ATI Vision)
The only target freely supported at this moment is the Freescale MPC5643L (Leopard). A demo showing a basic use-case of CCP protocol is available on the Erika kernel and can be chosen as template in RT-druid IDE.
To test the demo from RT-Druid IDE, please follow this sequence of operations:
- File -> New -> "Rt Druid Oil and C/C++ projects"
- Chose a name for your project and then press "Next"
- set a flag on "Create a project using one of these templates"
- Chose e200zx -> Leopard -> CCP_demo
- Press "Finish"
Running the demo with PCAN-View
- The CAN-dongle currently adopted for Erika CCP demo is PCAN-USB developed by Peak-System. Useful details can be found at:
- In order to provide a easy to use setup to test the demo a PCAN-View configuration file is provided by Erika distribution. It can be found in the Erika distribution at:
Note: PCAN-View (the CAN tool provided by Peak System to monitor a CAN network) can be found at: http://www.peak-system.com/PCAN-View.242.0.html?&L=1
- Additional information about the demo can be found in the related readme.txt file at:
- Connection between PCAN-USB and Leopard ECB
details about connection are shown in the readme.txt file. On PCAN_view side:
- chose 500Kb speed and then press "OK".
- from PCAN-View interface press "Open File", then chose PCAN_CCP_TEST_LEOPARD_ADC.xmt file present in the CCP_demo directory, press "OK"
A snapshot of the scenario is shown in the following picture.
The environment adopted by third party companies is:
- ATI Vision 3.3 (Used as CCP Master tool);
- Kvaser USBCan II (but Peak System PCAN-USB is succesfully used too);
- MPC56XX EVB as Target board (with a MPC5643L on the doughter board)
Additional notes: a demo using Leopard and CCP protocol to monitor a variable can be found under "examples/ppc/templates/leopard/ccp_leopard", while CCP implementation is under "contrib/Ccp"
This work has been developed in collaboration with Piaggio & C. Spa and Evidence, and published in the Paper
Towards an Open Source Framework for Small Engine Controls Development Paolo Gai, Francesco Esposito, Riccardo Schiavi, Evidence Srl; Marco Di Natale, Scuola Superiore S. Anna; Claudio Diglio, Michele Pagano, Carlo Camicia, Luca Carmignani, Piaggio & C SpA, SAE SETC 2014, Pisa, Italy, paper ID 2014-32-0070