This is the mail archive of the ecos-patches@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 1001897] lpc2xxx CAN driver improvements / enhancements


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.


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