EmbeddedRelated.com
Forums

Using CAN acceptance filter on LPC2129

Started by me_mickey_2006 June 21, 2005
I'm having problems with using acceptance filter, I used examples
BlinkyCAN and FullCAN but I have problems anyways.

1. Does anyone have any material on the matter except poor lpc2129
datasheet?

2. I tried to send CAN message with identifier 0x00000063 in Extended
Frame Format, I used no filtering AFMR = 2, and I inspected received
message and it turns out identifier is now 0x00630000, why is that as
if 29 bit identifier is cut to 11 bit identifier?


An Engineer's Guide to the LPC2100 Series

Please ignore this second question, my fault, the identifier in
standard or extended format is received as 0x00000063

> 2. I tried to send CAN message with identifier 0x00000063 in Extended
> Frame Format, I used no filtering AFMR = 2, and I inspected received
> message and it turns out identifier is now 0x00630000, why is that as
> if 29 bit identifier is cut to 11 bit identifier?


Hi,

On Tuesday 21 June 2005 19:00, me_mickey_2006 wrote:
> I'm having problems with using acceptance filter, I used
> examples BlinkyCAN and FullCAN but I have problems anyways.
>
> 1. Does anyone have any material on the matter except poor
> lpc2129 datasheet?

My problem at the first days I implemented the acceptance filter:
You have to sort all lists, first all sorted ID's from the first
CAN, than all sorted ID's from the second CAN.. . I think, no
holes are allowed. The last entry on the list must be a
disabled/enabled entry for the maximum ID.

--
Steffen Rose



I have solved the matter, and have to say this:

It is VERY VERY IMPORTANT to look carefully at datasheet as some
details are offten oversighted, so my oversight was not adding bits
(15.-13. for standard identifiers and 31.-29. for extended
identifiers) for controller (channel that receives specified ID).

So Apart from ID 11 or 29 bit you also have 3 bits telling for which
can controller the ID is ment for.

For example:

If you want to receive message from ID = 15 and you want to receive it
on CAN channel (controller) 1 then for standard identifiers you should
write to AFRAM 0x200FF7FF for standard identifiers and 0x2000000F for
extended identifiers.