Stack guard is a module that helps detect stack violation which can be caused by errors in the code or by a too small stack size.
It is difficult to detect issues related to stack overflow because symptoms differ in every case and they may appear a long time after stack violation has occurred. The stack guard uses MPU (Memory Protection Unit) driver to protect a block of memory at the base of the main stack. MPU generates an exception on the first stack violation.
For API documentation of this module, see Stack guard.