Regarding PCAN XCP API Development

A free API for the communication with control units based on the Universal Measurement and Calibration Protocol (XCP) by ASAM for Windows®
Post Reply
Shalin
Posts: 3
Joined: Fri 6. Jan 2023, 10:21

Regarding PCAN XCP API Development

Post by Shalin » Fri 6. Jan 2023, 17:48

Hi,
Im currently working on Pcan XCP api with peak usb CAN bus. I try to understand the example code provide for pcan XCP api but it is provided with C++. So please help with example code based on C language for interfacing XCP over CAN.
And in advance Thanks,

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Regarding PCAN XCP API Development

Post by PEAK-Support » Sat 7. Jan 2023, 12:54

Please read the forum rules if you are not sure where to post any requrests - we moved the topic to the correct section. ** ADMIN **
We do no support raw C samples for the API´s. But the Software API we provide could be used also with Standard C and any other programming language on Windows.
It is up to the user then to include the header File to the C project, and use the declaration of the functions in the code - see PXCP.h
There is no different in the header between C and C++.
The rest is studing and reading the documentation and also go to the sample code of the other programming languages.
As a software developer you should be able to do this and so understand how it work.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Shalin
Posts: 3
Joined: Fri 6. Jan 2023, 10:21

Re: Regarding PCAN XCP API Development

Post by Shalin » Mon 9. Jan 2023, 04:05

Thank you, I will try.

Shalin
Posts: 3
Joined: Fri 6. Jan 2023, 10:21

Re: Regarding PCAN XCP API Development

Post by Shalin » Sat 21. Jan 2023, 06:27

Sry, Im new to the field, now I have doubt to configure single api for different slaves. I implemented like this and my understanding may be wrong. So kindly clarify my doubt regarding that function.
res = XCP_TransportLayerCommand(XcpChannel,GET_SLAVE_ID,par_buffer,par_buffer_length,cto_buffer,cto_buffer_length);
Retur(res,"\n bus system dependent get the can ID ");

/**< XCP_AddSlaveOnCAN */
CanLayer.BroadcastID=0xFF;
CanLayer.MasterID= 0x7FF;

CanLayer.IncrementalIdUsed=true;

/**< Transport layer configuration */
XcpProtocol.T1=1;
XcpProtocol.T2=3;
XcpProtocol.T3=5;
XcpProtocol.T4=2;
XcpProtocol.T5=2;
XcpProtocol.T6=1;
XcpProtocol.T7=1; //15 millis time out
/* XcpProtocol.MotorolaFormat=false; //Little endian(LSB to MSB)
XcpProtocol.AddressGranularity=0; */

res = XCP_AddSlaveOnCAN(XcpChannel,CanLayer,XcpProtocol,&XcpSession);
Retur(res,"XCP_AddSlaveOnCAN");

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Regarding PCAN XCP API Development

Post by PEAK-Support » Sun 22. Jan 2023, 13:45

We are sorry, but we do not understand your request. Please read the XCP Developer and API Documentation.
You need to know how the XCP Protocol work, to use the API. We could not support basic understanding of XCP.
This forum is a commercial forum, for PEAK-System Products. If you have any specific question of our implementation, feel free to ask.
But for basic protocol specification questions, please use the official XCP Documentation. (see ASAM MCD-1 XCP)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply