S32K1XX FLEXCAN

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

S32K1XX FLEXCAN

Jump to solution
3,757 Views
PINKMAN
Contributor III

hello ,experts:

We know FLEXCAN support CAN receive by MB and RXFIFO

I have a question that when i config Message received in RXFIFO mode with interrupt ,the rxFIFO engine occupied 0-5MB,and i set 8  Rx FIFO Filters which occupied 2MB 

so the first 8 MB is used for  rxFIFO engine and Filters element. there are 24 MB (S32K116)left,.

It is clear that i can config any MB in the range of left MB for transmit  ,BUT I wonder that  if i can set a MB used for Receive, Even i have used RX FIFO. 

if yes ? can you share a demo for me ?

if no , that means the MB after FIFO could only used for transmit MB ?

0 Kudos
Reply
1 Solution
3,627 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

up to 32 elements of the filter table are individually affected by the Individual Mask
Registers (RXIMRx), according to the setting of CTRL2[RFFN], if individual mask scheme is used (IMRQ=1). If the IRMQ bit is negated, then the FIFO filter table is affected by RXFGMASK only and RXMGMASK, RX14MASK, RX15MASK are used for rest of MBs.

BR, Petr

 

View solution in original post

7 Replies
3,714 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

rest of available MBs can be set for both TX and/or RX operation.
Some SDK based example is posted at https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-FlexCAN-RXFIFO-DMA-S32DS-ARM-2018-R...
Hope it helps.

BR, Petr 

3,704 Views
PINKMAN
Contributor III

thank you ! in fact, if i use RXFIFO meanwhile i also set a MB for RX, if the message passed the filter element ,so the MB for RX will not be used ?

0 Kudos
Reply
3,682 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

depends on the setting, but if RXFIFO is set to be searched first and the Rx FIFO is a matched structure and is free-to-receive, then the Rx FIFO is the matching winner regardless of the scan for MBs. Then at the end of matching process the message is moved-in to RXFIFO.
I can recommend to read chapters Receive Process and Matching Process of the device RM.

BR, Petr

0 Kudos
Reply
3,642 Views
PINKMAN
Contributor III

i'm sorry, there is still a question that if i use RXFIFO, i can only set mask with FLEXCAN_RX_MASK_INDIVIDUAL ? which means only use RXIMR and RXFGMASK to config filter items and other MBs. uder this condition(use RXFIFO),i think use RXMGMASK, RX14MASK, RX15MASK is a wrong configration maybe?

0 Kudos
Reply
3,628 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

up to 32 elements of the filter table are individually affected by the Individual Mask
Registers (RXIMRx), according to the setting of CTRL2[RFFN], if individual mask scheme is used (IMRQ=1). If the IRMQ bit is negated, then the FIFO filter table is affected by RXFGMASK only and RXMGMASK, RX14MASK, RX15MASK are used for rest of MBs.

BR, Petr

 

3,609 Views
PINKMAN
Contributor III

OK ,I GOT IT.NB! THANKS

0 Kudos
Reply
3,671 Views
PINKMAN
Contributor III

非常感谢

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1954607%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1954607%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehello%20%2Cexperts%3A%3C%2FP%3E%3CP%3EWe%20know%20FLEXCAN%20support%20CAN%20receive%20by%20MB%20and%20RXFIFO%3C%2FP%3E%3CP%3EI%20have%20a%20question%20that%20when%20i%20config%20Message%20received%20in%26nbsp%3BRXFIFO%20mode%20with%20interrupt%20%2Cthe%20rxFIFO%20engine%26nbsp%3Boccupied%200-5MB%2Cand%20i%20set%208%20%26nbsp%3BRx%20FIFO%20Filters%20which%26nbsp%3Boccupied%202MB%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20the%20first%208%20MB%20is%20used%20for%26nbsp%3B%20rxFIFO%20engine%20and%26nbsp%3BFilters%20element.%20there%20are%2024%20MB%20(S32K116)left%2C.%3C%2FP%3E%3CP%3EIt%20is%20clear%20that%20i%20can%20config%20any%20MB%20in%20the%20range%20of%20left%20MB%20for%20transmit%26nbsp%3B%20%2CBUT%20I%20wonder%20that%26nbsp%3B%20if%20i%20can%20set%20a%26nbsp%3BMB%20used%20for%20Receive%2C%20Even%20i%20have%20used%20RX%20FIFO.%26nbsp%3B%3C%2FP%3E%3CP%3Eif%20yes%20%3F%20can%20you%20share%20a%20demo%20for%20me%20%3F%3C%2FP%3E%3CP%3Eif%20no%20%2C%20that%20means%20the%20MB%20after%20FIFO%20could%20only%20used%20for%20transmit%20MB%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1956670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1956670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOK%20%2CI%20GOT%20IT.NB!%20THANKS%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1956573%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1956573%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Eup%20to%2032%20elements%20of%20the%20filter%20table%20are%20individually%20affected%20by%20the%20Individual%20Mask%3CBR%20%2F%3ERegisters%20(RXIMRx)%2C%20according%20to%20the%20setting%20of%20CTRL2%5BRFFN%5D%2C%20if%20individual%20mask%20scheme%20is%20used%20(IMRQ%3D1).%20If%20the%20IRMQ%20bit%20is%20negated%2C%20then%20the%20FIFO%20filter%20table%20is%20affected%20by%20RXFGMASK%20only%20and%26nbsp%3B%3CSPAN%3ERXMGMASK%2C%20RX14MASK%2C%20RX15MASK%20are%20used%20for%20rest%20of%20MBs.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBR%2C%20Petr%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1956146%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1956146%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ei'm%20sorry%2C%20there%20is%20still%20a%20question%20that%20if%20i%20use%20RXFIFO%2C%20i%20can%20only%20set%20mask%20with%20FLEXCAN_RX_MASK_INDIVIDUAL%20%3F%20which%20means%20only%20use%26nbsp%3BRXIMR%20and%20RXFGMASK%20to%20config%20filter%20items%20and%20other%20MBs.%20uder%20this%20condition(use%20RXFIFO)%2Ci%20think%20use%26nbsp%3BRXMGMASK%2C%20RX14MASK%2C%20RX15MASK%20is%20a%20wrong%20configration%20maybe%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1955594%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1955594%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20so%20much%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1955465%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1955465%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Edepends%20on%20the%20setting%2C%20but%20if%20RXFIFO%20is%20set%20to%20be%20searched%20first%20and%26nbsp%3Bthe%20Rx%20FIFO%20is%20a%20matched%20structure%20and%20is%20free-to-receive%2C%20then%20the%20Rx%20FIFO%20is%20the%20matching%20winner%20regardless%20of%20the%20scan%20for%20MBs.%20Then%20at%20the%20end%20of%20matching%20process%20the%20message%20is%20moved-in%20to%20RXFIFO.%3CBR%20%2F%3EI%20can%20recommend%20to%20read%20chapters%20Receive%20Process%20and%20Matching%20Process%20of%20the%20device%20RM.%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1955264%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1955264%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ethank%20you%20!%20in%20fact%2C%20if%20i%20use%20RXFIFO%20meanwhile%20i%20also%20set%20a%20MB%20for%20RX%2C%20if%20the%20message%20passed%20the%20filter%20element%20%2Cso%20the%20MB%20for%20RX%20will%20not%20be%20used%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1955070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K1XX%20FLEXCAN%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1955070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Erest%20of%20available%20MBs%20can%20be%20set%20for%20both%20TX%20and%2For%20RX%20operation.%3CBR%20%2F%3ESome%20SDK%20based%20example%20is%20posted%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K144-FlexCAN-RXFIFO-DMA-S32DS-ARM-2018-R1%2Fta-p%2F1120014%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K144-FlexCAN-RXFIFO-DMA-S32DS-ARM-2018-R1%2Fta-p%2F1120014%3C%2FA%3E%3CBR%20%2F%3EHope%20it%20helps.%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E