cancel
Showing results for 
Search instead for 
Did you mean: 

After power cycle getting data from SRAM.

HPate.5
Associate II

I have initialized variable as below

uint8_t u8Flag1ForStoreVer __attribute__ ((section (".RAM1_region")));

So, after soft reset I am getting data back.

But also same I am getting after hard reset(Power cycle) , even aftre long time

What should be value in RAM after power on ?

I am using STM32WL controller.

10 REPLIES 10
KnarfB
Principal III

If you just want to distinguish between a power-on reset and other, there should be reset cause flags doing that job.

Otherwise: What is the idea behind the section attribute in your code, and does that work correctly?

> I have initialized variable as below

Don't see any intialization here. Global uninitialized C variables (in .bss) are zeroed and initialized (.data) are copied from flash to RAM by the C runtime.

hth

KnarfB