I have a project (built using CubeMX) that puts the STM32F042K6 in Standby mode by calling HAL_PWR_EnterSTANDBYMode().
It behaves well and does what I expect. However, the documentation says "SRAM and register contents are lost" in this mode.
I only noticed this after I'd written my code - and now I don't understand how it's working. Does the HAL function somehow take care of this for me? Or is SRAM really being preserved? Or am I just getting lucky?
If I read that warning right, I'd need to re-run all the initialization routines when I come out of standby mode to make sure my ADC/UART/GPIO/etc. are set properly. Is that right?