TIP810-SW-42 - VxWorks Device Driver
Page 23 of 36
4.4.1 FIO_T810_SET_BUSTIMING
NAME
FIO_T810_SET_BUSTIMING - Setup new bus timing
DESCRIPTION
This ioctl function modifies the bit timing register of the CAN controller to setup a new CAN bus
transfer speed. A pointer to the caller's parameter buffer (
T810_TIMING
) is passed by the argument
pointer
arg
to the driver.
Keep in mind to setup a valid bit timing value before changing into the Bus On state.
typedef struct
{
unsigned short
timing_value;
unsigned short
three_samples;
} T810_TIMING, *PT810_TIMING;
timing_value
This parameter holds the new value for the bit timing register 0 (Bit 15…8) and for the bit timing
register 1 (Bit 7...0). Possible transfer rates are between 20 Kbit per second and 1.0 MBit per
second. The include file 'tip810.h' contains predefined transfer rate symbols (T810_20KBIT ...
T810_1MBIT, …).
For other transfer rates please follow the instructions of the
SJA1000 Product Specification
,
which is also part of the engineering kit TIP810-EK.
three_samples
If this parameter is TRUE (1) the CAN bus is sampled three times per bit time instead of one.
Use one sample point for faster bit rates and three sample points for slower bit rate to make
the CAN bus more immune against noise spikes.