Erasing SRAM in STM32L071RZT6 MCU
I suspect your question is badly formulated and that is not what you want, but I will answer what you have asked for.Yes you can clear all your SRAM but you have to do some very careful coding as it will destroy your stackpointer contents. As such you can NOT call another function as the return address will have disappeared, together with the values of all your variables and intialised structures.If you do use memset() your CPU will start running from address 0 when it tries to return.