2024-06-07 03:49 PM
Hello,
Another newbie question.
In my test program ,I am copying some values from a memory region to a General purpose register. After copying the endianness is reversed. Is there a setting that I am not aware of ?
Example in the screenshot: I copied the value pointed by Address 0x80001b0 ( = 0x1BB10349) into register r2 . As you can see in the screenshot, the value in r2 is 0x4903b11b
Thanks
Solved! Go to Solution.
2024-06-07 04:51 PM - edited 2024-06-07 04:54 PM
What is shown in the memory dump (left side) is just bytes grouped by 4, not 32-bit values. So the endianity is correct. Byte 1B is the lowest significant, therefore it goes first in the dump at 0x080001B0. STM32 are of course little endian. To display the memory by 32-bit and various other format, click on New rendering.
2024-06-07 03:57 PM
What's your definition of "copying"?
2024-06-07 04:51 PM - edited 2024-06-07 04:54 PM
What is shown in the memory dump (left side) is just bytes grouped by 4, not 32-bit values. So the endianity is correct. Byte 1B is the lowest significant, therefore it goes first in the dump at 0x080001B0. STM32 are of course little endian. To display the memory by 32-bit and various other format, click on New rendering.
2024-06-07 05:53 PM
Pavel,
Thank you so much . That worked .
2024-06-07 05:54 PM
Karl,
Thanks for the reply. I meant using LDR to copy the value from memory location the register r2. My question was addressed by Pavel already.