AnsweredAssumed Answered

STOP2 mode wakeup, restore register content issue

Question asked by marmotte on Nov 13, 2015
Latest reply on Nov 19, 2015 by marmotte



I use a MC9S08QE16CLC mcu, CW10.6 and processor expert.



My goal is to make S08 to enter STOP2 mode and exit  by asserting IRQ pin ==> No problem to do that it works well


Before entering STOP2, I save to RAM the content of some registers I'd like to restore when MCU wakes up. This is where I get the issue.


in start08.c: The _Startup(void) is called after reset (and also wakeup) which itself call the Init(); function which ZERO-OUT all RAM content ==> the register content copy I stored in RAM before entering STOP2 is also initialized/erased.



Is there a way to prevent my stored datas to be initialized by Init() function in the StartUp code?


How can I proceed?


Thanks and Sorry for my poor english.