2020-08-01 04:05 AM
2020-08-01 04:11 AM
That's a short mail. How is your power supply and software. Uneven power can make any device unreliable. Then a memory is filled with random or semirandom data. Check power supply pins with oscilloscope. But wipimg a memory is easy with your SW is easy, too.
2020-08-01 04:16 AM
There is no problem with the power supply circuit. I used the HAL_SRAM_Write_16b functions and this problem occurs after a short time
2020-08-01 04:17 AM
>After a short time, the memory is cleared
Assuming GCC. Assuming the memory in question is .bss. Check reset-reason. Watchdog-reset? Break-point your hard-fault exception.
2020-08-01 05:36 AM
There is standard ways in C language to do that. Use structs, memcpy , ...
I recommend you not to write to memory manually.
2020-08-01 06:21 AM
What board/hardware are you using?
Present the problem more clearly/completely.
2020-08-01 07:22 AM
in a simple unweird application, after reset, the compiler init the global variables to their init value, typically zeros. it is prior to main in startup function, as power up sram yield random content.
2020-08-01 08:05 AM
In 99% cases it's just a software issue related to buffer overflows, pointer mismanagement, interrupt/thread unsafe code or other flaws.