This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 418c80c63379f2879c4dfdd2139e6b02e0fae36a
Author: raiden00pl <[email protected]>
AuthorDate: Sun Jul 5 09:55:33 2026 +0200

    Documentation: update Lely CANopen doc
    
    update Lely CANopen doc
    
    Signed-off-by: raiden00pl <[email protected]>
---
 .../applications/canutils/lely-canopen/index.rst   | 43 +++++++++++++++++++++
 .../applications/examples/lely_master/index.rst    | 44 ++++++++++++++++++++++
 .../applications/examples/lely_slave/index.rst     | 39 +++++++++++++++++++
 3 files changed, 126 insertions(+)

diff --git a/Documentation/applications/canutils/lely-canopen/index.rst 
b/Documentation/applications/canutils/lely-canopen/index.rst
index a15bbc43b2e..5f358682186 100644
--- a/Documentation/applications/canutils/lely-canopen/index.rst
+++ b/Documentation/applications/canutils/lely-canopen/index.rst
@@ -1,3 +1,46 @@
 =====================================
 ``lely-canopen`` Lely CANopen support
 =====================================
+
+`Lely CANopen <https://gitlab.com/lely_industries/lely-core>`_ is an
+open-source CANopen (CiA 301/302/305/315) protocol stack.
+
+The port configuration (``LELY_NO_*`` feature switches) is generated
+from Kconfig in ``apps/include/canutils/lely/config.h``.
+
+Feature selection
+=================
+
+``CONFIG_CANUTILS_LELYCANOPEN`` enables the build. The individual CANopen
+services are selected with the ``CONFIG_CANUTILS_LELYCANOPEN_*`` options,
+including:
+
+- ``SDEV`` – static device description support (selects ``OBJNAME``)
+- ``MASTER`` – NMT master support
+- ``EMCY`` – emergency (EMCY) objects
+- ``CSDO`` / ``SSDO`` – client / server SDO
+- ``RPDO`` / ``TPDO`` / ``MPDO`` – process data objects
+- ``SYNC`` / ``TIME`` – SYNC and TIME producers/consumers
+- ``LSS`` – layer setting services
+- ``NG`` / ``NMTBOOT`` / ``NMTCFG`` – node guarding and master boot/config
+- ``OBJDEFAULT`` / ``OBJLIMITS`` / ``OBJNAME`` / ``OBJUPLOAD`` /
+  ``OBJFILE`` – object dictionary features
+
+Tools
+=====
+
+``CONFIG_CANUTILS_LELYCANOPEN_TOOLS_COCTL`` builds ``coctl``, the Lely
+CANopen control tool (an interactive ASCII gateway). It requires SocketCAN
+(``NET_CAN``).
+
+Examples
+========
+
+Two ready-to-run demos built on this library are provided:
+
+- :doc:`/applications/examples/lely_slave/index` – a CANopen slave node
+- :doc:`/applications/examples/lely_master/index` – a CANopen master node
+
+Both can run on the simulator over the CAN character driver. See
+:ref:`testing_lely_canopen_sim` for how to set up a virtual CAN network and
+observe the traffic.
diff --git a/Documentation/applications/examples/lely_master/index.rst 
b/Documentation/applications/examples/lely_master/index.rst
new file mode 100644
index 00000000000..1f16969be77
--- /dev/null
+++ b/Documentation/applications/examples/lely_master/index.rst
@@ -0,0 +1,44 @@
+===========================================
+``lely_master`` Lely CANopen master example
+===========================================
+
+A minimal CANopen **master** node built on the `Lely CANopen
+<https://gitlab.com/lely_industries/lely-core>`_ stack (see
+:doc:`/applications/canutils/lely-canopen/index`).
+
+The node is described by a static device description
+(``sdev_master.c``, node-ID ``0x01``) and talks to the CAN bus through the
+NuttX **CAN character driver** (``/dev/can0``) by default, or through
+SocketCAN when the ``CONFIG_EXAMPLES_LELYMASTER_SOCKET`` backend is selected.
+
+It registers the ``comaster`` NSH built-in command.
+
+Once the slave has booted, the master drives a small CANopen network:
+
+#. reads the slave's device type (object ``0x1000``) with a Client-SDO
+   upload;
+#. commands the slave to OPERATIONAL with an NMT start;
+#. produces SYNC (object ``0x1005``/``0x1006``) and receives the slave's
+   synchronous TPDO through an RPDO (object ``0x1400``/``0x1600``), printing
+   the streamed counter that lands in object ``0x2100``.
+
+Configuration
+=============
+
+``CONFIG_EXAMPLES_LELYMASTER``
+  Enable the example. Requires ``CANUTILS_LELYCANOPEN`` with ``SDEV``,
+  ``TIME``, ``OBJUPLOAD`` and ``MASTER`` support (the master services also
+  pull in ``EMCY``, ``CSDO``, ``RPDO``, ``TPDO`` and ``SYNC``).
+
+``CONFIG_EXAMPLES_LELYMASTER_CHARDEV`` / ``CONFIG_EXAMPLES_LELYMASTER_SOCKET``
+  CAN backend selection (character driver or SocketCAN).
+
+``CONFIG_EXAMPLES_LELYMASTER_DEVPATH``
+  CAN character device path (default ``/dev/can0``).
+
+``CONFIG_EXAMPLES_LELYMASTER_INTF``
+  SocketCAN interface name (default ``can0``).
+
+The ready-made ``sim:lely`` configuration builds this example together with
+the :doc:`/applications/examples/lely_slave/index` demo for the simulator
+with the CAN character driver enabled.
diff --git a/Documentation/applications/examples/lely_slave/index.rst 
b/Documentation/applications/examples/lely_slave/index.rst
new file mode 100644
index 00000000000..e8d7b31db0e
--- /dev/null
+++ b/Documentation/applications/examples/lely_slave/index.rst
@@ -0,0 +1,39 @@
+=========================================
+``lely_slave`` Lely CANopen slave example
+=========================================
+
+A minimal CANopen **slave** node built on the `Lely CANopen
+<https://gitlab.com/lely_industries/lely-core>`_ stack (see
+:doc:`/applications/canutils/lely-canopen/index`).
+
+The node is described by a static device description
+(``sdev_slave.c``, node-ID ``0x02``) and talks to the CAN bus through the
+NuttX **CAN character driver** (``/dev/can0``) by default, or through
+SocketCAN when the ``CONFIG_EXAMPLES_LELYSLAVE_SOCKET`` backend is selected.
+
+It registers the ``coslave`` NSH built-in command.
+
+The slave answers the master's Client-SDO requests through its default
+Server-SDO and, once the master has brought it to OPERATIONAL, streams an
+incrementing counter (object ``0x2100``) in a synchronous TPDO (object
+``0x1800``/``0x1a00``) on every SYNC.
+
+Configuration
+=============
+
+``CONFIG_EXAMPLES_LELYSLAVE``
+  Enable the example. Requires ``CANUTILS_LELYCANOPEN`` with ``SDEV``,
+  ``TIME`` and ``OBJUPLOAD`` support.
+
+``CONFIG_EXAMPLES_LELYSLAVE_CHARDEV`` / ``CONFIG_EXAMPLES_LELYSLAVE_SOCKET``
+  CAN backend selection (character driver or SocketCAN).
+
+``CONFIG_EXAMPLES_LELYSLAVE_DEVPATH``
+  CAN character device path (default ``/dev/can0``).
+
+``CONFIG_EXAMPLES_LELYSLAVE_INTF``
+  SocketCAN interface name (default ``can0``).
+
+The ready-made ``sim:lely`` configuration builds this example together with
+the :doc:`/applications/examples/lely_master/index` demo for the simulator
+with the CAN character driver enabled.

Reply via email to