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.
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.
Data is not retained between reset while inside ULINK debugger, please check it is not working.
We have provided a battery back to interanl RAM/RTC for retaining data when power is OFF. RTC is retaining the Date/Time set.
http://www.keil.com/support/docs/3290.htm