From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24536 invoked by alias); 3 Jan 2012 11:20:58 -0000 Received: (qmail 24520 invoked by uid 22791); 3 Jan 2012 11:20:57 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Jan 2012 11:20:44 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 48) id 108002FB085B; Tue, 3 Jan 2012 11:20:43 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1001439] New: can_lpc2xxx.c: CYGOPT_DEVS_CAN_CAN_LPC2XXX_LUT_ERR_SUPP problems X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: CAN X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: bernard.fouche@kuantic.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 03 Jan 2012 11:20:00 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org X-SW-Source: 2012/txt/msg00012.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001439 Summary: can_lpc2xxx.c: CYGOPT_DEVS_CAN_CAN_LPC2XXX_LUT_ERR_SUPP problems Product: eCos Version: CVS Platform: Other (please specify) OS/Version: Cortex-M Status: UNCONFIRMED Severity: minor Priority: low Component: CAN AssignedTo: unassigned@bugs.ecos.sourceware.org ReportedBy: bernard.fouche@kuantic.com CC: ecos-bugs@ecos.sourceware.org Class: Advice Request In function lpc2xxx_can_DSR(): ... #if CYGINT_IO_CAN_CHANNELS > 1 cyg_uint8 i = 0; while (lpc2xxx_global_can_info.active_channels[i]) #endif // CYGINT_IO_CAN_CHANNELS > 1 { cyg_uint32 icr; can_channel *chan = LPC2XXX_GET_CAN_CHANNEL(lpc2xxx_global_can_info, i++); CAN_DECLARE_INFO(chan); HAL_READ_UINT32(CAN_CTRL_ICR(info), icr); // this read clears ICR #ifdef CYGOPT_DEVS_CAN_LPC2XXX_LUT_ERR_SUPP // Set ICR_LUT_ERR flag only for controller which cause LUT error if ((luterr_chan0 == i) || (luterr_chan1 == i)) ... 1) 'i' is declared only if more than one CAN channel. 'i' is referenced always if CYGOPT_DEVS_CAN_LPC2XXX_LUT_ERR_SUPP is defined. 2) On MCU counting CAN channels from 0: 'i++' is performed at beginning of while(...), and if CYGOPT_DEVS_CAN_LPC2XXX_LUT_ERR_SUPP is defined, luterr_chan[0/1] are compared to 'i': the LUT fault won't be reported to the correct CAN channel for such MCUs (luterr_chan[0/1] have values directly provided by the hardware). can_accfilt_lpc2xxx.c has macro LPC2XXX_CAN_FIRST_IN_LUT that could be moved to can_lpc2xxx.h to help solve this. -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.