We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, Would like to understand how to save context and registers before entering STOP mode for 8051, and doing a reset, would restore all contexts and registers values ? I can't find any examples or questions in the forum related to this. Hope someone can help. Thanks
Hi, Usualy you should not place variables into registers - it is the RAM which designed for this purpose. During reset (and possible interrupt(s) which wake up a MCU), RAM contents is not modified; oh well, startup code may clear memory so look and modify C-startup code to delete this feature. Now, read some about PowerOn Flag and utilize it. BTW, do search on forum - it was already discussed...