MotoHawk XCPSlave CAN Definition

The XCP CAN Definition block defines the CAN settings necessary to manage an XCP connection on CAN.

Block ID

XCPSlave CAN Definition

Library

MotoHawk_Protocols_lib

Description

This block establishes a logical XCP connection on the indicated CAN channel. There can be as many XCP CAN Definition blocks in the application model as is desired. There can be more than one XCP CAN definition block referencing the same CAN channel, but these blocks will need to be configured with unique CAN identifiers.

The CAN identifiers are adjustable at runtime when "Allow attributes marked with a * to be calibrated." is checked. The adjustment of the CAN receive identifiers must adhere to the MotoHawk CAN Slot qualities of having a design time fixed portion of the CAN identifier and a runtime adjustable portion of the CAN identifier. The runtime adjustable portion of the CAN receive identifier is specified by a zero in that portion of the CAN receive mask. A one in a portion of the CAN receive mask specifies that the design time constant value of the receive identifier is always used at runtime. The runtime portion of the CAN receive identifier is taken from the 32 bit unsigned integer data store which is specified by "Receive ID Data Store Reference." The entirety of the DTO identifier is adjustable at runtime as it is an identifier for transmit. Note that the runtime values of the data store references are only applied at the application startup time. Also be aware that CAN receive masks which are permissive of more mask bits can cause lower CPU performance on a busy CAN bus, as compared to more restrictive CAN receive masks.

To provide an example of the runtime adjustable CAN identifiers, suppose that the CRO to be used is a standard identifier starting at 0x200 and the DTO to be used is also a standard identifier starting at 0x210. If there are 15 possible runtime values desired to be supported, the CAN receive mask can be configured as 0x7F0. If the data store for the receive identifier was specified as "NonvolatileXCP_ReceiveId," and if the desire was to have the runtime pair of 0x208 and 0x218, the runtime value of 0x208 should be present in the "NonvolatileXCP_ReceiveId." Likewise given the data store reference to "NonvolatileXCP_TransmitId," the "NonvolatileXCP_TransmitId" data store should have a runtime value of 0x218.

By default the XCP Command packets are responded to in IDLE time of the application, while data acquisition list (DAQ) packets will be transmitted in association with the event trigger requested by the XCP Master. The priority of XCP Command servicing can be specified via the Protocol Execution Priority Definition block. The configuration of available DAQ event triggers is provided by the Event Definition block.

DAQ lists have a limitation that the number of DAQ lists * the number of ODTs per list must be less than or equal to 252. The number of ODT Entries per ODT is fixed at 7 for CAN.

It is common that an XCP instance such as this one is accessed by an XCP Master device by loading an ASAP2 file. Generation of an ASAP2 file may be accomplished through the use of the ASAP2 Definition block

Block Parameters

Parameter Field Values Comments/Description
XCP Instance Name String The unique name assigned to this logical CAN connection.
CAN Channel Name String Specify which CAN channel to use - CAN_1, CAN_2, CAN_3
Receive Queue Size Number The number of block transfer packets to buffer
Receive ID (CRO)* Number, 29 or 11 bits The CAN Identifier used to send messages to this XCP connection.
Receive ID Type (0=Std, 1=Ext) Number, 0 or 1 Specify 0 for Standard (11-bit identifiers), 1 for Extended (29-bit identifiers) on the CAN bus.
Broadcast Receive ID* Number, 29 or 11 bits The CAN Identifier used for broadcast messages on this CAN channel.
Transmit ID (DTO/DAQ)* Number, 29 or 11 bits The CAN Identifier this XCP connection uses to send responses or DAQ.
Transmit ID Type (0=Std, 1=Ext) Number, 0 or 1 Specify 0 for Standard (11-bit identifiers), 1 for Extended (29-bit identifiers) on the CAN bus.
Total Number of DAQs (1-252) Number, 1-252 Set the number of Data Acquisitions (DAQs) for this CAN connection. DAQs are lists of automatically transmitted signals.
Total Number of Object Descriptors (ODT) per (DAQ) (1-252) Number, 1-252 Set the number of Object Descriptors (ODTs) per Data Acquisition list. ODTs determine the length of each DAQ list in CAN messages.
Allow attributes marked with a * to be calibrated. Calibration applied at KeyOn Check box (enable) When checked, enables runtime adjustable CAN identifiers.
Receive ID Mask Number, 29 or 11 bits A CAN identifier mask, usually hex2dec('1FFFFFFF')
Receive ID Data Store Reference Alpha-numeric text Specifies an existing uint32 scalar data store name.
Broadcast Receive ID Mask Number, 29 or 11 bits A CAN identifier mask, usually hex2dec('1FFFFFFF')
Broadcast Receive ID Data Store Reference Alpha-numeric text Specifies an existing uint32 scalar data store name.
Transmit ID Data Store Reference Alpha-numeric text Specifies an existing uint32 scalar data store name.