From: Bernd Krumboeck <krumboeck@universalnet.at>
To: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: linux-can@vger.kernel.org
Subject: Re: usb_8dev: USB Protocoll available?
Date: Sat, 15 Dec 2012 07:31:13 +0100 [thread overview]
Message-ID: <50CC1931.9080608@universalnet.at> (raw)
In-Reply-To: <20683.22879.172661.430971@elektron.ikp.physik.tu-darmstadt.de>
Error handling:
Error occured when frame type = 3 and ERR_FLAG = 0x04.
Error message:
byte 0: Status
byte 1: bit 7: Receive Passive
byte 1: bit 0-6: Receive Error Counter
byte 2: Transmit Error Counter
byte 3: Always 0 (maybe reserved for future use)
(byte 1-2 seems to be the value from CAN->ERR register in the microcontroller)
driver source:
u8 state = msg->data[0];
u8 rxerr = msg->data[1] & 0x7F;
u8 txerr = msg->data[2];
Status:
OK 0x00 /* Normal condition. */
OVERRUN 0x01 /* Overrun occured when sending */
BUSLIGHT 0x02 /* Error counter has reached 96 */
BUSHEAVY 0x03 /* Error count. has reached 128 */
BUSOFF 0x04 /* Device is in BUSOFF */
STUFF 0x20 /* Stuff Error */
FORM 0x21 /* Form Error */
ACK 0x23 /* Ack Error */
BIT0 0x24 /* Bit1 Error */
BIT1 0x25 /* Bit0 Error */
CRC 0x26 /* CRC Error */
regards,
Bernd
Am 2012-12-14 17:52, schrieb Uwe Bonnes:
>
> Hello,
>
> is there some document describing the protocoll used for the usb_8dev? I
> have STM32 hardware with USB and CAN connected and think about writing some
> firmware compatible with some existing adapter.
>
> Otherwise, are the github projects
>
> saeugetier / usb2can
>
> shackspace / usb2can
>
> for usb to can hardware related to this driver??
>
> Thanks
>
next prev parent reply other threads:[~2012-12-15 6:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 16:52 usb_8dev: USB Protocoll available? Uwe Bonnes
2012-12-14 18:33 ` Marc Kleine-Budde
2012-12-14 19:25 ` Bernd Krumboeck
2012-12-15 6:31 ` Bernd Krumboeck [this message]
2012-12-15 7:09 ` Bernd Krumboeck
2012-12-16 16:54 ` USB CAN Scripts - was " Oliver Hartkopp
2012-12-16 17:17 ` Uwe Bonnes
2012-12-17 8:06 ` Bernd Krumboeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50CC1931.9080608@universalnet.at \
--to=krumboeck@universalnet.at \
--cc=bon@elektron.ikp.physik.tu-darmstadt.de \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).