MPC5645S CAN communication and endianess

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5645S CAN communication and endianess

683件の閲覧回数
ino0
Contributor II

Hello,

I am a little confused about endianess when I use CAN communication in MPC5645S.

My question is, when I receive a CAN frame with 8 bytes(frameData), I try to receive it by  'unsigned char data[8]'.

Do I need consider endianess here,

Data[0] = frameData[0];

Data[1] = frameData[1];

...

or I should do it like this:

Data[7] = frameData[0];

Data[6] = frameData[1];

...

ラベル(1)
1 返信

586件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the message buffer structure is following, valid for both RX and TX operation.

pastedImage_1.png

The receive frame is stored into the MB as shown in above picture.

So it depends how the MB was prepared on opposite node, user then read the received message as needed.

BR, Petr