This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642: attribute NOINIT not working on chip reset ...

Expert 2025 points
Part Number: AWR1642

I'm trying to preserve a few values in RAM between resets, and this is not working on the MSS side at least.

Adding attribute to a struct variable with __attribute__(( noinit )),   has done the job previously on other controllers.  And in fact after I examine the generated map file by the linker, i see in fact, that the variable is placed into the right section   : .TI.noinit, and it is marked as UNINITIALIZED.

This I placed into the data memory, or  MSS_TCMB (from 0x0800_0000 onwards , whether compiler/linker finds free space to place that .TI.noinit)

However, this doesn't seem to work fully.  The only case I see this working - i.e., memory is not loaded/initialized/changed/cleared at the restart - when I reset the MSS with CR4 only reset. 

If I do , for example, MSS WDOG reset, then this memory is seems specifically cleared all to 0s..    This I tested with code, and also specifically writing some values to memory directly when performing reset. 

I don't understand this: is  MSS_TCMB data memory specifically cleared all to 0 by the hardware reset logic or is the bootloader code clearing all my MSS data memory?

  • Hello,

    As during the warm reset application will be re-loaded by the bootloader so all the variables will be re-init by the startup of app.

    You can use SPARE register (unused) which retains its value across warm reset.

    Regards,

    Jitendra

  • Jitendra Gupta said:
    As during the warm reset application will be re-loaded by the bootloader so all the variables will be re-init by the startup of app.

    But this is NOINIT  / __attribute__((noinit)) .. .   C runtime should not touch it, otherwise this attribute is not working . 

    So which code then you are saying re-inits it .. ?   Does the bootloader specifically goes & clears out ( by writing 0s ) all the TCMB ? .....

  • Jitendra Gupta said:
    You can use SPARE register (unused) which retains its value across warm reset.

    Yes and I have, but its very risky to use these limited registers for which there is no official release doc which says what is used what is not.  Even worse,  no guarantees they (free ones) won't be used in next say release of TI's firmware.

    And further, they may have much better use.

  • Hi,

    Please give me some time to check with Jitendra

    thank you

    Cesar

  • HI,

    The MSS_SW_BUFFER (0x0C200000 – 8KB)memory is untouched by the bootloader

    Thank you

    Cesar