This commit is contained in:
gab-k committed 2025-01-05 10:44:28 +00:00
1 parent 2deced79f2
commit 295d838bc5
11 files changed
+26 -7

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,10 +21,12 @@ In case you are ordering from JLCPCB it is recommended to use the `Fabrication-T
If you got a RP2040-Decoder with USB the easiest way to get the RP2040-Decoder up and running is to just use the precompiled .uf2 file in the latest `release <https://github.com/gab-k/RP2040-Decoder/releases>`_ and skip to :ref:`flashing_the_software`.
However sometimes you might want to build by yourself, be it for debugging or to make your own modifications to the source code.
The easiest way to do this is to just use `Visual Studio Code <https://code.visualstudio.com/>`_ and the Raspberry Pi Pico extension.
The easiest way to do this is to just use `Visual Studio Code <https://code.visualstudio.com/>`_ and the `Raspberry Pi Pico extension <https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico>`_.
The `official documentation <https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#vscode-extension>`_ of the Pi Pico does a great job of explaining this in detail.
Note: If you are building for Hardware Rev 0.3 or below change the board defintion in your CMakeLists.txt file to: "RP2040-Decoder-board-legacy.h"
.. note::
- Make sure to choose the correct board definition file in your CMakeLists.txt file for example ``RP2040-Decoder-board-Rev-1_0`` for Hardware Rev 1.0.
- In VSCode open the "Software" subdirectory for the extension to detect you project automatically.
.. _flashing_the_software:
+4 -2
View File
@@ -717,10 +717,10 @@
</li>
<li><a href="software/header_files.html#_CPPv4N12speed_step_t22SPEED_STEP_REVERSE_001E">speed_step_t::SPEED_STEP_REVERSE_001 (C++ enumerator)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="software/header_files.html#_CPPv4N12speed_step_t22SPEED_STEP_REVERSE_002E">speed_step_t::SPEED_STEP_REVERSE_002 (C++ enumerator)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="software/header_files.html#_CPPv4N12speed_step_t22SPEED_STEP_REVERSE_003E">speed_step_t::SPEED_STEP_REVERSE_003 (C++ enumerator)</a>
</li>
<li><a href="software/header_files.html#_CPPv4N12speed_step_t22SPEED_STEP_REVERSE_004E">speed_step_t::SPEED_STEP_REVERSE_004 (C++ enumerator)</a>
@@ -986,6 +986,8 @@
<li><a href="software/header_files.html#_CPPv4N20startup_parameters_t12base_pwm_arrE">startup_parameters_t::base_pwm_arr (C++ member)</a>
</li>
<li><a href="software/header_files.html#_CPPv4N20startup_parameters_t14base_pwm_arr_iE">startup_parameters_t::base_pwm_arr_i (C++ member)</a>
</li>
<li><a href="software/header_files.html#_CPPv4N20startup_parameters_t4k_ffE">startup_parameters_t::k_ff (C++ member)</a>
</li>
<li><a href="software/header_files.html#_CPPv4N20startup_parameters_t5levelE">startup_parameters_t::level (C++ member)</a>
</li>
+8 -2
View File
@@ -102,9 +102,15 @@ In case you are ordering from JLCPCB it is recommended to use the <a class="refe
<span id="id1"></span><h2>3. Building the software<a class="headerlink" href="#building-the-software" title="Link to this heading"></a></h2>
<p>If you got a RP2040-Decoder with USB the easiest way to get the RP2040-Decoder up and running is to just use the precompiled .uf2 file in the latest <a class="reference external" href="https://github.com/gab-k/RP2040-Decoder/releases">release</a> and skip to <a class="reference internal" href="#flashing-the-software"><span class="std std-ref">4. Flashing the software</span></a>.</p>
<p>However sometimes you might want to build by yourself, be it for debugging or to make your own modifications to the source code.
The easiest way to do this is to just use <a class="reference external" href="https://code.visualstudio.com/">Visual Studio Code</a> and the Raspberry Pi Pico extension.
The easiest way to do this is to just use <a class="reference external" href="https://code.visualstudio.com/">Visual Studio Code</a> and the <a class="reference external" href="https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico">Raspberry Pi Pico extension</a>.
The <a class="reference external" href="https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf#vscode-extension">official documentation</a> of the Pi Pico does a great job of explaining this in detail.</p>
<p>Note: If you are building for Hardware Rev 0.3 or below change the board defintion in your CMakeLists.txt file to: “RP2040-Decoder-board-legacy.h”</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>Make sure to choose the correct board definition file in your CMakeLists.txt file for example <code class="docutils literal notranslate"><span class="pre">RP2040-Decoder-board-Rev-1_0</span></code> for Hardware Rev 1.0.</p></li>
<li><p>In VSCode open the “Software” subdirectory for the extension to detect you project automatically.</p></li>
</ul>
</div>
</section>
<section id="flashing-the-software">
<span id="id2"></span><h2>4. Flashing the software<a class="headerlink" href="#flashing-the-software" title="Link to this heading"></a></h2>
+1
View File
@@ -184,6 +184,7 @@
<li class="toctree-l3"><a class="reference internal" href="software/header_files.html#_CPPv4N20startup_parameters_t5levelE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::level</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software/header_files.html#_CPPv4N20startup_parameters_t12base_pwm_arrE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::base_pwm_arr</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software/header_files.html#_CPPv4N20startup_parameters_t14base_pwm_arr_iE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::base_pwm_arr_i</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software/header_files.html#_CPPv4N20startup_parameters_t4k_ffE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::k_ff</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software/header_files.html#_CPPv4N16pid_parameters_t3k_iE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::k_i</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software/header_files.html#_CPPv4N16pid_parameters_t3k_dE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::k_d</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="software/header_files.html#_CPPv4N16pid_parameters_t1tE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::t</span></code></a></li>
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
Search.setIndex({"alltitles": {"1. Where to get the board?": [[0, "where-to-get-the-board"]], "2. Production files?": [[0, "production-files"]], "3. Building the software": [[0, "building-the-software"]], "4. Flashing the software": [[0, "flashing-the-software"]], "4.1. Flashing the software via .uf2 file": [[0, "flashing-the-software-via-uf2-file"]], "4.2. Flashing the software via SWD": [[0, "flashing-the-software-via-swd"]], "5. Wiring": [[0, "wiring"]], "6. Resolving issues": [[0, "resolving-issues"]], "Auxiliary Outputs": [[2, "auxiliary-outputs"], [3, "auxiliary-outputs"]], "Back-EMF voltage measurement": [[11, "back-emf-voltage-measurement"]], "CV List": [[5, "cv-list"]], "CV Reset:": [[8, "cv-reset"]], "CV.h": [[9, "cv-h"]], "CV_{116} to CV_{171} - PWM Slice configuration": [[5, "cv-116-to-cv-171-pwm-slice-configuration"]], "CV_{11} - Packet timeout": [[5, "cv-11-packet-timeout"]], "CV_{12} - Permitted operating modes": [[5, "cv-12-permitted-operating-modes"]], "CV_{17} & CV_{18} - 14-Bit extended/long address": [[5, "cv-17-cv-18-14-bit-extended-long-address"]], "CV_{1} - Basic address": [[5, "cv-1-basic-address"]], "CV_{29} - Decoder Configuration": [[5, "cv-29-decoder-configuration"]], "CV_{2} - v_{min}": [[5, "cv-2-v-min"]], "CV_{31} & CV_{32} - Extended CV pointer (Read-Only)": [[5, "cv-31-cv-32-extended-cv-pointer-read-only"]], "CV_{3} - Acceleration rate": [[5, "cv-3-acceleration-rate"]], "CV_{4} - Deceleration rate": [[5, "cv-4-deceleration-rate"]], "CV_{5} - v_{max}": [[5, "cv-5-v-max"]], "CV_{6} - v_{mid}": [[5, "cv-6-v-mid"]], "CV_{7} - Version No. (Read-Only)": [[5, "cv-7-version-no-read-only"]], "CV_{8} - Manufacturer (Read-Only)": [[5, "cv-8-manufacturer-read-only"]], "CV_{9} - Motor PWM Frequency": [[5, "cv-9-motor-pwm-frequency"]], "Check your motor:": [[8, "check-your-motor"]], "Checking the power supply:": [[8, "checking-the-power-supply"]], "Complete Schematic": [[2, "complete-schematic"], [3, "complete-schematic"]], "Configuration Variables (CV)": [[5, null]], "Contents:": [[4, null], [7, null], [10, null]], "Control Loop & Digital Controller": [[11, "control-loop-digital-controller"]], "DCC signal decoding": [[11, "dcc-signal-decoding"]], "Debugging and Logging": [[6, null]], "Debugging via SWD": [[6, "debugging-via-swd"]], "Electrical Characteristics": [[2, "electrical-characteristics"], [3, "electrical-characteristics"]], "Electrical Characteristics & Absolute Maximum Ratings": [[2, "id2"], [3, "id2"]], "Enable logging and or debug via SWD": [[8, "enable-logging-and-or-debug-via-swd"]], "Feed-forward": [[11, "id2"]], "GPIO": [[2, "gpio"], [3, "gpio"]], "Gain Scheduling": [[11, "gain-scheduling"]], "Getting started": [[0, null]], "Hardware": [[1, null]], "Input Stage": [[2, "input-stage"], [3, "input-stage"]], "Logging": [[6, "logging"]], "Microcontroller": [[2, "microcontroller"], [3, "microcontroller"]], "Motor Driver": [[2, "motor-driver"], [3, "motor-driver"]], "Other": [[7, null]], "Overview": [[2, null], [3, null], [11, "overview"]], "PID Controller": [[11, "pid-controller"]], "RP2040-Decoder Documentation": [[4, null]], "Reset all CVs": [[5, "reset-all-cvs"]], "Revision 0.3": [[1, "revision-0-3"]], "Revision 1.0": [[1, "revision-1-0"]], "Software": [[10, null]], "Software Description": [[11, null]], "Speed step configuration": [[5, "speed-step-configuration"]], "Startup Controller": [[11, "startup-controller"]], "Troubleshooting": [[8, null]], "Wiring the Decoder": [[2, "wiring-the-decoder"], [3, "wiring-the-decoder"]], "core0.h": [[9, null]], "core1.h": [[9, "core1-h"]], "shared.h": [[9, "shared-h"]]}, "docnames": ["gs/getting_started", "hardware/index", "hardware/rev_0_3/hw_description", "hardware/rev_1_0/hw_description", "index", "other/CV_list", "other/debug_logging", "other/index", "other/troubleshooting", "software/header_files", "software/index", "software/sw_description"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["gs/getting_started.rst", "hardware/index.rst", "hardware/rev_0_3/hw_description.rst", "hardware/rev_1_0/hw_description.rst", "index.rst", "other/CV_list.rst", "other/debug_logging.rst", "other/index.rst", "other/troubleshooting.rst", "software/header_files.rst", "software/index.rst", "software/sw_description.rst"], "indexentries": {"_125m (c macro)": [[9, "c._125M", false]], "absolute_val (c++ function)": [[9, "_CPPv412absolute_vali", false]], "acknowledge (c++ function)": [[9, "_CPPv411acknowledgev", false]], "adc_calibration_iterations (c macro)": [[9, "c.ADC_CALIBRATION_ITERATIONS", false]], "adc_offset_adjustment (c++ function)": [[9, "_CPPv421adc_offset_adjustment8uint32_t", false]], "address_evaluation (c++ function)": [[9, "_CPPv418address_evaluation6size_tA_K7uint8_t", false]Line truncated
Search.setIndex({"alltitles": {"1. Where to get the board?": [[0, "where-to-get-the-board"]], "2. Production files?": [[0, "production-files"]], "3. Building the software": [[0, "building-the-software"]], "4. Flashing the software": [[0, "flashing-the-software"]], "4.1. Flashing the software via .uf2 file": [[0, "flashing-the-software-via-uf2-file"]], "4.2. Flashing the software via SWD": [[0, "flashing-the-software-via-swd"]], "5. Wiring": [[0, "wiring"]], "6. Resolving issues": [[0, "resolving-issues"]], "Auxiliary Outputs": [[2, "auxiliary-outputs"], [3, "auxiliary-outputs"]], "Back-EMF voltage measurement": [[11, "back-emf-voltage-measurement"]], "CV List": [[5, "cv-list"]], "CV Reset:": [[8, "cv-reset"]], "CV.h": [[9, "cv-h"]], "CV_{116} to CV_{171} - PWM Slice configuration": [[5, "cv-116-to-cv-171-pwm-slice-configuration"]], "CV_{11} - Packet timeout": [[5, "cv-11-packet-timeout"]], "CV_{12} - Permitted operating modes": [[5, "cv-12-permitted-operating-modes"]], "CV_{17} & CV_{18} - 14-Bit extended/long address": [[5, "cv-17-cv-18-14-bit-extended-long-address"]], "CV_{1} - Basic address": [[5, "cv-1-basic-address"]], "CV_{29} - Decoder Configuration": [[5, "cv-29-decoder-configuration"]], "CV_{2} - v_{min}": [[5, "cv-2-v-min"]], "CV_{31} & CV_{32} - Extended CV pointer (Read-Only)": [[5, "cv-31-cv-32-extended-cv-pointer-read-only"]], "CV_{3} - Acceleration rate": [[5, "cv-3-acceleration-rate"]], "CV_{4} - Deceleration rate": [[5, "cv-4-deceleration-rate"]], "CV_{5} - v_{max}": [[5, "cv-5-v-max"]], "CV_{6} - v_{mid}": [[5, "cv-6-v-mid"]], "CV_{7} - Version No. (Read-Only)": [[5, "cv-7-version-no-read-only"]], "CV_{8} - Manufacturer (Read-Only)": [[5, "cv-8-manufacturer-read-only"]], "CV_{9} - Motor PWM Frequency": [[5, "cv-9-motor-pwm-frequency"]], "Check your motor:": [[8, "check-your-motor"]], "Checking the power supply:": [[8, "checking-the-power-supply"]], "Complete Schematic": [[2, "complete-schematic"], [3, "complete-schematic"]], "Configuration Variables (CV)": [[5, null]], "Contents:": [[4, null], [7, null], [10, null]], "Control Loop & Digital Controller": [[11, "control-loop-digital-controller"]], "DCC signal decoding": [[11, "dcc-signal-decoding"]], "Debugging and Logging": [[6, null]], "Debugging via SWD": [[6, "debugging-via-swd"]], "Electrical Characteristics": [[2, "electrical-characteristics"], [3, "electrical-characteristics"]], "Electrical Characteristics & Absolute Maximum Ratings": [[2, "id2"], [3, "id2"]], "Enable logging and or debug via SWD": [[8, "enable-logging-and-or-debug-via-swd"]], "Feed-forward": [[11, "id2"]], "GPIO": [[2, "gpio"], [3, "gpio"]], "Gain Scheduling": [[11, "gain-scheduling"]], "Getting started": [[0, null]], "Hardware": [[1, null]], "Input Stage": [[2, "input-stage"], [3, "input-stage"]], "Logging": [[6, "logging"]], "Microcontroller": [[2, "microcontroller"], [3, "microcontroller"]], "Motor Driver": [[2, "motor-driver"], [3, "motor-driver"]], "Other": [[7, null]], "Overview": [[2, null], [3, null], [11, "overview"]], "PID Controller": [[11, "pid-controller"]], "RP2040-Decoder Documentation": [[4, null]], "Reset all CVs": [[5, "reset-all-cvs"]], "Revision 0.3": [[1, "revision-0-3"]], "Revision 1.0": [[1, "revision-1-0"]], "Software": [[10, null]], "Software Description": [[11, null]], "Speed step configuration": [[5, "speed-step-configuration"]], "Startup Controller": [[11, "startup-controller"]], "Troubleshooting": [[8, null]], "Wiring the Decoder": [[2, "wiring-the-decoder"], [3, "wiring-the-decoder"]], "core0.h": [[9, null]], "core1.h": [[9, "core1-h"]], "shared.h": [[9, "shared-h"]]}, "docnames": ["gs/getting_started", "hardware/index", "hardware/rev_0_3/hw_description", "hardware/rev_1_0/hw_description", "index", "other/CV_list", "other/debug_logging", "other/index", "other/troubleshooting", "software/header_files", "software/index", "software/sw_description"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["gs/getting_started.rst", "hardware/index.rst", "hardware/rev_0_3/hw_description.rst", "hardware/rev_1_0/hw_description.rst", "index.rst", "other/CV_list.rst", "other/debug_logging.rst", "other/index.rst", "other/troubleshooting.rst", "software/header_files.rst", "software/index.rst", "software/sw_description.rst"], "indexentries": {"_125m (c macro)": [[9, "c._125M", false]], "absolute_val (c++ function)": [[9, "_CPPv412absolute_vali", false]], "acknowledge (c++ function)": [[9, "_CPPv411acknowledgev", false]], "adc_calibration_iterations (c macro)": [[9, "c.ADC_CALIBRATION_ITERATIONS", false]], "adc_offset_adjustment (c++ function)": [[9, "_CPPv421adc_offset_adjustment8uint32_t", false]], "address_evaluation (c++ function)": [[9, "_CPPv418address_evaluation6size_tA_K7uint8_t", false]Line truncated
+7
View File
@@ -110,6 +110,7 @@
<li class="toctree-l3"><a class="reference internal" href="#_CPPv4N20startup_parameters_t5levelE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::level</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#_CPPv4N20startup_parameters_t12base_pwm_arrE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::base_pwm_arr</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#_CPPv4N20startup_parameters_t14base_pwm_arr_iE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::base_pwm_arr_i</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#_CPPv4N20startup_parameters_t4k_ffE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::k_ff</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#_CPPv4N16pid_parameters_t3k_iE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::k_i</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#_CPPv4N16pid_parameters_t3k_dE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::k_d</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#_CPPv4N16pid_parameters_t1tE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::t</span></code></a></li>
@@ -1257,6 +1258,12 @@ CV.h for reference) </p>
<dd><p>base pwm ring buffer array index </p>
</dd></dl>
<dl class="cpp var">
<dt class="sig sig-object cpp" id="_CPPv4N20startup_parameters_t4k_ffE">
<span id="_CPPv3N20startup_parameters_t4k_ffE"></span><span id="_CPPv2N20startup_parameters_t4k_ffE"></span><span id="startup_parameters_t::k_ff__float"></span><span class="target" id="structstartup__parameters__t_1a908b17315a231c923b75801c47b4a440"></span><span class="kt"><span class="pre">float</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">k_ff</span></span></span><a class="headerlink" href="#_CPPv4N20startup_parameters_t4k_ffE" title="Link to this definition"></a><br /></dt>
<dd><p>Feed forward factor </p>
</dd></dl>
</div>
</dd></dl>
+1
View File
@@ -160,6 +160,7 @@
<li class="toctree-l2"><a class="reference internal" href="header_files.html#_CPPv4N20startup_parameters_t5levelE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::level</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="header_files.html#_CPPv4N20startup_parameters_t12base_pwm_arrE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::base_pwm_arr</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="header_files.html#_CPPv4N20startup_parameters_t14base_pwm_arr_iE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::base_pwm_arr_i</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="header_files.html#_CPPv4N20startup_parameters_t4k_ffE"><code class="docutils literal notranslate"><span class="pre">startup_parameters_t::k_ff</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="header_files.html#_CPPv4N16pid_parameters_t3k_iE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::k_i</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="header_files.html#_CPPv4N16pid_parameters_t3k_dE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::k_d</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="header_files.html#_CPPv4N16pid_parameters_t1tE"><code class="docutils literal notranslate"><span class="pre">pid_parameters_t::t</span></code></a></li>