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.

TMS570LC4357: How to store a variable while clearing the RAM memory

Part Number: TMS570LC4357


Dear Sirs.

We want to store the reason for a Reset and make it persistent along the RAM clearing process, so that we can use it later in the application for logging purposes.

Is there any set of registers available for the user that would remain persistent along the startup code?

Thank you

  • Hi,

    Couple ways can be used to store the variable:

    1. The internal SRAM (512KB) is divided into 8 memory regions. Each region has an associated control bit to enable autoinitialization: MEMINIT_ENA[n] of L2RAMW Memory Initialization Domain Register (MEMINIT_DOMAIN). All the 8 memory regions are enabled by default. You can initialize any regions selected in MEMINIT_ENA[n], so you can copy the variable to un-selected RAM region, then copy it back.

    2. Store the variable to the peripheral RAM which is not used in your application. For example, N2HET2 RAM is not used, you can copy the variable to RAM region starting at 0xFF440000.

    3. Store the variable to EEPROM (bank 7) using FEE driver

         

        

  • Than you Wang.

    I was considering option 2 as maybe the simplest. Just wondering if there are registers reserved for this kind of "user usage". I've seen that in other uC, even backed-up by the external battery. But you're right, we can use any register in an unused peripheral as long as it's clocked and does not change any behavior.