CAN Acceptance filtering

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CAN Acceptance filtering

2,184 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tridentsx on Tue Dec 06 17:07:11 MST 2011
I want to setup an acceptance filter to accept only 29 bit can ID's either broad casted or with destination the same as my dynamic source address.

I have read the manual and looked at examples trying to understand how to achieve this. Without any luck.

What is FULL Can ? after reading the manual section I need a full CAN of beer ?

It seems to me only explicit ID's or ranges of ID's are possible to filter there is no mask function.

The dynamic source address are bits 0 - 7 of the 29 bit CAN ID how can I put a filter range to accept messages from any source but only accept messages with destination address equal to my own dynamically assigned address which is in bit 8 - 15 position of the 29 bit CAN ID.

Any pointers would be greatly appreciated, I have a feeling I have misunderstood some fundamentals of this filtering.:confused:

Regards /// Carl
0 项奖励
回复
4 回复数

1,610 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mostafanfs on Sun Jan 10 22:16:20 MST 2016

Quote: tridentsx
So after reading the manual and testing some more I have come to the conclusion that the CAN interface in PLC17xx is useless it can't filter ISO based 29 bit addresses, when will the LPC18xx lpc xpresso board be released, I saw in the manual that it has bit masks for the acceptance filters:mad:.

I am so ticked off what a waste of time.



I know this is probably too late but I have the same problem.
I want to implement FMS-Standard V3 and I have a LPC1778 board. From the documents it looks like FMS-Standard V3 is based on J1939. So does this mean I can not implement the standard on LPC1778 ?
If that is the case then what is the problem? LPC1778 supports 29-bit message identifier according to datasheet.
Thanks for your help.
0 项奖励
回复

1,610 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tridentsx on Tue Dec 06 20:04:31 MST 2011
Well that is only for 11 bit CAN.

With a higher layer protocol such as ISOBUS, J1939, nmea200 etc ... usingy 29 bit CAN ID's where bits 0 - 7 is the source address, and  bits 8 - 15 is the destination address then it gets complicated.

I want to add a filter to accept one PGN from all 256 sources I would need one explicit range filter, and that would only work if I assumed the priority to be constant.

If I wanted to accept the same PGN broad casted I would need another explicit filter.

In j1939 there are at least 4 network management messages  +  hundreds of PGN's without bit masking function in the acceptance filter (as possible in LPC18) filtering in h/w is not possible.

I have started building a s/w implementation instead but that is just a stop gap measure until I can lift my application to LPC1850.

Regards /// Carl
0 项奖励
回复

1,610 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Dec 06 19:47:48 MST 2011
Yes, that's incredible complicated. From a working sample without AF you have to modify 4 lines to get a working AF sample :eek:

uint16_t posn;
//add ID601
if(CAN_LoadExplicitEntry(LPC_CAN1, 0x601, STD_ID_FORMAT, &posn)== CAN_OK)
{
  printf("Load Entry\n");            //show message
}
//add group 0x400-0x4FF
if(CAN_LoadGroupEntry(LPC_CAN1, 0x400, 0x4FF, STD_ID_FORMAT, &posn)== CAN_OK)
{
 printf("Load Group\n");            //show message
}

CAN_SetAFMode(LPC_CANAF,CAN_Normal);
0 项奖励
回复

1,610 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tridentsx on Tue Dec 06 19:36:31 MST 2011
So after reading the manual and testing some more I have come to the conclusion that the CAN interface in PLC17xx is useless it can't filter ISO based 29 bit addresses, when will the LPC18xx lpc xpresso board be released, I saw in the manual that it has bit masks for the acceptance filters:mad:.

I am so ticked off what a waste of time.




Quote: tridentsx
I want to setup an acceptance filter to accept only 29 bit can id's either broadcast or with destination the same as my source address.

I have read the manual and looked at examplestrying to understand how to acheive this. Without any luck.

What is FULL Can ? after reading the manual section I need a full CAN of beer ?

It seems to me only explicit ID's or ranges of ID's are possible to filter.

There is no mask, the source is the 8 LSB of the ID how can I put a range to accept all messages from any source but only accpet messages with destination address equal to my own address which is in the 8 - 15 bit position of the id.

Any pointers would be greatly appriciated, I have a feeling I have missunderstood some fundametals of this filtering.:confused:

Regards /// CF

0 项奖励
回复