.. _firmware_safety:

Safety Controller
=================

The safety controller is the software component that monitors the overall condition of the reflow controller,
and stops the output driver in case of an error.

Severe error flags, like a drifting reference voltage, stop the PID controller and force the output to zero.
The controller stays in a usable state. After the errors have been cleared, normal operation may continue.

On the other hand, fatal errors like an over-temperature error, or memory problem, lead to the activation of the :ref:`safety_panic`,
which forces the output zero, but does not allow any further interaction.

On top of this, a :ref:`backup_ram` is implemented. It stores permantent errors, which are reset at a restart. On top of that, it stores the :ref:`backup_ram_boot_flags`,
which are used to retain boot information across resets, for example to communicate with the firmware updater etc. The RAM also contains entries, that allow overrides of flag weights and persistance.

.. toctree::
	:maxdepth: 3
	
	flags
	backup-ram
	error-handling
	stack-checking
