2014-01-24 01:49 PM
Hi,
I'm attempting to put my stm32w108 micro controller to sleep using the halSleepWithOptions function. The comments in halSleepWithOptions suggest calling halPowerDown and halPowerUp before and after waking up from sleep respectively. I can find those library functions alright but then it suggests using stStackPowerUp() and cstartup to restore some of the registers. Where can I find those two functions?2014-01-24 02:09 PM
cstartup sounds like an IAR function to initialize the C memory arena (ie bss, statics either cleared, or copied, C++ constructors ctors). Look in cstartup.s or startup_stm32w108.s, ...
I'm not particularly familiar with the W108, but other STM32 reset out of standby, and the SRAM content is assumed to be destroyed, not sure what the expectations are with the sleep mode you're using here.2014-01-24 02:35 PM
I found something regarding cstartup in the context-switch.s79 file. According to the comments in that file, when waking up cstartup will trigger a context restore automatically. So i guess that is already handled for me. I'm still looking for the stStackPowerUp() function though.
2014-01-29 11:37 AM
Has anyone actually been able to go into a deep sleep and recover correctly in the STM32w108?