.. _command_line:

Command Line Interface
======================

This section describes the command line interface located on the UART interface.
The command line interface is implemented using a "shellmatta" shell module <https://git.shimatta.net/shimatta/shellmatta>

Hardware Settings
-----------------

General Settings
~~~~~~~~~~~~~~~~

The UART is configured for the following settings:

- 115200 Baud
- 1 Stopbit
- No parity
- 8 data bits


Setup in Debug Build
~~~~~~~~~~~~~~~~~~~~

If the Reflow controller is build in **debug** mode, the UART is located on the internal spring contact connector, which is also used for the SWD interface.

Setup in Release Build
~~~~~~~~~~~~~~~~~~~~~~

In case of a **release** build, the UART is externally accessible on the DIGIO Header. The voltage level is 3.3 Volt LVCMOS. The inputs are ESD protected. Overvoltage is interally clamped and may dammage the clamping diodes!

- DIGIO2: Reflow Controller's TX
- DIGIO3: Reflow Controller's RX


Shell Commands
--------------

The following shell commands are available.

- `safety-flags <safety-flags_>`_ (alias: flags)
- `calibrate`_ (alias: cal)

safety-flags
~~~~~~~~~~~~

The ``safety-flags`` (``flags``) command displays the status of all safety flags and analog monitors. See: :ref:`safety_flags`


.. _shell_command_calibrate:

calibrate
~~~~~~~~~

The ``calibrate`` (``cal``) command is used to calibrate the :ref:`hw_analog_fe`, in order to ensure correct resistance measurement.
Calibration is most likely not necessary! See the :ref:`usage_calibration` page.

The command will guide you through the calibration process and will ask for two reference resistors with ``1000 Ohm`` and ``2000 Ohm`` values.
Calibration can be aborted using ``CTRL + C``.
