EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2129 CAN examples?

Started by embeddednut April 7, 2004
Does anyone have an example program yet for using the CAN interfaces
on the LPC2129? FullCAN mode is what I am trying to use. I have a
simple example going, but reception seems to stops as soon as I
increase bandwidth :-(

Peter



An Engineer's Guide to the LPC2100 Series

On Thursday 08 April 2004 02:50, you wrote:
> Does anyone have an example program yet for using the CAN interfaces
> on the LPC2129? FullCAN mode is what I am trying to use. I have a
> simple example going, but reception seems to stops as soon as I
> increase bandwidth :-(
>
> Peter

What do you mean by "stop":
* Do you get a CAN-level failure (eg. bus off)
* Do you just stop getting interrupts?

-- CHarles



I didn't want to bore you with details, but now that you ask for it...

--- In , Charles Manning <manningc2@a...>
> > Does anyone have an example program yet for using the CAN
interfaces
> > on the LPC2129? FullCAN mode is what I am trying to use. I have a
> > simple example going, but reception seems to stops as soon as I
> > increase bandwidth :-(
> >
> > Peter
>
> What do you mean by "stop":
> * Do you get a CAN-level failure (eg. bus off)
> * Do you just stop getting interrupts?

I only expect low-priority service messages on CAN (doing some
background data logging) so I plan to use the FullCAN mode with no
interrupts.

I set the FullCAN filters (4 of them) and once in a while (with the
current LPC2000 performance this means about every 250 microseconds)
check the semaphore bits of the FullCAN filters if any filter
received something.

I use 125kbps and several CAN monitoring and analyzer tools on the
network. This works just fine at a 1% bus load. But if I increase
busload (and note that on the CAN side there are no errors, monitors
and analyzers catch up and can work with every message) the
semaphores at some point seem to "lock" and say they are always busy
receiving something - but all 4 IDs simultanously busy at all times
seems weird so I guess there is still some setup I am missing...

Peter



Peter,
Unfortunately full_CAN mode is not functional in the current
devices. There is a problem with interrupt contention, when this is
fully characterized it will be detailed in an errata. In the mean
time please do not use full-CAN mode. Philips apps.

--- In , "embeddednut" <embeddednut@y...>
wrote:
> Does anyone have an example program yet for using the CAN
interfaces
> on the LPC2129? FullCAN mode is what I am trying to use. I have a
> simple example going, but reception seems to stops as soon as I
> increase bandwidth :-(
>
> Peter





--- In , "philips_apps" <philips_apps@y...>
wrote:
> Peter,
> Unfortunately full_CAN mode is not functional in the current
> devices. There is a problem with interrupt contention, when this is
> fully characterized it will be detailed in an errata. In the mean
> time please do not use full-CAN mode.

Please confirm that the CAN peripheral is fully functional (apart from
the FullCAN issue mentioned here).

Personally, I've never used FullCAN or equivalent hardware message Id
matching. I have always done software message filtering, mainly
because I've always used J1939 protocol which is easiest to filter in
software.

Thanx

-- Charles


--- In , "philips_apps" <philips_apps@y...>
wrote:
> Peter,
> Unfortunately full_CAN mode is not functional in the current
> devices. There is a problem with interrupt contention, when this
is
> fully characterized it will be detailed in an errata. In the mean
> time please do not use full-CAN mode.
>
> Philips apps.

Its always good to know that it is somebody else's fault...

Please inform us as soon as the errata is available and alternative
usages outlined - some code examples would really be nice...

Peter


Dear Philips,

If the "full CAN" capabilities don't work on the LPC2129 devices, then - as
far as I am concerned - the CAN features are of no use, and I may as well
use an LPC2106 and and external CAN transceiver (e.g. MCP2510).

Had I known this, I wouldn't have bought 20 MCB2100 (LPC2129) boards from
Keil earlier this year. (20 boards may not mean much to you, but it is a
large chunk of my teaching budget).

Great pity - and not the best of adverts for your company.

Michael.



Dear Michael,

although it does not help you too much now, we, the apps_team share
your frustration about the full-CAN mode. The fact that it does not
work as expected is fairly new and we are still investigating the
best work around.

Members of this group have had problems with the Full CAN mode and we
did not want them to waste additional time. Usually we try to post
problems together with a work-around, unfortunately this time, we are
still working to ge tthe work-around ready to go. It is going to be
an Application Note how to use the CAN in a mode I would call
extended Basic-CAN. In close cooperation with CAN experts we hope to
have something that will enable you to use the boards in a way you
intended for teaching by the end of next week.

In the unlikely event that this is not going to work for you, we will
find another solution.

Sometimes it is a difficult decision to publish problems that are
still under investigation in order to prevent the members of the
group waisting time but at the same time we frustrate others like you
at the moment :-(( if we publish without a resolution.

Best regards, Robert --- In , "Michael J. Pont" <Michael.Pont@t...>
wrote:
> Dear Philips,
>
> If the "full CAN" capabilities don't work on the LPC2129 devices,
then - as
> far as I am concerned - the CAN features are of no use, and I may
as well
> use an LPC2106 and and external CAN transceiver (e.g. MCP2510).
>
> Had I known this, I wouldn't have bought 20 MCB2100 (LPC2129)
boards from
> Keil earlier this year. (20 boards may not mean much to you, but
it is a
> large chunk of my teaching budget).
>
> Great pity - and not the best of adverts for your company.
>
> Michael.





Hi Michael, Peter and the others...

--- "Michael J. Pont" <> wrote:
> If the "full CAN" capabilities don't work on the
> LPC2129 devices, then - as
> far as I am concerned - the CAN features are of no
> use, and I may as well
> use an LPC2106 and and external CAN transceiver
> (e.g. MCP2510).

Even without the FullCAN mode these devices have some very powerfull
filter mechanisms that you'll hardly find anywhere else - and the
three transmit buffer queue for each CAN channel is a very nice
feature, too.

I am confident that "someone" will publish code alternatives here
soon that help overcome the non functioning FullCAN mode ;-)

Olaf
Tutor at ESAcademy
www.ESAcademy.com
www.MicroCANopen.com


While Michael is entitled to his opinions, I'd like to disagree with
him taking the stance that this is a bad advertisement for Philips.

I have yet to find any manufacturer that does not have bugs in their
silicon. Get over it. What makes the difference is how the
manufacturers handle the errors. The standard response seems to be
denial for as long as possible.

I personally think Philips' approach of cooperating with a community
such as this is very positive. I'd rather be told about problems
immediately even if the information is incomplete at the time. This
saves time (otherwise wasted chasing unknown bugs) and builds
confidence.

-- Charles



The 2024 Embedded Online Conference