Am 21.10.2010 14:28, schrieb Marc Kleine-Budde:
> Moin,
> 
> the socket CAN implementation allows sending of CAN frames with RTR set
> and dlc != 0. My question is what should be received?
> 
> I've tested several CAN cores (sja1000, mcp2515, at91_can) and all
> receive the RTR bit and set the dlc correct, but the data is not handled
> as expected. On the at91 and mcp2515 it seems that we get the old
> mailbox data, on the sja1000 we get the old data but shifted by several
> bytes.
> 
> Our options are:
> leave as it is, or combinations of these:
> 
> 1) drop frames with RTR && dlc != 0
> 2) set dlc = 0 if RTR is set
> 3) set data = to 0 if RTR is set
> 
> a) during RX
> b) during TX
> 
> cheers, Marc
> 
> 
> 
> _______________________________________________
> Socketcan-core mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/socketcan-core
Hello,

AFAIK a RTR frame is intended to request a frame with the
length as set in the DLC of the RTR frame.

So it should be no problem to send a frame with DLC!=0 and
RTR set. For a received message the data content is invalid,
but dlc is. I think the application should handle this. This
leads to option 3)

Regards
Gerhard
-- 
EMS Dr. Thomas Wuensche e.K.
Sonnenhang 3
85304 Ilmmuenster
HRA Neuburg a.d. Donau, HR-Nr. 70.106
Phone: +49-8441-490260
Fax  : +49-8441-81860
http://www.ems-wuensche.com
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to