S12X CAN RX issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12X CAN RX issue

500 Views
vishaka_maithil
Contributor I

Dear experts,

 

Yet another issue with CAN . I am using S12XS128 controller for CAN application.

I have build 10 identifiers of which few are 11 bit and the rest 29 bit. I did not see any problem while transmitting messages with these identifiers but at the receivind end of these messages, 29 bit identifiers are exactly received while 11 bit identifiers went wrong. they do not match with the identifiers transmitted. 

the acceptance and mask registers are loaded with the bitwise anding of all the identifiers and invert of the result(after bitwise anding).  The last four bytes of the framed 11-bit identifier must be zeroes but it shows some value.  I would appreciate for a solution ASAP.

Thankyou in advance.

Labels (1)
0 Kudos
2 Replies

309 Views
kef
Specialist I

Hint1: identifier bits layout is different for 11 and 29 bit messages. So you can't and and invert 11-bit IDs with 29-bit IDs directly. You need to do some shifting to match bit positions

Hint2: Accepting 11bit messages when using 16 or 32bit filter, you need to ignore bits that come past the identifier.

Hint3: Why to combine all IDs to single filter, if you have at least 2 filterss. You can make one filter accepting only 11-bit messages, and 2nd filter to accept only 29bit messages.

0 Kudos

309 Views
vishaka_maithil
Contributor I
0 Kudos