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

STR9 -NOINIT- Variable on powerup or reset

Hi,

Does any body know how to make a variable non initialize to zero on RESET or powerup with Battery backup.

I tried declaring memory bank IRAM1 - as NOINIT and scatter file loading (select Other area as IRAM1), but it doesn't work. Scatter file indicate NOINIT for this bank of memory address.

I created a sample program write a text in an array, verified the array in Memory window, then i give reset from menu and break the program on main(). I found that the array is initialized back to zeros.

Please forward your suggestion to resolve the issue.

Parents
  • When you have a power-on reset, ram will be in a garbage state. In your case, assuming that this string is a static within a function will have random data in it do to the power-on condition. In the simulator, since your not power cycling the ram, the variable could have the same data as before the reset.

Reply
  • When you have a power-on reset, ram will be in a garbage state. In your case, assuming that this string is a static within a function will have random data in it do to the power-on condition. In the simulator, since your not power cycling the ram, the variable could have the same data as before the reset.

Children