From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16940 invoked by alias); 6 Nov 2013 09:30:34 -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 16928 invoked by uid 89); 6 Nov 2013 09:30:33 -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 09:30:32 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 4BC664680016 for ; Wed, 6 Nov 2013 09:30:23 +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 UHfuygmh04AD; Wed, 6 Nov 2013 09:30:21 +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 09:30: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: uwe_kindler@web.de 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: 7bit X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00001.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001897 --- Comment #27 from Uwe Kindler --- > Sorry, it took me ages to be able to go back to that topic. Hi Bernard, thank you for taking the time investigating this problem. > On the LPC1765, I just did something a bit different than what you wrote, I > unplugged the resistor on the CAN wires. Then I got BEI (Bus Error > Interrupt) in CAN1ICR. what happpens if you do the same thing that I do - simply disconnect from CAN bus? > 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. 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. > I did not encountered problems when I was developing my app since the app > powers off the CAN cell as soon as a bus error or bus off condition occurs. As soon as the bus off condition occurs the application is completely blocked because the ISR fires again and again. So without my patch the application could never react on a bus off condition or power of the CAN cell because the application code has no chance to run. My patch fixes this. > > If the CAN hardware driver is reset without having the app to know about it, > other weird things may happen, especially if the higher level code assumes > than the CAN controller can recover from bus off by itself, or than a > previously queued message was correctly sent on the bus, etc. > > Maybe the feature you added should send a new event reporting that the CAN > controller was reset? So high level code knows that it should be > reconfigured or messages resent? No, I don't agree. With my patch the application gets a bus off event from CAN driver and knows what happened. If a bus off condition occures, each application nows, that it might need to get reconfigured or that messages might got lost or need to get resend. Without my patch the application code is totally blocked and cant't do anything like resetting CAN cell. -- You are receiving this mail because: You are on the CC list for the bug.