Safety Flags

The safety flags are represented in software by the following enums

enum safety_flag

Enum type representing safety flags.

The enum type is binary or’able to allow combining multiple safety flags.

Note

For a more detailed explaination of the flags, check out the Sphinx documentation.

Values:

enumerator ERR_FLAG_NO_FLAG
enumerator ERR_FLAG_MEAS_ADC_OFF
enumerator ERR_FLAG_MEAS_ADC_OVERFLOW
enumerator ERR_FLAG_MEAS_ADC_WATCHDOG
enumerator ERR_FLAG_MEAS_ADC_UNSTABLE
enumerator ERR_FLAG_TIMING_PID
enumerator ERR_FLAG_TIMING_MEAS_ADC
enumerator ERR_FLAG_AMON_VREF
enumerator ERR_FLAG_AMON_UC_TEMP
enumerator ERR_FLAG_STACK
enumerator ERR_FLAG_SAFETY_ADC
enumerator ERR_FLAG_SYSTICK
enumerator ERR_FLAG_WTCHDG_FIRED
enumerator ERR_FLAG_UNCAL
enumerator ERR_FLAG_DEBUG
enumerator ERR_FLAG_TIMING_MAIN_LOOP
enumerator ERR_FLAG_SAFETY_MEM_CORRUPT
enumerator ERR_FLAG_SAFETY_TAB_CORRUPT
enumerator ERR_FLAG_AMON_SUPPLY_VOLT
enumerator ERR_FLAG_OVERTEMP

The safety flags can be temporarily or permanent. Some temporary flags are reset automatically, once the error condition disappears. Others have to be explicitly cleared. The safety weights (if a flag stops the PID controller, or triggers the panic mode) are configured by default as described below. However, it will be possible to override these weights by setting config entries in the safety memory.

Todo

Change docu of config entires in memory


ERR_FLAG_MEAS_ADC_OVERFLOW

ERR_FLAG_MEAS_ADC_OVERFLOW is triggered in case of an overflow in the signal path of the measurement ADC. This should never happen unless there is a bug in the software.

persistent

self-clearing

Stops PID

Panic Mode

yes

no

yes

no


ERR_FLAG_MEAS_ADC_OFF

ERR_FLAG_MEAS_ADC_OFF signals that the measurement ADC for the PT1000 sensor is deactivated. This flag is automatically cleared by the firmware once the ADC is started.

persistent

self-clearing

Stops PID

Panic Mode

no

yes

yes

no


ERR_FLAG_MEAS_ADC_WATCHDOG

ERR_FLAG_MEAS_ADC_WATCHDOG is used as a wire break detection mechanism. This flag is set when the PT1000 measurement ADC detects an invalid resistance measurement.

See also

ADC Watchdog

persistent

self-clearing

Stops PID

Panic Mode

no

no

yes

no


ERR_FLAG_MEAS_ADC_UNSTABLE

ERR_FLAG_MEAS_ADC_UNSTABLE is set if the Moving Average Filter of the PT1000 ADC detects a bigger deviation between input and filtered output value. The flag is automatically cleared by the controller as soon as the unstable condition is not met anymore. For this, the filter input to filter output difference has to stay below a certain threshold for a defined amount of samples.

persistent

self-clearing

Stops PID

Panic Mode

no

yes

no

no

ERR_FLAG_SAFETY_MEM_CORRUPT

ERR_FLAG_SAFETY_MEM_CORRUPT is set during the initialization of the controller, in case a corrupted safety memory is encountered. In this case the error memory is reinitialized and the flag is set in the error memory. Afer a reboot it will stay asserted until the safety backup memory is cleared.

persistent

self-clearing

Stops PID

Panic Mode

yes

no

yes

no

ERR_FLAG_STACK

ERR_FLAG_STACK Shutdown of the controller, in case a corrupted safety memory is encountered. This error is not recoverable and will trigger the panic mode.

persistent

self-clearing

Stops PID

Panic Mode

yes

no

yes

yes

ERR_FLAG_TIMING_PID

ERR_FLAG_TIMING_PID is set if the timing monitor of the PID controller detects a violation in the sample frequency. The flag is recoverable and only shuts down the PID and therefore the oven control output.

See also

Timing Monitor

persistent

self-clearing

Stops PID

Panic Mode

no

no

yes

no

ERR_FLAG_OVERTEMP

ERR_FLAG_OVERTEMP is set if the PT1000 Temperature Value Processing detects an overtemperature. The default limit is set to:

SAFETY_DEFAULT_OVERTEMP_LIMIT_DEGC (260.0f)

Default Limit of the overtemperature detection in degrees celsius.

However, it is possible to configure the limit and permanenty store it in the EEPROM since hardware version v1.3.

persistent

self-clearing

Stops PID

Panic Mode

no

no

yes

no