This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Contents of not initialized memory

Hello!

Here is a general question that probably doesn't have a definite answer:

What data does memory (static RAM) hold if it never was initialized? What I mean is if the controller boards (with external S-RAM) are manufactured, then a software is loaded that doesn't access parts of the RAM, is it possible to "know" what data one would find there before writing to it?
A couple of tests with different boards gave me always $FF for every memory location never initalized, but I am not sure if one could count on this.
Might also depend on the manufacturer of the RAM... maybe?

Thanks for any help
Holger

Parents
  • The content of SRAM after powerup is udefined - that is, it could be anything, and it doesn't have to be repeatable or predictable.

    This is why embedded code must never use a variable before it has been initialised (whether explicitly in your code, or by your startup routines).

Reply
  • The content of SRAM after powerup is udefined - that is, it could be anything, and it doesn't have to be repeatable or predictable.

    This is why embedded code must never use a variable before it has been initialised (whether explicitly in your code, or by your startup routines).

Children
No data