This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RAM behavior after soft-reset

Does anyone know wether the internal RAM contents of the STM32-microcontroller changes during a soft-reset respective a power on reset? It would be useful to know for sure that (for example) the RAM content will be reliable safe during a soft-reset and that the RAM will be erased by a power-on reset. Is anyone out there knowing something about the reset-behavior? Thank You very much in advance!

Parents
  • The SRAM is NOT erased at power up, it contains random/undefined content. The SRAM will retain across an NRST (external, or internal), so strategically placed values will remain. The Keil C startup code will clear/copy static regions defined by your code load, the startup code can be further modified to clear/set the rest/entire/portions of memory as required/desired.

    There is a 4KB portion of NVRAM as I recall in the RTC/BKP domain which can be cleared by the TAMPER pin.

    If you want to pass parameters across a reset, I would suggest building a structure in which to place them, with a signature, and a checksum, this way you can validate and manage it more cleanly.

Reply
  • The SRAM is NOT erased at power up, it contains random/undefined content. The SRAM will retain across an NRST (external, or internal), so strategically placed values will remain. The Keil C startup code will clear/copy static regions defined by your code load, the startup code can be further modified to clear/set the rest/entire/portions of memory as required/desired.

    There is a 4KB portion of NVRAM as I recall in the RTC/BKP domain which can be cleared by the TAMPER pin.

    If you want to pass parameters across a reset, I would suggest building a structure in which to place them, with a signature, and a checksum, this way you can validate and manage it more cleanly.

Children