CAN ID filtering of messages

Started by scuthbertf September 20, 2003
I have a CAN transmit routine that sends messages to another D60A
Axiom development board where a CAN receive routine receives the
messages using eight 8-bit filters, CIDAC=$20, and all masks are set
at $FF, movb #$FF,CIDMR0 for mask registers 0 thru 7, and the ID
acceptance registers are all set at $00 thru $07, movb #$00,CIDAR0,
movb #$01,CIDAR1 etc. ALL messages are received as expected, no
matter what IDR0 is set to in the message frame
(IDR1=$00,IDR2=$00,IDR2=$00). I am sending standard messages, not
extended. My problem arises when I change all mask registers to $0
F, asking for first 5 bits of IFR0 to be compared! I notice that any
IDR0 with a value of $00 thru $07 is received, as expected, while any
other IDR0 value is rejected also as expected. Next, I changed the
CIDAR0 thru CIDAR7 acceptance registers to accept msgs in the range
of $10 thru $17 thinking that messages with IDs of $10 thru $17 would
all be accepted by the $0F filtering, BUT no such luck! As I
understand it, the 0s in the mask register are the bits that have to
be matched in the acceptance registers, the 1s are don't cares. Can
anyone explain my error?
Any suggestions will be appreciated.