SLUAAP6 September   2023 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138128A , UCD3138A , UCD3138A64

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Check the Size for Each Stack
  5. 2Check if an Overflow Happens
  6. 3Summary
  7. 4References

Abstract

It is hard to tell how much size a stack uses statically since the size varies with the code running. There are other things that are stored in RAM as well, for example global variables. If a stack overflow happens, it modifies the others unexpectedly, causing unpredictable problems. Therefore, it is necessary to reserve enough room for STACK. This application note describes two processes to check if a stack overflow happens.