CAN mailBox selection in Can module of MCAL layer in NXP s32K

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

CAN mailBox selection in Can module of MCAL layer in NXP s32K

39 Views
Kunal_Gettobyte
Contributor III

I want to do CAN communication via NXP S32K1 series of MCU, using S32K144 Microcontroller. Am using Autosar MCAL layer complaint RTD package. In Code configuration tool of S32 Design Studio for Autosar CAN driver, from where we define the mailbox number that we want to use with corresponding Can HardwareObject. 

 

I can see in code preview when i append CANHardwareObject in CDT tool, the file CAN_43_FLEXCAN_VS_0_PBCfg.c, creates a variable by the name of Can_aHwObjectConfig for Can_43_FLEXCAN_HwObjectConfigType structure in that the highlighted area is mailbox number. But how is the mailbox number being assigned? From where in the tool i can configure that????

 

Screenshot 2024-07-15 005815.png

0 Kudos
Reply
1 Reply

19 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Kunal_Gettobyte,

Each individual MB is formed by 16, 24, 40, or 72 bytes, depending on the quantity of data bytes allocated for the message payload: 8, 16, 32, or 64 data bytes, respectively. Please refer to chapter 55.5.3 (Message buffer structure) from S32K1xx's Reference Manual.

For CAN FD, RAM array’s index to the start of a message buffer depends on the size of the message buffer’s data size, as configured in register CAN_FDCTRL[MBDSRx] bitfield. You can also refer to chapter 2.10.2.5 (Accessing message buffers) from AN5413: S32K1xx Series Cookbook.

Best regards,
Julián

0 Kudos
Reply