Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

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 .

14 pin DIL socked:

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:

No further software is required for stand alone devices.

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.

Missing INH, ERR, EN and STB can be left open.

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

16 9 SIN SPI communication with HC12 is provided


by pins SIN, SOUT and SCLK.
row distance 0.3 inch
17 8 SOUT
SPI requires a special software driver,
RTH 18 7 WAKE which is to be delivered by customer.
RTL 19 6 EN See Software requirements.
24pol dil

VCC 20 5 STB

CH 21 4 ERR
CL 22 3 RXD

GND 23 2 TXD

VBAT 24 1 INH

Adapter top view


13 12

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

customers adapter board


Adapter side view
c&s board standard dil 24pol socket

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

SPI driver for SBC devices

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.

The test software expects following functions combined in TRX_API.H file.

Transceiver Application Programming Interface

Function descrition:

/* constanten definition for transceiver */


#define TRX_NORMAL 0x01
#define TRX_SLEEP 0x00
#define TRX_RECEIVEONLY 0x02
#define TRX_STANDBY 0x03
#define TRX_GOTO_SLEEP 0x04

#define TRX_FCT_ERROR 0xFF

#define TRX_INH_STATUS_ON 0x01


#define TRX_INH_STATUS_FLOATING 0x02

/***********************************************************************************************
* 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);

Integration of driver into test software

The function TRX_API_INIT is called in main routine before entering while(1){....}.

Following functions:

• TRX_GetError()
• TRX_SetOperationMode()
• TRX_GetOperationMode()
• TRX_GetINHState()

are called after user requests for it in pc gui.

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

Please send your devices to below address:

c&s / fh-wolfenbüttel
am exer 2c

38302 wolfenbüttel / germany

do not feel hazitate to ask more details.

Phone +49 5331 939 6601


Web http://www.cs-group.de

c&s
AMa/FF TRX_Tests_Device_Requirements_V131.doc 02/2002 communication & systems group
 2002 c&s -8- Fachhochschule Braunschweig/Wolfenbüttel
Literature

Documentation for the hc12dg128 µC is available at

http://www.motorola.com

Documentation for TJA1054 and TJA1041 is available at

http://www.phillips.com

Documentation for Cosmic-Cross-Compiler is available at

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

You might also like