Tews Technologies TIP810-SW-42 User Manual Download Page 34

TIP810-SW-42 - VxWorks Device Driver

Page 34 of 36

4.4.9 FIO_T810_DISABLE_ LISTENONLY

NAME

FIO_T810_DISABLE_ LISTENONLY - Disable listen only mode

DESCRIPTION

This ioctl function disables the listen only facility of the SJA1000 CAN controller, which was before
enabled with the ioctl command FIO_T810_ENABLE_ LISTENONLY.

The optional argument pointer can be omitted in this ioctl function.

This

ioctl

command

will

be

accepted

only

in

reset

mode

(BUSOFF).

Enter

FIO_T810_SET_BUSOFF first otherwise you will get an error (S_t810Drv_NOBUSOFF).

EXAMPLE

#include

“tip810.h”

int fd;

int result;

result = ioctl(fd, FIO_T810_DISABLE_LISTENONLY, 0);

if (result == ERROR) {

/* handle ioctl error */

}

ERRORS

S_t810Drv_NOBUSOFF

The CAN controller is in operating mode. This
mode can be changed only in reset mode.

SEE ALSO

SJA1000 Product Specification Manual –

6.4.3 MODE REGISTER (MOD)

Summary of Contents for TIP810-SW-42

Page 1: ...November 2008 TEWS TECHNOLOGIES GmbH TEWS TECHNOLOGIES LLC Am Bahnhof 7 25469 Halstenbek Germany www tews com Phone 49 0 4101 4058 0 Fax 49 0 4101 4058 19 e mail info tews com 9190 Double Diamond Park...

Page 2: ...ccurate and complete However TEWS TECHNOLOGIES GmbH reserves the right to change the product described in this document at any time without notice TEWS TECHNOLOGIES GmbH is not liable for any damage a...

Page 3: ...2 t810DevCreate 9 4 I O INTERFACE FUNCTIONS 13 4 1 open 13 4 2 read 15 4 3 write 18 4 4 ioctl 21 4 4 1 FIO_T810_SET_BUSTIMING 23 4 4 2 FIO_T810_SET_FILTER 25 4 4 3 FIO_T810_SET_BUSON 27 4 4 4 FIO_T810...

Page 4: ...clusion and queuing mechanism to prevent simultaneous requests by multiple users from interfering with each other The TIP810 SW 42 device driver supports the following features Transmission and receiv...

Page 5: ...AC Carrier Driver CARRIER SW 42 is part of this TIP810 SW 42 distribution It is located in directory CARRIER SW 42 on the corresponding distribution media This IPAC Device Driver requires a properly i...

Page 6: ...n VxWorks project For including the TIP810 SW 42 device driver into a VxWorks project e g Tornado IDE or Workbench follow the steps below Copy the files from the distribution media into a subdirectory...

Page 7: ...devices 3 1 t810Drv NAME t810Drv installs the TIP810 driver in the I O system SYNOPSIS include tip810 h STATUS tip810Drv void DESCRIPTION This function installs the TIP810 driver in the I O system A c...

Page 8: ...OK or ERROR If the function fails an error code will be stored in errno ERROR CODES Error codes are only set by system functions The error codes are stored in errno and can be read with the function...

Page 9: ...setup and prepared for use This function must be called before performing any I O request to this device PARAMETER name This string specifies the name of the device that will be used to identify the d...

Page 10: ...TIMING timing TIP810_DEVCONFIG ipac Pointer to TIP810 module resource descriptor retrieved by CARRIER Driver ipFindDevice function nMsg This argument defines the size of the device read FIFO for buffe...

Page 11: ..._TEWS MODEL_TIP810 0 IPAC_INT0_EN IPAC_LEVEL_SENS IPAC_CLK_8MHZ IPAC_MEM_16BIT IPAC_IACK_CYC ipac if result OK Create the device t810A for the first CAN device Device specific parameters must be set u...

Page 12: ...error occurred during device initialization ERROR CODES The error codes are stored in errno and can be read with the function errnoGet Error code Description S_ioLib_NO_DRIVER The TIP810 driver has n...

Page 13: ...N bus 4 1 open NAME open open a device or file SYNOPSIS int open const char name int flags int mode DESCRIPTION Before I O can be performed to the TIP810 device a file descriptor must be opened by inv...

Page 14: ...d ERROR error handling RETURNS A device descriptor number or ERROR If the function fails an error code will be stored in errno ERROR CODES The error code can be read with the function errnoGet The err...

Page 15: ...by the parameters buffer and maxbytes to the device driver The T810_MSG_BUF structure has the following layout typedef struct unsigned long identifier unsigned char io_flags unsigned char msg_len unsi...

Page 16: ...t overrun conditions either in the CAN controller or intermediate software FIFO Value Description T810_SUCCESS No messages lost T810_FIFO_OVERRUN One or more messages was overwritten in the receive qu...

Page 17: ...TIP810 SW 42 VxWorks Device Driver Page 17 of 36 RETURNS ERROR or number of data bytes read 0 8 In the case of ERROR see tip810 h for device specific error codes SEE ALSO ioLib basic I O routine read...

Page 18: ...e The T810_MSG_BUF structure has the following layout typedef struct unsigned long identifier unsigned char io_flags unsigned char msg_len unsigned char data 8 unsigned char status int timeout T810_MS...

Page 19: ...Data 1 and so on timeout Specifies the amount of time in ticks the caller is willing to wait for execution of write A timeout value of WAIT_FOREVER means wait indefinitely a value of NO_WAIT means do...

Page 20: ...VxWorks Device Driver Page 20 of 36 RETURNS ERROR or number of data bytes written 0 8 In the case of ERROR see tip810 h for device specific error codes retrieved by errnoGet SEE ALSO ioLib basic I O r...

Page 21: ...request Aborted requests return an ERROR with errno set to S_t810Drv_ABORT No argument is required for this call FIOFLUSH This I O control function flushes the read ring buffer No argument is require...

Page 22: ...the header file tip810 h must be included in the application RETURNS On success OK is returned In the case of an error a value of ERROR is returned The global variable errno contains the detailed err...

Page 23: ...s 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...

Page 24: ...result T810_TIMING timing timing timing_value T810_100KBIT timing three_samples 0 result ioctl fd FIO_T810_SET_BUSTIMING int timing if result ERROR handle ioctl error SEE ALSO tip810 h for predefined...

Page 25: ...e mask registers allow defining certain bit positions to be don t care a 1 at a bit position means don t care A pointer to the caller s parameter buffer T810_FILTER is passed by the parameter pointer...

Page 26: ...se all bits are don t care filter acceptance_code 0x0 Mark all bit position don t care filter acceptance_mask 0xffffffff Single Filter Mode filter single_filter 1 TRUE result ioctl fd FIO_T810_SET_FIL...

Page 27: ...begins the busoff recovery sequence and resets the transmit and receive error counters If the CAN controller counts 128 packets of 11 consecutive recessive bits on the CAN bus the Bus Off state is ex...

Page 28: ...ction the CAN controller is completely removed from the CAN bus and cannot communicate until the control function T810_IOCBUSON is executed The optional argument pointer is not used by this ioctl func...

Page 29: ...r_max T810_STATUS PT810_STATUS arbitration_lost_capture This parameter receives content of the arbitration lost capture register This register contains information about the bit position of losing arb...

Page 30: ...age_counter_max Contains the peak value of messages in the RXFIFO This internal counter value will be reset to 0 after reading EXAMPLE include tip810 h int fd int result T810_STATUS can_status result...

Page 31: ...al functionality is given that means the CAN controller is able to receive messages from other nodes and can transmit message to other nodes if any connected The optional argument pointer can be omitt...

Page 32: ...optional argument pointer can be omitted for this function This ioctl command will be accepted only in reset mode BUSOFF Enter FIO_T810_SET_BUSOFF first otherwise you will get an error S_t810Drv_NOBUS...

Page 33: ...d like in normal mode This mode can be used for software driver bit rate detection and hot plugging The optional argument pointer can be omitted for this ioctl function This ioctl command will be acce...

Page 34: ...he optional argument pointer can be omitted in this ioctl function This ioctl command will be accepted only in reset mode BUSOFF Enter FIO_T810_SET_BUSOFF first otherwise you will get an error S_t810D...

Page 35: ...A pointer to this variable is passed by the argument arg to the driver This ioctl command will be accepted only in reset mode BUSOFF Enter FIO_T810_SET_BUSOFF first otherwise you will get an error S_t...

Page 36: ...nvalid message identifier S_t810Dev_ILLLEN 0x08100002 Invalid message length S_t810Dev_BUSOFF 0x08100003 The CAN bus controller has entered the BUS OFF state S_t810Dev_ERROR 0x08100004 At least one of...

Reviews: