Getcanmsg - ICP DAS USA mPAC-7186EXD-CAN User Manual

Table of Contents

Advertisement

3.1.12 GetCANMsg

Description:
Receive CAN messages from receive buffer or from CAN bus directly. If
the receive interrupt is set to enable in IntMode parameter of XC100Init
function. This function will read back the CAN message stored in the
software receive buffer. If the receive interrupt is disable, this function
uses the polling method to check if there is any CAN message in CAN
chip buffer. If yes, return the CAN message.
Syntax:
int GetCANMsg(unsigned char *Mode, unsigned long *MsgID
Parameter:
 *Mode: This parameter is used for get the ID type (11-bit or 29-bit ID)
of a CAN message.
 *MsgID: This is for obtaining the ID of a CAN message.
 *RTR: This is for obtaining the RTR of a CAN message.
RTR value
 *DataLen: This is for obtaining the data length of a CAN message.
 *Data: This is for obtaining the Data of a CAN message. The Data
buffer size must be 8 bytes.
 *UpperTime:
stamp unit is us (micro second), This parameter only show the
upper part of time stamp.
Real time stamp = upper part * 0x1000000UL+lower part
 *LowerTime: Get the lower part of time stamp of a CAN message.
I-7188XBD-CAN/μPAC-7186EXD-CAN user manual (ver.1.0.3, May/09/2014)
, unsigned char *RTR, unsigned char *DataLen
, unsigned char *Data, unsigned long *UpperTime
, unsigned long *LowerTime)
This CAN message is not a remote
0
transmit request message.
This CAN message is a remote
1
transmit request message.
Get the time stamp of a CAN message. The time
Meaning
35

Advertisement

Table of Contents
loading

This manual is also suitable for:

I-7188xbd-can

Table of Contents