K66 Flexcan TableB FIFO

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

K66 Flexcan TableB FIFO

1,060 Views
yodabox64
Contributor I

I’m having an issue with TableB format of flexcan on the K66, is there a special way the mask (individual masking enabled), I can’t seem to work out an example or find referenced to this table’s mask setup since we’re dealing with 2 IDs per filter. The datasheet seems clear enough for the details of the graph layout for the IDTable entry, but no idea on how the single RXIMR filter is used or shifted to work with that TableB format of 2 IDs

Thanks

Tony

0 Kudos
6 Replies

718 Views
yodabox64
Contributor I

Ok, I'm marking this as ressolved, thanks Mike for your help.

I will just add additional info, even though extended IDs can be sent in IDs 0xFFFF or lower, you need to be higher than that (0x10000+) for at least 1 bit to populate the upper 14 bit region for filtering, otherwise your filter will be based on 0 once all the shifts are done. I have successfully created an automatic masking interface by just sending the IDs to the function be it single ids (ext/std), 2 ids each (quad id filter), and third function range based ids, since the masking is done automatically, the user need not worry about how to shift bytes on his own.

Thank you

Tony

0 Kudos

718 Views
yodabox64
Contributor I

Just an extra note, still unknown on how to handle the rximr entry of the TableB, is there a limitation or other anomaly surrounding having to use the same ids as full standard, or both as extended ids using 14 most significant bits, or can they be mixed 1STD + 1EXT?

The diagram looks like we could have a mix, but doesnt explain the filtering pattern regarding tableB.

TableA was easy to setup, but I havn’t seen code examples for B tables at all through google researches , and I would imagine a filter setup for both ext and std in a single table would require a special masking of some sort for rximr, be it shifted a certain position or using most/least 16 bits of the mask for each, even the RXFGMASK doesnt explain how to handle TableB IDs

Is there more documentation somewhere on the RXIMR individual masking that details what it can/can’t do and/or it’s limitation regarding scoped ID tables?

Thanks

0 Kudos

718 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please refer below pictures about Rx FIFO ID table structure:

pastedImage_1.png

pastedImage_2.png

Wish it helps.


Have a great day,
Mike

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

718 Views
yodabox64
Contributor I

Thank you for the response, I am okay with those diagrams for setting the tables correctly, however how is the mask work against it?

lets say i have individual masking enabled, so we apply the ids to table0 with for example:

we’ll use std id 19-29, and extid 0-13 for table B

the mask for the rximr OR the RXFGMASK should be what since its only a single 32bit field

can i assume that 0-13 bits of the mask is matched against 0-13 of the extid and 19-29 bits of the same mask is matched against 19-29 of the stdid, and therefore assume that the remaining bits in the mask are unused?

here ill put S for standard id and E for ext, and try to give a visual mask:

0b00SSSSSSSSSSS11101EEEEEEEEEEEEEE

so given that table, if we create a mask for it, i presume the other bits(1 and 0) are not used in the masking process?

sorry just trying to clarify things :smileyhappy:

Thanks

Tony

0 Kudos

718 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Tony,

Thank you for the detailed explain.

When you using below setting at CANx_RXFGMASK register:

0b00SSSSSSSSSSS11101EEEEEEEEEEEEEE

It will filter the full standard ID and partial extend ID at same time.

If there with issue with your application?


Have a great day,
Mike

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

718 Views
yodabox64
Contributor I

Thank you I will try again using this information, no problem for application i’m currently just writing a driver for the controller for the Arduino environment with automatic masking capability thereby giving the user multiple configuration type of setup without the knowledge of how to setup the masks and filters for their environment, only by simply passing their standard/extended ID to the function and let it do the calculations and setup automatically.

0 Kudos