Hello,
In a Fast Standby example project, I defined an array arr in the .standby_data section, but this array is not used anywhere in the code. However, if I comment out this array definition, the device fails to wake up from Fast Standby; if I keep it, wake‑up works as expected. Moreover, I noticed that the optimization level also affects the behavior: with -O0 optimization, wake‑up fails, but changing to -Os makes it work. Why does defining a variable in the .standby_data section affect the wake‑up functionality? And why does the optimization level have such an impact?
S32K312 RTD400 S32DS
BR,
Jason
Hi@Jason22
Whether you comment out the "arr" array in your program affects the value of __BSS_SRAM_START, which will be used as the initial value of the MSP after a fast wake-up.
If this value is too small, it can cause a stack overflow.
In our example project, we recommend setting this value to 0x20408000, which is the end address of the standby RAM.