Hardware Information: Dual Single-Wire CAN card


External HD-15 connector pinout

Pin # Channel Assignment
012GND
021GND
062CAN BUS
071CAN BUS
10BothV- in
15BothV+ in

BUS termination requirements

(None.) NOTE: The should be powered from the same voltage level as other nodes on a connected SWCAN network. Mismatch of supply voltages can cause misdetection of high-voltage wakeup messages; the high voltage used in such messages is referenced to each module's supply voltage.

Event definitions


The following values may be transmitted as FT_EVENT type GCProtocol frames.
The event value will be in the event field of such a frame.
Note: Please see the include files dev_527.h or dev_sja.h for numeric values of the following symbols.

Event nameEvent meaning
EVENT_MSG_SENT   An FT_DATA frame with a timestamp value of EVENT_ON_SEND or EVENT_ON_SEND_PROXY has been transmitted. See CMD_SERVER_SET_TIMED_XMIT for more information
 
GCANBUSOFFBus OFF state reached
GCANBUSWARNBus WARNING state reached
GCANBUSOKBus OK (return from Bus WARNING state)
GCANERRFRAMEError Frame / Stuff Error detected (1 data byte for position; see table 1)
GCANARBLOSTArbitration lost (1 data byte for position; see table 1)
GCANRXOVERReceiver overflow detected
GCANFORMForm error detected (1 data byte for position; see table 1)
GCANACKAcknowledgment error (none received during attempted transmit or receive)
GSJABITBit error (1 data byte for position; see table 1)
GSJAOTHEROther error (1 data byte for position; see table 1)

 

The following table decodes the single data byte that accompanies the GCANERRFRAME, GCANFORM, GSJABIT and GSJAOTHER event. Two events, one GSJAOTHER and the other GCANFORM are interpreted by the driver and will never be reported as expected. Both GSJAOTHER events with a data byte of 25 (19 hexadecimal) and GCANFORM events with a data byte of 59 (3B hexadecimal) are reported as GCANACK events. (With no data byte.)

The data byte is shown in binary format. Bit 5 of the values, indicated by x, specifies whether the error occurred while transmitting or receiving the message. A value of 1 indicates the error occurred during reception. A value of 0 indicates that the error occurred during transmission.

TABLE 1  Data byte     Error location
00x0 0011start of frame
00x0 0010ID.28 to ID.21
00x0 0110ID.20 to ID.18
00x0 0100bit SRTR
00x0 0101bit IDE
00x0 0111ID.17 to ID.13
00x0 1111ID.12 to ID.5
00x0 1110ID.4 to ID.0
00x0 1100bit RTR
00x0 1101reserved bit 1
00x0 1001reserved bit 0
00x0 1011data length code
00x0 1010data field
00x0 1000CRC sequence
00x1 1000CRC delimiter
00x1 1001acknowledge slot
00x1 1011acknowledge delimiter
00x1 1010end of frame
00x1 0010intermission
00x1 0001active error flag
00x1 0110passive error flag
00x1 0011tolerate dominant bits
00x1 0111error delimiter
00x1 1100overload flag

 

The following table decodes the single data byte that accompanies the GCANARBLOST event.

TABLE 2  Data byte     Description
0arbitration lost in bit 1 of identifier
1arbitration lost in bit 2 of identifier
2arbitration lost in bit 3 of identifier
3arbitration lost in bit 4 of identifier
4arbitration lost in bit 5 of identifier
5arbitration lost in bit 6 of identifier
6arbitration lost in bit 7 of identifier
7arbitration lost in bit 8 of identifier
8arbitration lost in bit 9 of identifier
9arbitration lost in bit 10 of identifier
10arbitration lost in bit 11 of identifier
11arbitration lost in bit SRTR (Bit RTR for standard frame messages)
12arbitration lost in bit IDE
13arbitration lost in bit 12 of identifier (Extended frame messages only)
14arbitration lost in bit 13 of identifier (Extended frame messages only)
15arbitration lost in bit 14 of identifier (Extended frame messages only)
16arbitration lost in bit 15 of identifier (Extended frame messages only)
17arbitration lost in bit 16 of identifier (Extended frame messages only)
18arbitration lost in bit 17 of identifier (Extended frame messages only)
19arbitration lost in bit 18 of identifier (Extended frame messages only)
20arbitration lost in bit 19 of identifier (Extended frame messages only)
21arbitration lost in bit 20 of identifier (Extended frame messages only)
22arbitration lost in bit 21 of identifier (Extended frame messages only)
23arbitration lost in bit 22 of identifier (Extended frame messages only)
24arbitration lost in bit 23 of identifier (Extended frame messages only)
25arbitration lost in bit 24 of identifier (Extended frame messages only)
26arbitration lost in bit 25 of identifier (Extended frame messages only)
27arbitration lost in bit 26 of identifier (Extended frame messages only)
28arbitration lost in bit 27 of identifier (Extended frame messages only)
29arbitration lost in bit 28 of identifier (Extended frame messages only)
30arbitration lost in bit 29 of identifier (Extended frame messages only)
31arbitration lost in bit RTR of identifier (Extended frame messages only)

Please also see generic events for non card-specific events.


Card-specific IOCTL definitions


These values are used with the CMD_CARD_IOCTL command.
Please see the include files dev_527.h and dev_sja.h for numeric values of IOCTLS and data field bit assignments.

IOCTL nameFunctionData field length/purpose
GCANGETBTRS Get SJA1000 BTR values2 data bytes returned: current BTR0 and BTR1 values
GCANSETBTRS Set SJA1000 BTR values2 data bytes: new BTR0 and BTR1 values
Set values valid only after next INIT ioctl.
GCANGETBC Get SJA1000 Output Control Register1 data byte: current output control register
GCANSETBC Set SJA1000 Output Control Register1 data byte: new output control register
Value valid only after next INIT ioctl.
GCANSETMODE Set internal/external transceiver selection1 data byte: new transceiver selection (effective immediately) (Version 1.1 and above)
GCANGETTRANS Get internal/external transceiver selection1 data byte: current transceiver selection
0 - internal transceiver
1 - external transceiver
GCANSETTRANS Set internal/external transceiver selection1 data byte: new transceiver selection (effective immediately). As above.
GCANSENDERR Send an error frame. (The error level must have its least significant bit set for this to work.)None
GCANRSETSTDID set remote standard IDNone
GCANRSETEXTID set remote extended IDNone
GCANRSETDATA set remote frame dataNone
GCANRENABLE enable remote objectNone
GCANRDISABLE disable remote objectNone
GCANRSETMASKS set remote frame masksNone
GCANSWSETMODE Set transceiver mode1 data byte: new mode. Bits control tool resistance, sleep mode, hi voltage mode, hi speed mode.
See dev_527.h for bit assignments.
GGETERRLEV Get driver error level reporting1 data byte: current mode
Modes include (values may be ORed):
0 - Report Bus Warn and Bus Off conditions
1 - Report all bus errors
2 - Report data overrun
4 - Report arbitration lost
GSETERRLEV Set driver error level reporting1 data byte: new mode (effective after next INIT ioctl). As above.
GSJAGETLISTEN Get listen/normal mode1 data byte: current mode
0 - Normal
1 - Listen only
GSJASETLISTEN Set listen/normal mode1 data byte: new mode
Mode changes only after next INIT ioctl. As above.
GSJAGETSELFTEST Get self test/normal mode1 data byte: current mode
0 - Normal
1 - Self test
GSJASETSELFTEST Set self test/normal mode1 data byte: new mode
Mode changes only after next INIT ioctl. As above.
GSJAGETXMITONCE Get transmit once/normal mode1 data byte: current mode
0 - Normal
1 - Transmit once
GSJASETXMITONCE Set transmit once/normal mode1 data byte: new mode
Mode changes immediately. As above.
GCANSWGETMODE Get transceiver mode1 data byte: current mode. Bits indicate tool resistance, sleep mode, hi voltage mode, hi speed mode.
See dev_527.h for bit assignments.
GCANSWSETMODE Set transceiver mode1 data byte: new mode. Bits control tool resistance, sleep mode, hi voltage mode, hi speed mode.
See dev_527.h for bit assignments.

Notes:

  • While in the listen mode no data may be transmitted and no Acks are appended to received messages. All data on the bus is received as normal. If a message is not Ack'ed by another node, it is not valid message and is not be available to be read. If the error level reporting is set to report bus errors, a GCANACK (Ack error) event will be reported for each unacknowledged message on the bus.
  • While in the self-test mode, the channel appends an Ack to each message it transmits on the CAN bus. This allows the channel to be the only device on a CAN network.
  • While in the transmit once mode, all message transmissions are attempted only once. If arbitration is lost, the message is not transmitted. If an Ack error occurs for a transmitted message and the transmit error count on the SJA1000 chip (available as register 15 (0x0F) via the generic GETREG ioctl) is greater than 127, an Ack is appended to the transmitted message. If the transmit error count is less than 128, an Ack is not appended.
  • Individual error frames may be generated by transmitting a message with the invalid 11-bit ID 0xff 0xff, or the invalid 29-bit ID 0xff 0xff 0xff 0xff. Error level reporting must have its least significant bit set to generate error frames.
  • Reception of a CAN frame with the RTR bit set causes the MODE_REMOTE bit to be set in the mode element of the Data Header of an FT_DATA frame sent to clients. Likewise setting the MODE_REMOTE bit in the mode element of the Data Header of an FT_DATA frame sent to the server causes it to send a CAN frame with the RTR bit set.
  • High voltage wake-up messages are flagged as such in received messages by setting the GCANSWHIVOLT bit in the stat field in the FT_DATA header.
    High voltage messages may be sent two different ways:

    • Set the GCANSWHIVOLT bit in the FT_DATA stat field of a transmitted message

    • Turn on HI VOLTAGE by use of the GCANSWSETMODE IOCTL.
    The first method allows sending of individual high-voltage wake-up frames, but may result in a delay before and after the message as the voltage is switched.
    The second method is preferable if more than one high-voltage wake-up frames are to be set; high-voltage will remain ON until turned off by means of another GCANSWSETMODE IOCTL.