ts-7000
[Top] [All Lists]

[ts-7000] CAN Bus access.

To: ts-7000 <>
Subject: [ts-7000] CAN Bus access.
From: "Loren M. Lang" <>
Date: Mon, 14 May 2007 18:52:13 -0700
I am trying to access the CAN bus that is available with my TS-7300 arm
board.  I have the optional TS-732 board attached and I loaded the
driver for the can controller as follows:

/sbin/insmod ./lincan-ts11.o baudrate=125 hw=ts732

The driver loaded with no error messages and I saw the following output
from dmesg:

can.o: initializing sja1000p chip operations

I wrote a small c program to open /dev/can0 for O_RDWR and attempted to
do both read() and write() with no success.  I have the DB9 for COM2/CAN
wired with pin 2 as CANL, pin 3 and GND, and pin 7 as CANH and connected
it to an existing CAN bus.  The existing CAN bus has 4 devices
successfully communicating using CAN 2.0B with message in both standard
and extended format.  Both read() and write() block and never return
even when I turn on non-blocking I/O.  After I try the first read() it
hangs until I terminate it, but no new kernel messages appear.  Then
after write() the following message appear:

can.o: Error: status register: 0x20 irq_register: 0x80 error: 0x03
can.o: Error: status register: 0x60 irq_register: 0x84 error: 0x11
can.o: Error: status register: 0x60 irq_register: 0xa0 error: 0x11
can.o: Error: status register: 0x60 irq_register: 0x80 error: 0x03
can.o: Error: status register: 0x60 irq_register: 0x80 error: 0x03
<last line repeated many times>
can.o: Error: status register: 0xd4 irq_register: 0x04 error: 0x03
can.o: bus-off, resetting sja1000p
can.o: Error: status register: 0xb4 irq_register: 0x04 error: 0x00
can.o: bus-off, resetting sja1000p
can.o: Error: status register: 0x34 irq_register: 0x04 error: 0x00

Once those messages appear, further read() return the error Resource not
available.
--
Loren M. Lang

http://www.north-winds.org/


Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
Fingerprint: CEE1 AAE2 F66C 59B5 34CA  C415 6D35 E847 0118 A3D2


Attachment: signature.asc
Description: OpenPGP digital signature

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU