cancel
Showing results for 
Search instead for 
Did you mean: 

Endianness displayed by Memory vs General purpose registers in STM32f407g-disc1

ismynametaken
Associate II

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

Screenshot 2024-06-07 at 3.16.45 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

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.

 

View solution in original post

4 REPLIES 4
Karl Yamashita
Lead II

What's your definition of "copying"? 

If you find my answers useful, click the accept button so that way others can see the solution.
Pavel A.
Evangelist III

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.

 

Pavel,

Thank you so much . That worked . 

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.