Skip to content

Commit

Permalink
fix quotations
Browse files Browse the repository at this point in the history
  • Loading branch information
yconst committed Oct 29, 2023
1 parent d3c9289 commit 5cc2c1f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions docs/develop/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This document provides a guide for setting up a development environment for deve
Hardware Connections
####################

For proper debugging capabilities you will need a Segger J-Link adapter. Unfortunately original J-Link adapters are quite expensive. A more affordable option is the J-Link EDU adapter at around $60 or the J-Link EDU mini adapter at around $20. In addition, there are J-Link clones that can be purchased for very low prices on ebay or Aliexpress. However, reliability of these clones is not guaranteed.
For proper debugging capabilities you will need a Segger J-Link adapter. Unfortunately original J-Link adapters are quite expensive. A more affordable option is the J-Link EDU adapter at around $60 or the J-Link EDU mini adapter at around $20. In addition, there are J-Link clones that can be purchased for very low prices on ebay or Aliexpress. However, reliability of these clones is not guaranteed, and we do not provide support when using these clones.

With the board and J-Link adapter powered off, connect the J-Link to Tinymovr as shown below:

Expand Down Expand Up @@ -42,7 +42,7 @@ Connection with SWD adapter (e.g. isolator) for R5:

(diagrams made with `Wireviz <https://github.com/formatc1702/WireViz>`_)

As of Tinymovr 1.0.1, it is no longer necessary to patch the `JLinkDevices.xml` file with the PAC additions, in order for JLinkGDBServer to work properly. Relevant files are included in the repo.
As of Tinymovr 1.0.1, it is no longer necessary to patch the ``JLinkDevices.xml`` file with the PAC additions, in order for JLinkGDBServer to work properly. Relevant files are included in the repo.


.. _develop-preparation:
Expand All @@ -64,7 +64,7 @@ The file comes in a zipped installer exe (!), which all it does is extract the c
cp -r <pac55xx_sdk_location> <tinymovr_location>/firmware/pac55xx_sdk/
In any case, the target directory should be named `pac55xx_sdk`. The above copy command ensures this.
In any case, the target directory should be named ``pac55xx_sdk``. The above copy command ensures this.

Now you have the required PAC SDK almost ready. There is a small patch that you will need to apply in the pac55xx_sdk directory. It is suggested to use the `Python patch package <https://pypi.org/project/patch/>`_, which is cross-platform. If you do not have the package, install using pip:

Expand Down Expand Up @@ -100,7 +100,7 @@ We take great pride in creating this in-house, cross-platform development soluti
Configuring
***********

You'll need to configure the path to the JLink debug server in `.vscode/launch.json`. The configuration blocks look like this:
You'll need to configure the path to the JLink debug server in ``.vscode/launch.json``. The configuration blocks look like this:

.. code-block:: javascript
Expand Down Expand Up @@ -135,7 +135,7 @@ Select the board revision against which you are compiling from the list. The bui
More about Hardware Revisions
-----------------------------

Tinymovr passes the `BOARD_REV_XX` argument regarding the board revision to the compiler. This is used in the firmware to configure the hardware accordingly. Invoking a make command with the REV argument is as follows:
Tinymovr passes the ``BOARD_REV_XX`` argument regarding the board revision to the compiler. This is used in the firmware to configure the hardware accordingly. Invoking a make command with the REV argument is as follows:

.. code-block:: console
Expand All @@ -157,7 +157,7 @@ Flashing and Debugging

Before debugging, make sure the J-Link drivers and software is installed. The drivers and software, together with instructions, can be found in the `Qorvo website <https://www.qorvo.com/products/p/PAC5527#evaluation-tools>`_, under the download 'Segger J-Link Support'. This download includes a nacessary patch to enable J-Link to work with Qorvo devices. Instructions on how to apply the patch are included in the download.

The Tinymovr repo includes all VSCode settings configured, except for the JLink `serverpath` variable in `launch.json`, which you'll need to update to reflect your system. Note that there are multiple instances in the file, you'll need to update all of them.
The Tinymovr repo includes all VSCode settings configured, except for the JLink ``serverpath`` variable in ``launch.json``, which you'll need to update to reflect your system. Note that there are multiple instances in the file, you'll need to update all of them.

We offer various VSCode launch configurations to suit different development and debugging tasks, including remote Tinymovr flashing debugging using a remote JLink server. These are are briefly outlined below.

Expand Down Expand Up @@ -216,7 +216,7 @@ Eclipse is no longer supported. Consider :ref:`develop-setting-up-vscode` instea
Setup Studio for Development
############################

Tinymovr Studio is a Python application and as such can be easily set up to facilitate development. The approach is to use `pip` to install Tinymovr in develop mode, from a local copy of the (`git repo <https://github.com/tinymovr/Tinymovr>`_). This allows any changes you make to the local code to be immediately available when you run the executable (`tinymovr`, `tinymovr_cli`, or `tinymovr_dfu`).
Tinymovr Studio is a Python application and as such can be easily set up to facilitate development. The approach is to use ``pip`` to install Tinymovr in develop mode, from a local copy of the (``git repo <https://github.com/tinymovr/Tinymovr>``_). This allows any changes you make to the local code to be immediately available when you run the executable (``tinymovr``, ``tinymovr_cli``, or ``tinymovr_dfu``).

.. note::
We recommend installing Tinymovr in a virtual environment. `Here is a quick tutorial on how to setup a virtual environment using Conda <https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#managing-environments>`_.
Expand All @@ -234,7 +234,7 @@ or to enable GUI support:
pip3 install -e .[GUI]
This will install the Tinymovr Studio in develop mode. Now, `tinymovr`, `tinymovr_cli` and `tinymovr_dfu` will use the local Tinymovr Studio code.
This will install the Tinymovr Studio in develop mode. Now, ``tinymovr``, ``tinymovr_cl`i`` and ``tinymovr_dfu`` will use the local Tinymovr Studio code.

Happy coding!

Expand Down
22 changes: 11 additions & 11 deletions docs/features/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Before using the planner, the desired acceleration, deceleration and max velocit
tm1.traj_planner.max_decel = {max_deceleration} # ticks/sec^2
tm1.traj_planner.max_vel = {mac_velocity} # ticks/sec
Once you set the desired acceleration and deceleration parameters, they do not need to be re-set. The parameters can be saved in NVRAM using `tmx.save_config()`.
Once you set the desired acceleration and deceleration parameters, they do not need to be re-set. The parameters can be saved in NVRAM using ``tmx.save_config()``.

Once the parameters are set, you can execute a plan to a target position:

Expand Down Expand Up @@ -70,7 +70,7 @@ Now the time-limited trajectory is executed as follows:
Multi-axis Synchronization
********************************************

Time-limited trajectories are useful for synchronizing the acceleration, cruise and deceleration phases for multiple axes. For instance, to synchronize three axes with different setpoints, you would configure the same `t_acc`, `t_cruise`, `t_dec` values. This guarantees that the trajectory phases are synchronized. Then you would issue the `move_to_tlimit` commands to each of the three different controllers in sequence:
Time-limited trajectories are useful for synchronizing the acceleration, cruise and deceleration phases for multiple axes. For instance, to synchronize three axes with different setpoints, you would configure the same ``t_acc``, ``t_cruise``, ``t_dec`` values. This guarantees that the trajectory phases are synchronized. Then you would issue the ``move_to_tlimit`` commands to each of the three different controllers in sequence:

.. code-block:: python
Expand All @@ -95,14 +95,14 @@ Because the homing planner relies on mechanical resistance of the structure, it

There are six parameters in total that control the homing behavior:

* `tmx.homing.velocity`: The velocity at which the motor performs homing
* `tmx.homing.max_homing_t`: The maximum time the motor is allowed to travel before aborting homing
* `tmx.homing.retract_dist`: The retraction distance the motor travels after the endstop has been found
* `tmx.homing.stall_detect.velocity`: The velocity below which (and together with `stall_detect.delta_pos`) stall detection mode is triggered
* `tmx.homing.stall_detect.delta_pos`: The position error above which (and together with `stall_detect.velocity`) stall detection mode is triggered
* `tmx.homing.stall_detect.t`: The time to remain in stall detection mode before the motor is considered stalled
* ``tmx.homing.velocity``: The velocity at which the motor performs homing
* ``tmx.homing.max_homing_t``: The maximum time the motor is allowed to travel before aborting homing
* ``tmx.homing.retract_dist``: The retraction distance the motor travels after the endstop has been found
* ``tmx.homing.stall_detect.velocity``: The velocity below which (and together with ``stall_detect.delta_pos``) stall detection mode is triggered
* ``tmx.homing.stall_detect.delta_pos``: The position error above which (and together with ``stall_detect.velocity``) stall detection mode is triggered
* ``tmx.homing.stall_detect.t``: The time to remain in stall detection mode before the motor is considered stalled

In addition to the above, the phase current while the motor is stopped, until `stall_detect.t` time passes is the maximum allowed phase current, as defined in `tmx.controller.current.Iq_limit`. It is advisable to set this value so that mechanical damage or fatigue is avoided.
In addition to the above, the phase current while the motor is stopped, until ``stall_detect.t`` time passes is the maximum allowed phase current, as defined in ``tmx.controller.current.Iq_limit``. It is advisable to set this value so that mechanical damage or fatigue is avoided.

Operation
*********
Expand All @@ -125,7 +125,7 @@ FOC decouples the torque-producing and magnetizing currents by aligning the stat

Two parameters control flux braking:

1. `tmx.controller.current.max_Ibus_regen`: The maximum current (in amperes) allowed to be fed back to the power source before flux braking activates. By adjusting this value, you can control the regenerative braking threshold and determine when flux braking should take effect.
1. ``tmx.controller.current.max_Ibus_regen``: The maximum current (in amperes) allowed to be fed back to the power source before flux braking activates. By adjusting this value, you can control the regenerative braking threshold and determine when flux braking should take effect.

2. `tmx.controller.current.max_Ibrake`: The maximum current (in amperes) allowed to be dumped to the motor windings during flux braking. By setting this value to zero, you can deactivate flux braking. Adjusting this parameter allows you to manage the braking torque and the heat generated during the braking process.
2. ``tmx.controller.current.max_Ibrake``: The maximum current (in amperes) allowed to be dumped to the motor windings during flux braking. By setting this value to zero, you can deactivate flux braking. Adjusting this parameter allows you to manage the braking torque and the heat generated during the braking process.

0 comments on commit 5cc2c1f

Please sign in to comment.