Device Requirements For CAN Transceiver Tests
Device Requirements For CAN Transceiver Tests
Device Requirements For CAN Transceiver Tests
Version 1.3.1
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -1- Fachhochschule Braunschweig/Wolfenbüttel
Contents
CONTENTS............................................................................................................................................ 2
HARDWARE REQUIREMENTS FOR TRANSCEIVER TESTS .................................................................. 3
HARDWARE REQUIREMENTS FOR TRANSCEIVER TESTS .................................................................. 3
SUPPORTED INTERFACES ................................................................................................................ 3
14 PIN DIL SOCKED: ........................................................................................................................... 3
SBC DEVICE WITH OR WITHOUT SPI CONTROL AND DEVICES MORE THAN 14 PINS. .................... 4
SOFTWARE REQUIREMENTS FOR TRANSCEIVER TESTS................................................................... 5
SPI DRIVER FOR SBC DEVICES ........................................................................................................ 5
TRANSCEIVER APPLICATION PROGRAMMING INTERFACE .......................................................................... 5
INTEGRATION OF DRIVER INTO TEST SOFTWARE ....................................................................................... 7
MISC...................................................................................................................................................... 8
LITERATURE ......................................................................................................................................... 9
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -2- Fachhochschule Braunschweig/Wolfenbüttel
Hardware Requirements for Transceiver Tests
Supported Interfaces
We offer two sockets for low speed- or high speed transceiver device. Please find below the possible
interfaces and pinning .
INH 1 14 Vbat
TXD 2 13 GND
RXD 3 12 CANL
/ERR 4 11 CANH
/STB 5 10 Vcc
EN 6 9 RTL
/WAKE 7 8 RTH
Note:
For emulated devices you have to provide us at least with STB and EN timings.
Devices with 8 pins or different package must be placed on a 14 pin DIL adapter and routed to the related
pins by customer.
Inverted signals for INH, ERR, EN, STB or WAKE will be adapted by test software.
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -3- Fachhochschule Braunschweig/Wolfenbüttel
SBC device with or without SPI control and devices more than 14 pins.
13 12
14 11 INT
15 10 SCLK
VCC 20 5 STB
CH 21 4 ERR
CL 22 3 RXD
GND 23 2 TXD
VBAT 24 1 INH
14 11
15 10
device should be placed here
16 9
and routed to desired pins.
17 8
max 50 mm
27.94 mm
18 7
19 6
20 5
21 4
22 3
23 2
24 1
max 50 mm max 5 mm
no limit
7.62 mm
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -4- Fachhochschule Braunschweig/Wolfenbüttel
Software Requirements for Transceiver Tests
Devices controlled by SPI commands requires a additional software implementation. This driver has to be
delivered by the customer.
The driver has to be written in c-code matching the cosmic-cross-compiler v4.21. Source-code has to be
delivered for eventual necessary adaptations.
Function descrition:
/***********************************************************************************************
* unsigned char TRX_API_Init (void)
*
* FILENAME: TRX_API.H
*
* PARAMETERS: --
*
* DESCRIPTION: use this function to initialize your driver
*
*
* RETURNS: Error value
* TRX_FCT_ERROR -> error during execution
* 0 no error
* > 0 error e.g. error code !!!!!!!!!!values to be defined !!!!!!!!!!!!
*
***********************************************************************************************/
unsigned char TRX_API_Init (void);
/***********************************************************************************************
* unsigned char TRX_GetError (void)
*
* FILENAME: TRX_API.H
*
* PARAMETERS: --
*
* DESCRIPTION: read the error information from the transceiver
* REMARK: this function must be fast !!!!!!!!!!!!!!!!!!!!!!!!!!
*
* RETURNS: Error value
* TRX_FCT_ERROR -> error during execution
* 0 no error
* > 0 error e.g. error code !!!!!!!!!!values to be defined !!!!!!!!!!!!
*
***********************************************************************************************/
unsigned char TRX_GetError (void);
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -5- Fachhochschule Braunschweig/Wolfenbüttel
/**********************************************************************************************
** unsigned char TRX_SetOperationMode (unsigned char mode)
*
* FILENAME: TRX_API.H
*
* PARAMETERS: mode to be set
* TRX_NORMAL -> set TRX to normal mode
* TRX_GOTO_SLEEP -> set TRX to sleep mode
* TRX_STANDBY -> set TRX to standby mode
* TRX_RECEIVEONLY -> set TRX to receive only mode
* other values will be ignored
*
*
* DESCRIPTION: set the transceiver in the provided mode
*
* RETURNS: function results
* TRX_FCT_ERROR -> error during execution
* 0 mode is set
* 1 wrong parameter or mode could not be set
* all other values not valid
*
**********************************************************************************************/
unsigned char TRX_SetOperationMode (unsigned char mode);
/**********************************************************************************************
* unsigned char TRX_GetOperationMode (void)
*
* FILENAME: TRX_API.H
*
* PARAMETERS: ---
*
*
* DESCRIPTION: get the transceiver operation mode
*
* RETURNS: transceiver operation mode
* TRX_NORMAL -> TRX is in normal mode
* TRX_SLEEP -> TRX is in sleep mode
* TRX_STANDBY -> TRX is in standby mode
* TRX_RECEIVEONLY -> TRX is in receive only mode
* TRX_FCT_ERROR -> error during execution
* other values are not valid
*
*
**********************************************************************************************/
unsigned char TRX_GetOperationMode (void);
/**********************************************************************************************
* unsigned char TRX_GetINHState (void)
*
* FILENAME: TRX_API.H
*
* PARAMETERS: --
*
* DESCRIPTION: read the status of the INH bit
* REMARK: this function must be fast!!!!!!!!!!!!!!!!!!!!!!!!!!
*
* RETURNS: Error value
* TRX_FCT_ERROR -> error during execution of function
* TRX_INH_STATUS_ON -> INH == 1 -> voltage regulator on
* TRX_INH_STATUS_FLOATING -> INH == 0 -> voltage regulator on
* > 0 error e.g. error code !!!!!!!!!!values to be defined !!!!!!!!!!!!
*
*
**********************************************************************************************/
unsigned char TRX_GetINHState (void);
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -6- Fachhochschule Braunschweig/Wolfenbüttel
/**********************************************************************************************
* unsigned char TRX_WD (void)
*
* FILENAME: TRX_API.H
*
* PARAMETERS: --
*
* DESCRIPTION: kill watchdog by sending spi commands within desired time
* must be fast
*
* RETURNS: Error value
* TRX_FCT_ERROR -> error during execution of function
* > 0 error e.g. error code !!!!!!!!!!values to be defined !!!!!!!!!!!!
*
*
**********************************************************************************************/
unsigned char TRX_WD (void);
Following functions:
• TRX_GetError()
• TRX_SetOperationMode()
• TRX_GetOperationMode()
• TRX_GetINHState()
The function TRX_WD() is called in a timer interrupt function within every 500µs. Use this timer called
function to satisfy your device watch dog with spi commands if needed.
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -7- Fachhochschule Braunschweig/Wolfenbüttel
Misc
µC
The used µC for this test system is the motorola hc12dg128 with 2 can interfaces running with 8Mhz
crystal.
Devices
For network testing we need at least 50 transceiver for lowspeed- and 25 transceiver for highspeed-
testing.
Address
c&s / fh-wolfenbüttel
am exer 2c
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -8- Fachhochschule Braunschweig/Wolfenbüttel
Literature
http://www.motorola.com
http://www.phillips.com
http://www.cosmic-software.com
c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
2002 c&s -9- Fachhochschule Braunschweig/Wolfenbüttel