Write documentation
This commit is contained in:
@@ -3,6 +3,21 @@
|
||||
Safety Flags
|
||||
============
|
||||
|
||||
The safety flags are represented in software by the following enums
|
||||
|
||||
.. doxygenenum:: safety_flag
|
||||
|
||||
|
||||
.. _safety_flags_adc_overflow:
|
||||
|
||||
ERR_FLAG_MEAS_ADC_OVERFLOW
|
||||
--------------------------
|
||||
|
||||
.. _safety_flags_adc_off:
|
||||
|
||||
ERR_FLAG_MEAS_ADC_OFF
|
||||
---------------------
|
||||
|
||||
.. _safety_flags_adc_watchdog:
|
||||
|
||||
ERR_FLAG_MEAS_ADC_WATCHDOG
|
||||
|
@@ -18,6 +18,7 @@ The following block diagram shows the processing chain of the temperature signal
|
||||
blockdiag {
|
||||
orientation = portrait;
|
||||
|
||||
FRONTEND[description=":ref:`hw_analog_fe`", label="Frontend"];
|
||||
ADC[description="`Analog to Digital Converter <ADC_>`_"];
|
||||
WATCHDOG [label = "WDT", shape=endpoint, description="`Hardware Value Watchdog <Watchdog_>`_"];
|
||||
PREFILTER [label=Prefilter, description="`Prefiltering and Downsampling <Prefilter_>`_"];
|
||||
@@ -27,7 +28,7 @@ The following block diagram shows the processing chain of the temperature signal
|
||||
PT1000 [label = "LF", shape = endpoint, description="Low Frequency PT1000 resistance value (see: `MAVG Filter <Exponential Moving Average Filter_>`_)"]
|
||||
RAW_STREAM [label = "Stream", shape = endpoint, description="Raw value streaming"];
|
||||
|
||||
ADC -> WATCHDOG;
|
||||
FRONTEND -> ADC -> WATCHDOG;
|
||||
ADC -> PREFILTER [label="1 kHz"];
|
||||
PREFILTER -> ADC2RES [label="1/6 kHz"];
|
||||
ADC2RES -> MAVG;
|
||||
@@ -53,10 +54,12 @@ whereas the ADC Peripheral module is defined by
|
||||
Prefilter
|
||||
~~~~~~~~~
|
||||
|
||||
The analog value prefilter is used to filter outliers. It is triggered after a certain amount *n* of values have been sampled by the `ADC`_.
|
||||
The filter then removes the two most extreme values and computes the average of the remaining *n-2* values.
|
||||
The analog value prefilter is used to filter outliers. It is triggered after a certain amount ``n`` of values have been sampled by the `ADC`_.
|
||||
The filter then removes the two most extreme values and computes the average of the remaining ``n - 2`` values. By default ``n`` is configured to:
|
||||
|
||||
The resulting datastream has a sampling rate of 1/6 kHz.
|
||||
.. doxygendefine:: ADC_PT1000_DMA_AVG_SAMPLES
|
||||
|
||||
Therefore, by default, the resulting datastream has a sampling rate of 1/6 kHz. This depends on the :c:macro:`ADC_PT1000_SAMPLE_CNT_DELAY` and ``n``
|
||||
|
||||
|
||||
Watchdog
|
||||
@@ -125,9 +128,7 @@ and
|
||||
.. doxygenfunction:: adc_pt1000_get_resistance_calibration
|
||||
:outline:
|
||||
|
||||
are used to set the reistance calibration internally. For a guide on how to calibrate the deivce, see the usage page.
|
||||
|
||||
.. todo:: Add link here
|
||||
are used to set the reistance calibration internally. For a guide on how to calibrate the deivce, see the corresponding :ref:`usage_calibration` usage page.
|
||||
|
||||
The calibration is calculated the following way:
|
||||
|
||||
@@ -187,5 +188,5 @@ By default, the valid range is:
|
||||
.. doxygenfunction:: temp_converter_convert_resistance_to_temp
|
||||
|
||||
The cvonversion function is based on a lookup table with linear interpolation between the data points.
|
||||
The lookuptable is stored as a header file and can, if necessary, be recreated using the `create-temp-lookup-table.py` script.
|
||||
The lookuptable is stored as a header file and can, if necessary, be recreated using the ``create-temp-lookup-table.py`` script.
|
||||
|
||||
|
Reference in New Issue
Block a user