EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

FullCAN and acceptance filter on LPC2294

Started by Boris Kralik October 22, 2007
hi all.
I have a problem with acceptance filtering and FullCAN mode at LPC2294.

I have CAN1, CAN2, CAN4 and FullCAN mode for it.
I have 24IDs, all ID are enable, memory dump acceptance filter table:

0x21002101 at 0xE0038000
0x41024103 at 0xE0038004
0x81048105 at 0xE0038008
0x21062107 at 0xE003800C
0x41084109 at 0xE0038010
0x810A810B at 0xE0038014
0x210C210D at 0xE0038018
0x410E410F at 0xE003801C
0x81108111 at 0xE0038020
0x21122113 at 0xE0038024
0x41144115 at 0xE0038028
0x81168117 at 0xE003802C

I fill SFF_sa register with value 48d(0x30) (number of IDs (24d) times 2),
EndOfTable register fill with value (0x120/288d). It is 6*SFF_sa, other
registers SFFGRP, EFF, EFF_GRP to same as EndOfTable.

FullCAN work only for IDs: 0x100, 0x101, 0x102, 0x103, 0x104, 0x105,
., ., ., ., 0x10A, 0x10B, ., ., ., ., 0x110, 0x111, ., ., ., ., 0x116,
0x117
Place market as '.' are for messages, for which CANx controller receive
message correctly (RDAx/RDBx/RID values are OK), but FullCAN mode not
works, RFS_Index value CAN controller set to 0 and don't fill places at
address in memory, FullCAN works only for IDs marked as CAN4, CAN2 and
CAN1 messages works only ones.
When I tried it only for one separatelly CAN (CAN1 or CAN2 or CAN4)
(same IDs, diferent CanID bits in Acceptance filter table), FullCAN
work fine and when I
tried for CAN1+2, same problem.
(bits [15/31, 14/30, 13/29]) set to [100] for CAN4 (Figure 25 in
acceptance entry), 'Preminary User Manual may/2004' at 192. page)

Where may be a problem ? What I have to check ? What is wrong ?
Than you for advice.

An Engineer's Guide to the LPC2100 Series

Hi,

In the manual it says that the Id's need to be placed in accending order but
you appear to have misunderstood this and ordered them without the preceding
can identifier.
I think you'll find that the ID's you have that aren't working are the ones
that are effectively out of order...
ie try setting it up as:

0x21002101 at 0xE0038000
0x21062107 at 0xE0038004
0x210C210D at 0xE0038008
0x21122113 at 0xE003800C
0x41024103 at 0xE0038010
0x41084109 at 0xE0038014
0x410E410F at 0xE0038018
0x41144115 at 0xE003801C
0x81048105 at 0xE0038020
0x810A810B at 0xE0038024
0x81108111 at 0xE0038028
0x81168117 at 0xE003802C

and see if that works out a bit better.

Andy
-----Original Message-----
From: l... [mailto:l...]On Behalf Of
Boris Kralik
Sent: 22 October 2007 22:04
To: l...
Subject: [lpc2000] FullCAN and acceptance filter on LPC2294
hi all.
I have a problem with acceptance filtering and FullCAN mode at LPC2294.

I have CAN1, CAN2, CAN4 and FullCAN mode for it.
I have 24IDs, all ID are enable, memory dump acceptance filter table:

0x21002101 at 0xE0038000
0x41024103 at 0xE0038004
0x81048105 at 0xE0038008
0x21062107 at 0xE003800C
0x41084109 at 0xE0038010
0x810A810B at 0xE0038014
0x210C210D at 0xE0038018
0x410E410F at 0xE003801C
0x81108111 at 0xE0038020
0x21122113 at 0xE0038024
0x41144115 at 0xE0038028
0x81168117 at 0xE003802C

I fill SFF_sa register with value 48d(0x30) (number of IDs (24d) times 2),
EndOfTable register fill with value (0x120/288d). It is 6*SFF_sa, other
registers SFFGRP, EFF, EFF_GRP to same as EndOfTable.

FullCAN work only for IDs: 0x100, 0x101, 0x102, 0x103, 0x104, 0x105,
., ., ., ., 0x10A, 0x10B, ., ., ., ., 0x110, 0x111, ., ., ., ., 0x116,
0x117
Place market as '.' are for messages, for which CANx controller receive
message correctly (RDAx/RDBx/RID values are OK), but FullCAN mode not
works, RFS_Index value CAN controller set to 0 and don't fill places at
address in memory, FullCAN works only for IDs marked as CAN4, CAN2 and
CAN1 messages works only ones.
When I tried it only for one separatelly CAN (CAN1 or CAN2 or CAN4)
(same IDs, diferent CanID bits in Acceptance filter table), FullCAN
work fine and when I
tried for CAN1+2, same problem.
(bits [15/31, 14/30, 13/29]) set to [100] for CAN4 (Figure 25 in
acceptance entry), 'Preminary User Manual may/2004' at 192. page)

Where may be a problem ? What I have to check ? What is wrong ?
Than you for advice.
It works, thank you Andy.

--- Andy Berney wrote:

> Hi,
>
> In the manual it says that the Id's need to be
> placed in accending order but
> you appear to have misunderstood this and ordered
> them without the preceding
> can identifier.
> I think you'll find that the ID's you have that
> aren't working are the ones
> that are effectively out of order...
> ie try setting it up as:
>
> 0x21002101 at 0xE0038000
> 0x21062107 at 0xE0038004
> 0x210C210D at 0xE0038008
> 0x21122113 at 0xE003800C
> 0x41024103 at 0xE0038010
> 0x41084109 at 0xE0038014
> 0x410E410F at 0xE0038018
> 0x41144115 at 0xE003801C
> 0x81048105 at 0xE0038020
> 0x810A810B at 0xE0038024
> 0x81108111 at 0xE0038028
> 0x81168117 at 0xE003802C
>
> and see if that works out a bit better.
>
> Andy
> -----Original Message-----
> From: l...
> [mailto:l...]On Behalf Of
> Boris Kralik
> Sent: 22 October 2007 22:04
> To: l...
> Subject: [lpc2000] FullCAN and acceptance filter
> on LPC2294
> hi all.
> I have a problem with acceptance filtering and
> FullCAN mode at LPC2294.
>
> I have CAN1, CAN2, CAN4 and FullCAN mode for it.
> I have 24IDs, all ID are enable, memory dump
> acceptance filter table:
>
> 0x21002101 at 0xE0038000
> 0x41024103 at 0xE0038004
> 0x81048105 at 0xE0038008
> 0x21062107 at 0xE003800C
> 0x41084109 at 0xE0038010
> 0x810A810B at 0xE0038014
> 0x210C210D at 0xE0038018
> 0x410E410F at 0xE003801C
> 0x81108111 at 0xE0038020
> 0x21122113 at 0xE0038024
> 0x41144115 at 0xE0038028
> 0x81168117 at 0xE003802C
>
> I fill SFF_sa register with value 48d(0x30)
> (number of IDs (24d) times 2),
> EndOfTable register fill with value (0x120/288d).
> It is 6*SFF_sa, other
> registers SFFGRP, EFF, EFF_GRP to same as
> EndOfTable.
>
> FullCAN work only for IDs: 0x100, 0x101, 0x102,
> 0x103, 0x104, 0x105,
> ., ., ., ., 0x10A, 0x10B, ., ., ., ., 0x110,
> 0x111, ., ., ., ., 0x116,
> 0x117
> Place market as '.' are for messages, for which
> CANx controller receive
> message correctly (RDAx/RDBx/RID values are OK),
> but FullCAN mode not
> works, RFS_Index value CAN controller set to 0 and
> don't fill places at
> address in memory, FullCAN works only for IDs
> marked as CAN4, CAN2 and
> CAN1 messages works only ones.
> When I tried it only for one separatelly CAN (CAN1
> or CAN2 or CAN4)
> (same IDs, diferent CanID bits in Acceptance
> filter table), FullCAN
> work fine and when I
> tried for CAN1+2, same problem.
> (bits [15/31, 14/30, 13/29]) set to [100] for CAN4
> (Figure 25 in
> acceptance entry), 'Preminary User Manual
> may/2004' at 192. page)
>
> Where may be a problem ? What I have to check ?
> What is wrong ?
> Than you for advice.
>
>
> [Non-text portions of this message have been
> removed]
--
"Software is like sex, it's better when it's free."
-- Linus Torvalds
Regards / S pozdravom Boris Kralik

http://www.geocities.com/kralikbo/
-------------
___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html
Thanks Andy. That was probably why I never got it to work either. I just gave
up on it.

Something to go back and try.
Quoting Boris Krik :

> It works, thank you Andy.
>
> --- Andy Berney wrote:
>
> > Hi,
> >
> > In the manual it says that the Id's need to be
> > placed in accending order but
> > you appear to have misunderstood this and ordered
> > them without the preceding
> > can identifier.
> > I think you'll find that the ID's you have that
> > aren't working are the ones
> > that are effectively out of order...
> > ie try setting it up as:
> >
> > 0x21002101 at 0xE0038000
> > 0x21062107 at 0xE0038004
> > 0x210C210D at 0xE0038008
> > 0x21122113 at 0xE003800C
> > 0x41024103 at 0xE0038010
> > 0x41084109 at 0xE0038014
> > 0x410E410F at 0xE0038018
> > 0x41144115 at 0xE003801C
> > 0x81048105 at 0xE0038020
> > 0x810A810B at 0xE0038024
> > 0x81108111 at 0xE0038028
> > 0x81168117 at 0xE003802C
> >
> > and see if that works out a bit better.
> >
> > Andy
> >
> >
> > -----Original Message-----
> > From: l...
> > [mailto:l...]On Behalf Of
> > Boris Kralik
> > Sent: 22 October 2007 22:04
> > To: l...
> > Subject: [lpc2000] FullCAN and acceptance filter
> > on LPC2294
> >
> >
> > hi all.
> > I have a problem with acceptance filtering and
> > FullCAN mode at LPC2294.
> >
> > I have CAN1, CAN2, CAN4 and FullCAN mode for it.
> > I have 24IDs, all ID are enable, memory dump
> > acceptance filter table:
> >
> > 0x21002101 at 0xE0038000
> > 0x41024103 at 0xE0038004
> > 0x81048105 at 0xE0038008
> > 0x21062107 at 0xE003800C
> > 0x41084109 at 0xE0038010
> > 0x810A810B at 0xE0038014
> > 0x210C210D at 0xE0038018
> > 0x410E410F at 0xE003801C
> > 0x81108111 at 0xE0038020
> > 0x21122113 at 0xE0038024
> > 0x41144115 at 0xE0038028
> > 0x81168117 at 0xE003802C
> >
> > I fill SFF_sa register with value 48d(0x30)
> > (number of IDs (24d) times 2),
> > EndOfTable register fill with value (0x120/288d).
> > It is 6*SFF_sa, other
> > registers SFFGRP, EFF, EFF_GRP to same as
> > EndOfTable.
> >
> > FullCAN work only for IDs: 0x100, 0x101, 0x102,
> > 0x103, 0x104, 0x105,
> > ., ., ., ., 0x10A, 0x10B, ., ., ., ., 0x110,
> > 0x111, ., ., ., ., 0x116,
> > 0x117
> > Place market as '.' are for messages, for which
> > CANx controller receive
> > message correctly (RDAx/RDBx/RID values are OK),
> > but FullCAN mode not
> > works, RFS_Index value CAN controller set to 0 and
> > don't fill places at
> > address in memory, FullCAN works only for IDs
> > marked as CAN4, CAN2 and
> > CAN1 messages works only ones.
> > When I tried it only for one separatelly CAN (CAN1
> > or CAN2 or CAN4)
> > (same IDs, diferent CanID bits in Acceptance
> > filter table), FullCAN
> > work fine and when I
> > tried for CAN1+2, same problem.
> > (bits [15/31, 14/30, 13/29]) set to [100] for CAN4
> > (Figure 25 in
> > acceptance entry), 'Preminary User Manual
> > may/2004' at 192. page)
> >
> > Where may be a problem ? What I have to check ?
> > What is wrong ?
> > Than you for advice.
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been
> > removed]
> >
> >
> --
> "Software is like sex, it's better when it's free."
> -- Linus Torvalds
> Regards / S pozdravom Boris Kralik
>
> http://www.geocities.com/kralikbo/
> -------------
> ___________________________________________________________
> Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
> http://uk.promotions.yahoo.com/forgood/environment.html
>
--- In l..., dave@... wrote:
> Thanks Andy. That was probably why I never got it to work either.
I just gave
> up on it.
>

It's fairly clear in the user manual. I'm guessing that the
controller microcode does a binary chop in an attempt to find a match.

I just tried turning on my own GAF to see what happens. I have
methods that insert the ranges in the required order, but my CAN still
drops dead. It seems that I might have a bugette or two...

Rgds,
Martin

The 2024 Embedded Online Conference