public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <bug-1001897-104-1qgxMweMbK@http.bugs.ecos.sourceware.org/> (raw)
In-Reply-To: <bug-1001897-104@http.bugs.ecos.sourceware.org/>

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 <uwe_kindler@web.de> ---
> 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.

  parent reply	other threads:[~2013-11-06  9:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  9:37 [Bug 1001897] New: " bugzilla-daemon
2013-08-30 12:37 ` [Bug 1001897] " bugzilla-daemon
2013-08-30 12:38 ` bugzilla-daemon
2013-08-30 14:27 ` bugzilla-daemon
2013-09-02  7:22 ` bugzilla-daemon
2013-09-02 16:22 ` bugzilla-daemon
2013-09-03  6:18 ` bugzilla-daemon
2013-09-03  6:38 ` bugzilla-daemon
2013-09-03  8:20 ` bugzilla-daemon
2013-09-03  8:22 ` bugzilla-daemon
2013-09-03  9:06 ` bugzilla-daemon
2013-09-03 10:48 ` bugzilla-daemon
2013-09-03 12:20 ` bugzilla-daemon
2013-09-03 12:22 ` bugzilla-daemon
2013-09-03 12:31 ` bugzilla-daemon
2013-09-03 12:37 ` bugzilla-daemon
2013-09-03 12:53 ` bugzilla-daemon
2013-09-03 18:52 ` bugzilla-daemon
2013-09-06  8:19 ` bugzilla-daemon
2013-09-06 14:20 ` bugzilla-daemon
2013-09-11 21:23 ` bugzilla-daemon
2013-09-17  6:10 ` bugzilla-daemon
2013-09-17  6:35 ` bugzilla-daemon
2013-09-17 18:39 ` bugzilla-daemon
2013-09-17 18:42 ` bugzilla-daemon
2013-09-18  5:45 ` bugzilla-daemon
2013-09-18  6:46 ` bugzilla-daemon
2013-09-18 16:08 ` bugzilla-daemon
2013-11-05 15:41 ` bugzilla-daemon
2013-11-06  9:30 ` bugzilla-daemon [this message]
2013-11-06 15:28 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-1001897-104-1qgxMweMbK@http.bugs.ecos.sourceware.org/ \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-patches@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).