Skip to main content
Associate
June 7, 2024
Solved

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

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

    This topic has been closed for replies.
    Pavel A.
    Pavel A.Best answer
    June 7, 2024

    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.

     

    4 replies

    Karl Yamashita
    Principal
    June 7, 2024

    What's your definition of "copying"? 

    If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
    Associate
    June 8, 2024

    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. 

    Pavel A.
    Pavel A.Best answer
    June 7, 2024

    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.

     

    Associate
    June 8, 2024

    Pavel,

    Thank you so much . That worked .