If you restart the device with [Keep log on restart] enabled in the Log settings, the following messages are output to the log immediately after startup.

[LOG] #### BOOT UP ################################
[LOG] Reset by SoftReset()
[LOG] Keep log messages successfully!
[LOG] User Stack: Least rest bytes was 12328
[LOG] Interrupt Stack: Least rest bytes was 3852
...

The number in the "[LOG] User Stack:" line represents the minimum amount of the stack memory for application program remaining between the last restart and this restart. In the above example, the minimum remaining capacity was 12328 bytes.

The total amount of the stack memory for application program is 15KB. If the stack overflow occurs, it will behave unpredictably, so it is recommended to review the program when the minimum remaining capacity reaches about 2KB.

Note:

The remaining capacity is calculated by examining where the value of the stack memory area is changed. Therefore, please note that if the data is reserved as a local variable but the data is not written, it will not be reflected in the calculation of the remaining capacity, and a value larger than the actual remaining capacity may be displayed as the minimum remaining capacity.


Last updated: 2021/06/03