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.

Define a variable which holds values over a reset

Other Parts Discussed in Thread: TMS570LS3137

Hello,

I need to remember some values over a controller (TMS570LS3137) reset. I do the reset either by nPORRST pin or by software writing 0 to SYSECR register.

It doesn't matter where this variable is located (TCRAM, SDRAM over EMIF)

Is there a way to achieve this?

Thank you

BR

Christian

  • Hi Christian,

    I'd recommend to use FEE (Flash EEPROM Emulation). The FEE resides in bank 7 of the flash memory. The HalCoGen is able to generate source code for erase/read/write the FEE block.

    Regards,

    QJ

  • Hi QJ,

    I will try this.

    Thanks

    BR

    Christian

  • Hello Christian,

    if your data size in the internal RAM is just in units of Bytes you can save those variable into CPU registers before the memory initialization (filled by zeroes because of an easy initialization of ECC values) and restore those variable into the internal RAM after its initialization and check are done.
    By the way, similar init procedure is not performed for an external memory by default. Of course, variables located in the external RAM will be available after EMIF initialization. Is there another reason why you cannot temporarily store variables from the internal RAM into the external one?
    Best regards,
    Jiri
  • Hi Jiri,

    I've tried to use the external RAM, but the function __TI_decompress_rle_core() always resets my variable to Zero at startup. I don't know how to avoid this.

    For me, I now use the SRAM built in in the RTC chip on my PCB. I can access it over SPI. This is more complex but it fits my requirements and works already.

    Thanks your help.

    BR

    Christian