cancel
Showing results for 
Search instead for 
Did you mean: 

spc582b, wkpu RAM retention

John_Lee
Associate

I am developing an spc582bxx microcontroller using AutoDevKit Studio.

The device needs to wake up from sleep (standby 0) via wkpu, and RAM data must be preserved when not in por mode.

Therefore, I set the MC_PCU.PCONF2.B.STBY0 register before entering sleep.

However, looking at the generated boot code, it appears to clear all RAM areas during booting.

Is there a boot code sample that preserves RAM data during wake-up via wkpu?

I look forward to your reply.

Thank you.

2 REPLIES 2
db16122
Associate II

RTC/API setup for wake-up in SPC58 family

 

SRomeo
ST Employee

Hi John,
Unfortunately, I do not have any code sample that can address you on this.

Probably, your RAM is not being lost because standby retention failed, but because the boot/startup sequence is clearing or reinitializing RAM after wake-up.

You may check:

  • reset cause (there should be a register)
  • startup code behavior (assure no memory reinitialization are performed)
  • linker placement of retained data (should be mapped by the linker into a RAM area that remains powered in standby)
  • retained SRAM bank configuration

Your request is not trivial. Check the SPC582B reference manual for more.

The easier way I can actually think to solve this problem is to embed an NVM memory on your design, using it to save your configuration before sleep. 

Best regards
Simone,
AEK_TEAM