\section{aversive\_\-10-03-12/modules/debug/diagnostic/stack\_\-space.c File Reference}
\label{stack__space_8c}\index{aversive\_\-10-03-12/modules/debug/diagnostic/stack\_\-space.c@{aversive\_\-10-03-12/modules/debug/diagnostic/stack\_\-space.c}}
{\tt \#include $<$avr/io.h$>$}\par
{\tt \#include $<$aversive.h$>$}\par
{\tt \#include $<$diagnostic.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf fill\_\-mem\_\-with\_\-mark} (void)
\item 
uint16\_\-t {\bf min\_\-stack\_\-space\_\-available} (void)
\end{CompactItemize}


\subsection{Function Documentation}
\index{stack\_\-space.c@{stack\_\-space.c}!fill\_\-mem\_\-with\_\-mark@{fill\_\-mem\_\-with\_\-mark}}
\index{fill\_\-mem\_\-with\_\-mark@{fill\_\-mem\_\-with\_\-mark}!stack_space.c@{stack\_\-space.c}}
\subsubsection[fill\_\-mem\_\-with\_\-mark]{\setlength{\rightskip}{0pt plus 5cm}void fill\_\-mem\_\-with\_\-mark (void)}\label{stack__space_8c_246e3f66b37c6096371fdd43ed7de9bf}


This diagnostical software fills the RAM with a mark, and counts how many of these marks are unmodified, in order to avaluate the min stack space available after code execution. You can then know how much your stack your program needed in a peak, without looking espacially when this peak arises. you see the minmal stack space left since the reset of the microcontroller. this functions fills the ram with a predefined pattern after a reset and BEFORE any other operation 

Definition at line 37 of file stack\_\-space.c.

References i.\index{stack\_\-space.c@{stack\_\-space.c}!min\_\-stack\_\-space\_\-available@{min\_\-stack\_\-space\_\-available}}
\index{min\_\-stack\_\-space\_\-available@{min\_\-stack\_\-space\_\-available}!stack_space.c@{stack\_\-space.c}}
\subsubsection[min\_\-stack\_\-space\_\-available]{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t min\_\-stack\_\-space\_\-available (void)}\label{stack__space_8c_a431d3090cd08cdf9c367b4835c59123}


This functuion allows to monitor the maximal stack space that was used since the last reset (peak value) you can then monitor the available space in your ram returns the minimal value of the free space left 

Definition at line 69 of file stack\_\-space.c.

References i.