From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29666 invoked by alias); 6 Nov 2013 15:28:46 -0000 Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org Received: (qmail 29631 invoked by uid 89); 6 Nov 2013 15:28:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail.ecoscentric.com Received: from Unknown (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 06 Nov 2013 15:28:44 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 5A0464680001 for ; Wed, 6 Nov 2013 15:28:35 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uc5FHi8dqjNS; Wed, 6 Nov 2013 15:28:29 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001897] lpc2xxx CAN driver improvements / enhancements Date: Wed, 06 Nov 2013 15:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement 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: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00002.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001897 --- Comment #28 from Bernard Fouch=C3=A9 --- (In reply to comment #27) > > Sorry, it took me ages to be able to go back to that topic. >=20 > Hi Bernard, >=20 > thank you for taking the time investigating this problem.=20 >=20 > > On the LPC1765, I just did something a bit different than what you wrot= e, I > > unplugged the resistor on the CAN wires. Then I got BEI (Bus Error > > Interrupt) in CAN1ICR. >=20 > what happpens if you do the same thing that I do - simply disconnect from > CAN bus? I can't do this, on my target the same connector provides power supply and = CAN connectivity :-( However the only difference should be the length of wire after the CAN transceiver. Since you say that you also see BEI raised, maybe the problem you have is t= he same than mine, you are stuck with a broken bus, not a real bus off conditi= on and that would explain why you don't see the documented behavior for bus of= f. Did you try to xmit on a correct bus with no other node to acknowledge the frames? If so, were you stuck on the ISR following this "bus off" condition? >=20 > > All in all I think it is better to have this kind of processing (taking= the > > decision to reset the CAN controller) to be handled by higher level code > > instead of having the ISR or DSR to magically do things. >=20 > My patch does no do any magically things in ISR and DSR. It does exactly = the > thing that the hadware manual claims the CAN controller would do. So my > implementation does something the CAN controller would do anyway. On the LPC1765 datasheet, it is stated that if TxREC reaches 255 you enter = bus off mode and that means waiting 128 occurrences of Bus Free Condition when = RM is back to zero. If you write a value between 0 and 254, then only a single occurrence of Bus Free Condition is waited for, whatever the value set in TxREC. If it is similar on LPC22xx it means you can't completely simulate the hardware: writing 127 just set TxREC to the value it has when bus off is generated by the hardware but not the full behavior (waiting 128 occurrence= s of Bus Free Condition). --=20 You are receiving this mail because: You are on the CC list for the bug.