This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1000838] New: at91 can(STD ID CASE) = receing message lengthzero
- From: bugzilla-daemon at ecoscentric dot com
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Thu, 8 Oct 2009 16:08:59 +0100
- Subject: [Bug 1000838] New: at91 can(STD ID CASE) = receing message lengthzero
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000838
Summary: at91 can(STD ID CASE) = receing message length zero
Product: eCos
Version: CVS
Platform: Other (please specify)
OS/Version: Other
Status: UNCONFIRMED
Severity: normal
Priority: normal
Component: CAN
AssignedTo: jifl@ecoscentric.com
ReportedBy: dushistov@mail.ru
QAContact: ecos-bugs@ecos.sourceware.org
Class: ---
In my tests cyg_io_read always return messages with zero dlc,
but theses messages contains valid data. The problem is that in
CAN_STD_ID case id field contains not only ID, but also length
of message, but in receiving code we rewrite it after save message
length in it.
fix: dlc always zero, if CYGOPT_IO_CAN_STD_CAN_ID is setted
diff --git a/packages/devs/can/arm/at91/at91sam7/current/src/can_at91sam7.c
b/packages/devs/can/arm/at91/at91sam7/current/src/can_at91sam7.c
index 88c99f4..3f55810 100644
--- a/packages/devs/can/arm/at91/at91sam7/current/src/can_at91sam7.c
+++ b/packages/devs/can/arm/at91/at91sam7/current/src/can_at91sam7.c
@@ -1234,7 +1234,8 @@ static bool at91sam7_can_getevent(can_channel *chan,
CYG_CAN_EVENT_T *pevent, vo
#endif // CYGOPT_IO_CAN_EXT_CAN_ID
{
#ifdef CYGOPT_IO_CAN_STD_CAN_ID
- pevent->msg.id = MID_GET_STD(mid);
+ //in this case we hold dlc in id, so "|="
+ pevent->msg.id |= MID_GET_STD(mid);
#endif // CYGOPT_IO_CAN_STD_CAN_ID
}
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.