Hello,
I'm using the CANbus protocol. I have no problems sending or receiving. However, I'm wondering if the messages I send or receive adhere to the big-endian rule, or if I need to do this manually.
Hello,
I'm using the CANbus protocol. I have no problems sending or receiving. However, I'm wondering if the messages I send or receive adhere to the big-endian rule, or if I need to do this manually.
Hi Dobby,
CAN itself has no concept of big-endian or little-endian for the data bytes. Endianness is entirely your responsibility at the application level.
As shown here the CAN transmit API is taking an array as input right,

After that the data bytes from this array are writing into DATA register as byte by byte from index-0

So, the bytes will get out from index-0 onwards. So, there is no concept of big endian or little endian here, which ever order we write into DATA register that will go on CAN physical layer.
--
Thanks & regards,
Jagadish.