SWRA845 June 2026 CC2340R5 , CC2745R10-Q1
A non-initialized variable section is the memory region that is not cleared or reassigned upon system power-up or soft reset (such as an OTA upgrade), and contains data that must be preserved after a program restart.
To define and use variables in the non-initialized variable section, three steps are required:
.TI.noinit : > SRAM, type = NOINIT

To place data in a non-initialized variable section, the application must use compiler attributes to declare it and assign it to the .TI.noinit section.
__attribute__((noinit)) int noinit_global;
__attribute__((noinit,location(0x100))) int noinit_location_global;



The code in the figure above is an example. A soft reset occurs every 5 seconds. noinit_global will increment continuously and will not be initialized to 0.
Note that a hardware reset (power cycle/reset pin reset) will reset this variable. If power-down hold is required, use non-volatile (NV) memory.