Skip to main content
yanhc
Associate II
October 14, 2018
Solved

What is the endianess of STM32F407? Datasheet conflicts with real test.

  • October 14, 2018
  • 3 replies
  • 2400 views

I checked the data sheet of STM32F407 and it says it is little endian.0690X000006CBOsQAO.png

However, when I test in a real device in MDK, it shows that it is big endian. I assign an int "testttt" as 0x12345678. Then, in memory window, it shows as 0x12345678 which is big endian.

0690X000006CBOxQAO.png

Is there anything I missed?

Thanks for your help in advance.

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    I think you missed the point that the processor doesn't perceive the numbers as being backward, you write 0x12345678, the processor and debugger see it as a 32-bit word 0x12345678.

    Want to see it in byte order? Then select the debugger memory view to show BYTES rather than WORDS.​

    3 replies

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    October 14, 2018

    I think you missed the point that the processor doesn't perceive the numbers as being backward, you write 0x12345678, the processor and debugger see it as a 32-bit word 0x12345678.

    Want to see it in byte order? Then select the debugger memory view to show BYTES rather than WORDS.​

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    yanhc
    yanhcAuthor
    Associate II
    October 21, 2018

    OK, I got it. Thanks very much.​

    yanhc
    yanhcAuthor
    Associate II
    October 21, 2018

    Just find that MDK memory view can display such many options: char, int, short, long, even float and double. Cool!!!

    0690X000006CDtYQAW.png