This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]