This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2368 29 bit CAN Acceptance Filter problem

This has to be something SIMPLE ...

Problem:

Configuring the CAN Acceptance filter LPC2368 for 29 bit extended range of addresses.

We have two main incoming CAN IDs we're interested in:

0x18DAF10E and 0x18DAF110

We can get one or the other to work, but not both at the same time. We have successfully done this for 11 bit filters, but for some reason this is escaping us right now.

Code snippet:
===========

void init_af_29bit(void)
{ // Acceptance Filter Configuration
AFMR = 0x00000001; // Disable the Acceptance filters to allow setup of the table

// Zero the tables
memset((void *)AFRAM, 0, 512);

SFF_sa = 0x00; // Standard Frame Individual Start Address Register
SFF_GRP_sa = 0x00; // Standard Frame Group(range) Start Address Register
EFF_sa = 0x00; // Extended Frame Start Address Register
EFF_GRP_sa = 0x00; // Extended Frame Group(range) Start Address Register

//Message sent (broadcast 29 bit)
// 18DB33F1 X 8 02 01 00 00 00 00 00 00
//Message we receive in response
// 18DAF10E X 8 06 41 00 BF BF A8 93 55

//works (for address 0x18DAF10E but not 0x18DAF110)
*(AFRAM + 0x00) = 0x18DAF10E; // Lower range
*(AFRAM + 0x04) = 0x18DAF110; // Upper range

//does not work, why? Should open up the range?
//*(AFRAM + 0x00) = 0x18DAF101;// Lower range
//*(AFRAM + 0x04) = 0x18DAF10F; // Upper range

// Send CAN addresses
// 0x18DA10F1 29-bit (extended)
//or
// 0x18DB33F1 29-bit BROADCAST

// Receive CAN addresses
// 0x18DAF110 29-bit
// 0x18DAF10E 29-bit BROADCAST

ENDofTable = 0x08; // Needs to be EFF_GRP_sa if not accepting a range of 29-bit CAN IDs

// Acceptance Filter Configuration -- Complete

AFMR = 0; // Acceptance Filter Enabled
return;
}

0