cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, i am working on STM32L073 controller. I am using USB interface to communicate between host (docklight in my case) and controller. I am facing issue related to endianness here.

BChav.1
Associate III

following packet i am sending from host to controller-

02 01 00 02 01 02 03 04 00 01 00(first two bytes are packet type)-controller is expecting that value as 0x0102 but due to endianness mismatch when sent as 0x0102 its interpreted as 0x0201.so every time i need to send that value as 0x0201 to be interpreted as 0x0102 at controller. as controller is using little endian and dock light using big endian format(as per my understanding). how can i send the data from host as 0x0102 and it is interpreted as 0x0102 only and not 0x0201 at controller? Can we do such endianness changes from IDE?Please help me. Working on STM controller for the very first time.

1 REPLY 1

Endianness should not impact the order bytes in an array are sent.

If the ordering of the bytes is wrong, change it.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..