All Forums
 Microsoft Windows CE
 CE Drivers
 CAN Bus Driver
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

ctacke

877 Posts

Posted - 24 Nov 2004 :  14:16:05  Show Profile  Email Poster
CAN Driver Specification

The ADS CAN driver provides a stream driver interface to the Philips SJA1000 CAN controller found on many Eurotech products.

The driver operates in "PeliCAN" mode. This mode supports both 11- and 29-bit identifiers, as well as a number of other advanced CAN features.

The specification describes how to use the stream driver functions to access the features of the CAN controller.


Revision History

The following list summarizes the changes in the driver specification. See the spec for full details.

1.6 (26-Sept-2007) PDF 109kB
- Adds IOCTL_CAN_GET_QUEUE_SIZE

1.5 (2-Oct-2006) PDF 150kB
- Adds IOCTL_CAN_FLUSH_MSGS
- Adds events EV_CAN_DATAQ_FULL and EV_CAN_DATAQ_THRESHOLD
- Updated format of driver spec document

1.4 (16-May-2005) PDF 270kB
- Added IOCTL_CAN_GET_SAMPLE_POINT and IOCTL_CAN_SET_SAMPLE_POINT
- Modified IOCTL_CAN_GET_BAUDRATE to read the actual baudrate from the CAN chip
- Added CAN_ERROR_INPUT_OUT_OF_RANGE error code

1.3 (11-Mar-2005)
- ReadFile and WriteFile support multiple messages
- Added DataReadyEvent

1.2 (30-Nov-2004)
Included with AGX build 4.20.10, VGX build 4.20.12
- Adds IOCTL_GET_DRIVER_VERSION
- Changes IOCTL_CAN_READ_ACCEPTANCE_FILTER to IOCTL_CAN_GET_ACCEPTANCE_FILTER

1.1 (24-Nov-2004)
Included with GCX build 4.20.05
- Updates format of CAN_MSG struct

1.0 (15-Nov-2004)
Included with AGX build 4.20.09
- Initial release.

0.1
Applicability: VGX build 4.20.12
Preliminary release.

Sample Applications

CAN application samples are posted at Topic 1739.

Download ADSerror.h from topic 1915.

For further reading, see the CAN topic index


Edited by akidder 13-Jan-2005: Add revision history. Change topic name from "ADS PeliCAN driver" to "ADS CAN driver specification"
Edited by akidder 17-Feb-2005: Add link to CAN topic index.
Editec by akidder 24-Oct-2006: Add details and link for spec 1.5

ctacke

877 Posts

Posted - 03 Dec 2004 :  14:06:32  Show Profile  Email Poster
Update

Specification 1.2 has been released and the table above has been updated to reflect its support.
Go to Top of Page

akidder

1519 Posts

Posted - 14 Jan 2005 :  11:18:12  Show Profile  Email Poster
Document update

We've released an update to the v1.2 document that corrects a couple document numbering errors in the header and footer. It also adds a note that you'll need to reset the chip if a BUS_OFF error has occurred.


Value for nNumberOfBytesToRead/Write

While ReadFile() and WriteFile() don't currently use the nNumberOfBytesToRead/Write parameter, you should set its value to sizeof(CAN_MSG). E.g.:

ReadFile(hCanPort, &RxCanMsg, sizeof(CAN_MSG), &dwBytesRead, NULL);
WriteFile(hCanPort, &TxCanMsg, sizeof(CAN_MSG), &dwBytesWritten, NULL);


Go to Top of Page

ctacke

877 Posts

Posted - 19 May 2005 :  10:31:33  Show Profile  Email Poster
Update

Specification 1.4 has been released and the table above has been updated to reflect its support.
Go to Top of Page

jnosek

3 Posts

Posted - 05 Sep 2006 :  13:04:50  Show Profile  Email Poster
Usage Note: Detecting Bus Idle State

It is possible to detect the idle state of the CAN bus by reading the status register of the SJA1000 CAN controller.

A call to IOCTL_CAN_GET_STATUS_REG returns the byte of the SJA1000 Status register.
Bit 4 of the register is the Receive Status.
Bit 5 of the register is the Transmit Status.
If both are 0, then the CAN bus is idle.
Go to Top of Page

jjoseph

47 Posts

Posted - 09 Oct 2007 :  17:21:24  Show Profile
Update
Released specification for driver Revision 1.6
Go to Top of Page

akidder

1519 Posts

Posted - 06 Oct 2010 :  17:00:43  Show Profile  Email Poster
#asyncTXRX

2009 Bug Fix: Potential Corruption of CAN Message Data

An issue in the CAN driver was detected in early 2009 in which erroneous data could be read or written when messages are being transmitted and received simultaneously. The issue has been corrected in the CAN driver and has since been built into most current CAN driver releases (see CE build history of your product for confirmation).

The issue does not affect applications that only monitor the CAN bus (read-only), and does not have an impact on applications in which CANbus is call-and-response. Errors only occur when messages are being transmitted and received simultaneously.
Go to Top of Page
  Topic  
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000