S32K310 CAN MessageBuffer and HwObjectCount

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

S32K310 CAN MessageBuffer and HwObjectCount

Jump to solution
1,168 Views
Embedded_novice
Contributor III

我在使用EB配置S32K310的MCAL的CAN模块时产生一些疑问:

1.我在手册中看到S32K310的MessageBuffer大小是64,那么HwObjectCount的最大配置数是否与MessageBuffer相关,如果不相关的话,我想知道HwObjectCount的最大配置数收什么因素的限制?MessageBuffer的最大个数64又会影响什么配置?(在我个人的理解中,FIFO的大小应该是由HwObjectCount决定的,且HwObjectCount不应该超过MessageBuffer的大小)

2.CAN模块是否一定要搭配CANIF组件使用,MailBox是在使用CANIF时才会用到的概念吗?MailBox的大小与什么有关?

CANCFG.png

感谢帮助!

0 Kudos
Reply
1 Solution
1,131 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Embedded_novice,

According to the FlexCAN MCAL user manual, in case of HRH, HwObjectCount is number of
elements in the hardware FIFO.

Regarding your question, yes, CAN hardware objects defined as a PDU buffer. The CAN RAM block can store message buffers in different configurations of sizes. According to the S32K3XX reference manual, the RAM block can store 32 messages of 8 bytes, 21 messages of 16 bytes, 12 messages of 32 bytes or 7 messages of 64 bytes. So, it is based on MB.

The CAN Interface (CanIf) is found between the low-level CAN drivers and the upper communication service layers from the AUTOSAR stack. It is not related to the Mailbox concept. The mailbox system is composed of a set of message buffers (MB) that store configuration and control data, time stamp, message ID, and data (see Message buffer structure).

Julin_AragnM_0-1740164337037.png

You can read the following article to know more about the CAN module: Communicating over the CAN Bus - NXP Community.

Hope this helps.

View solution in original post

0 Kudos
Reply
1 Reply
1,132 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Embedded_novice,

According to the FlexCAN MCAL user manual, in case of HRH, HwObjectCount is number of
elements in the hardware FIFO.

Regarding your question, yes, CAN hardware objects defined as a PDU buffer. The CAN RAM block can store message buffers in different configurations of sizes. According to the S32K3XX reference manual, the RAM block can store 32 messages of 8 bytes, 21 messages of 16 bytes, 12 messages of 32 bytes or 7 messages of 64 bytes. So, it is based on MB.

The CAN Interface (CanIf) is found between the low-level CAN drivers and the upper communication service layers from the AUTOSAR stack. It is not related to the Mailbox concept. The mailbox system is composed of a set of message buffers (MB) that store configuration and control data, time stamp, message ID, and data (see Message buffer structure).

Julin_AragnM_0-1740164337037.png

You can read the following article to know more about the CAN module: Communicating over the CAN Bus - NXP Community.

Hope this helps.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2047115%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ES32K310%20CAN%20MessageBuffer%20and%20HwObjectCount%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2047115%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20some%20questions%20when%20using%20EB%20to%20configure%20the%20CAN%20module%20of%20MCAL%20of%20S32K310%3A%3C%2FP%3E%3CP%3E1.%20I%20saw%20in%20the%20manual%20that%20the%20MessageBuffer%20size%20of%20S32K310%20is%2064.%20Is%20the%20maximum%20configuration%20number%20of%20HwObjectCount%20related%20to%20MessageBuffer%3F%20If%20not%2C%20I%20would%20like%20to%20know%20what%20factors%20limit%20the%20maximum%20configuration%20number%20of%20HwObjectCount%3F%20What%20configuration%20will%20be%20affected%20by%20the%20maximum%20number%20of%20MessageBuffers%20(64)%3F%20(In%20my%20personal%20understanding%2C%20the%20size%20of%20FIFO%20should%20be%20determined%20by%20HwObjectCount%2C%20and%20HwObjectCount%20should%20not%20exceed%20the%20size%20of%20MessageBuffer)%3C%2FP%3E%3CP%3E2.Does%20the%20CAN%20module%20have%20to%20be%20used%20with%20CANIF%20components%3F%20Is%20MailBox%20a%20concept%20that%20is%20only%20used%20when%20using%20CANIF%3F%20What%20does%20the%20size%20of%20MailBox%20depend%20on%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CANCFG.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CANCFG.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F324721iB89605B51945C94D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22CANCFG.png%22%20alt%3D%22CANCFG.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThanks%20for%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2049255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K310%20CAN%20MessageBuffer%20and%20HwObjectCount%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2049255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F213197%22%20target%3D%22_blank%22%3E%40Embedded_novice%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EAccording%20to%20the%20FlexCAN%20MCAL%20user%20manual%2C%20in%20case%20of%26nbsp%3BHRH%2C%20HwObjectCount%20is%26nbsp%3Bnumber%20of%3CBR%20%2F%3Eelements%20in%20the%20hardware%20FIFO.%3C%2FP%3E%0A%3CP%3ERegarding%20your%20question%2C%20yes%2C%20CAN%26nbsp%3Bhardware%20objects%20defined%20as%20a%20PDU%20buffer.%26nbsp%3BThe%20CAN%20RAM%20block%20can%20store%20message%20buffers%20in%20different%20configurations%20of%20sizes.%20According%20to%20the%20S32K3XX%20reference%20manual%2C%20the%20RAM%20block%20can%20store%2032%20messages%20of%208%20bytes%2C%2021%20messages%20of%2016%20bytes%2C%2012%20messages%20of%2032%20bytes%20or%207%20messages%20of%2064%20bytes.%20So%2C%20it%20is%20based%20on%20MB.%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20CAN%20Interface%20(CanIf)%20is%20found%20between%20the%20low-level%20CAN%20drivers%20and%20the%20upper%20communication%20service%20layers%20from%20the%20AUTOSAR%20stack.%20It%20is%20not%20related%20to%20the%20Mailbox%20concept.%26nbsp%3B%3CSPAN%20class%3D%22%22%3EThe%20mailbox%20system%20is%20composed%20of%20a%20set%20of%20message%20buffers%20(MB)%20that%20store%20configuration%20and%20control%20data%2C%20time%20stamp%2C%20message%20ID%2C%20and%20data%20(see%20Message%20buffer%20structure).%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Julin_AragnM_0-1740164337037.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Julin_AragnM_0-1740164337037.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325196i6AED49E7866D5D0F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Julin_AragnM_0-1740164337037.png%22%20alt%3D%22Julin_AragnM_0-1740164337037.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EYou%20can%20read%20the%20following%20article%20to%20know%20more%20about%20the%20CAN%20module%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNXP-Model-Based-Design-Tools%2FCommunicating-over-the-CAN-Bus%2Fta-p%2F1758456%22%20target%3D%22_blank%22%3ECommunicating%20over%20the%20CAN%20Bus%20-%20NXP%20Community%3C%2FA%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHope%20this%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E