I'm using S32K142 device and implementing the following.
Basically I'm passing 32-byte array and sending those via can. But I observed that the data changed during the variable got changed during the process & understood that there might be an issue with the memory allocation.
I observed that the device has two sections and allocates data. I used the default setting.
Kindly suggest How to allocate into the both RAM sections.
unfortunately I do not fully understand the question and the issue.
If you deals with filling message buffer data words then you can refer to
If you want to have bigger payload in the CAN message (8 byte by default) then CAN FD feature have to be enabled and you need to choose payload size for message buffers using FDCTRL[MBDSRn] bit fields. Note for higher payloads the MBs address offset varies.
Refer to chapters 55.4.4 FlexCAN memory partition for CAN FD and 55.4.5 FlexCAN message buffer memory map of the RM.
Thanks for the response.
In fact, I'm passing a 32byte array over a pointer using a function as shown below.
void shareInfo(uint8_t *f_data)
Here the pointer f_data points to an 32-byte array. But during the transfer of the 32-byte data the array is getting modified because of the other function variables.
Kindly suggest some alternatives.