Skip to content

Commit 8dcab98

Browse files
committed
Update docs
1 parent bee7477 commit 8dcab98

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

.readthedocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ build:
1414
sphinx:
1515
configuration: docs/conf.py
1616

17+
# Optionally build your docs in additional formats such as PDF and ePub
18+
formats:
19+
- pdf
1720
# Optionally, but recommended,
1821
# declare the Python requirements required to build your documentation
1922
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html

docs/tutorial.rst

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,25 @@ Arduino quick start
1919
-------------------
2020
The repository contains ready-to-use sketches:
2121
- ``tools/arduino/hello_xcp``: minimal “hello” XCP slave
22-
- ``tools/arduino/predefined_daq/predefined_daq.ino``: shows predefined DAQ lists
22+
- ``tools/arduino/predefined_daq/predefined_daq.ino``: shows how-to use predefined DAQ lists
2323

2424
Prerequisites
2525
^^^^^^^^^^^^^
2626
- Arduino IDE or Arduino CLI installed
2727
- For Ethernet: an Ethernet-capable board/shield (e.g., W5100/W5500) or WiFi board (ESP32)
28-
- For CAN: a CAN shield (MKR Zero CAN Shield, Seeed Studio CAN Shield, and SparkFun CAN Shield are currently supported).
28+
- For CAN: a CAN shield (MKR Zero CAN, Seeed Studio CAN, and SparkFun CAN currently supported).
2929
- Serial SXI over the board’s UART (recommended starting point).
3030

3131

3232
1) Choose a transport
3333
^^^^^^^^^^^^^^^^^^^^^
34-
Open the sketch folder (e.g., ``tools/arduino/hello_xcp``) and edit its ``xcp_config.h``.
35-
Pick exactly one transport and fill the minimal settings.
34+
Open the sketch folder (e.g., ``tools/arduino/hello_xcp``) and edit its ``xcp_config.h``,
35+
un-comment the transport you want to use:
36+
- `#define TP_SXI` for Serial SXI.
37+
- `#define TP_CAN` for CAN bus.
38+
- `#define TP_ETHER` for Ethernet.
39+
40+
Now fill the minimal settings:
3641

3742
Ethernet (UDP)
3843
""""""""""""
@@ -83,9 +88,9 @@ CAN (Classic or FD)
8388
// Optional broadcast ID
8489
// #define XCP_ON_CAN_BROADCAST_IDENTIFIER (0x222)
8590
86-
- Choose your shield with :c:macro:`XCP_CAN_INTERFACE` and, if applicable, the MCP25xx pins.
91+
- Choose your shield with :c:macro:`XCP_CAN_INTERFACE` (one of `XCP_CAN_IF_SEED_STUDIO_CAN_SHIELD`, `XCP_CAN_IF_SEED_STUDIO_CAN_FD_SHIELD`, `XCP_CAN_IF_MKR_ZERO_CAN_SHIELD`, `XCP_CAN_IF_SPARKFUN_CAN_SHIELD`) and, if applicable, the MCP25xx pins.
8792
- Classic CAN forces :c:macro:`XCP_MAX_CTO`/``XCP_MAX_DTO`` to 8. With CAN FD, 8..64 is allowed (see :doc:`options`).
88-
- Optionally require full DLC via :c:macro:`XCP_ON_CAN_MAX_DLC_REQUIRED`.
93+
- Optionally require max. DLC (i.e. padding) via :c:macro:`XCP_ON_CAN_MAX_DLC_REQUIRED`.
8994

9095
Serial (SXI)
9196
"""""""""""
@@ -101,7 +106,11 @@ Serial (SXI)
101106
#define XCP_MAX_CTO (64)
102107
#define XCP_MAX_DTO (64)
103108
104-
2) Build and upload
109+
.. note::
110+
The parameters `XCP_ON_SXI_BITRATE` and `XCP_ON_SXI_CONFIG` are not relevant for USB-to-USB connections, but there are boards whose RxD/TxD pins are connected
111+
to USB-to-serial converters; here the parameters are crucial for successful communication (not to mention real RS232 ports)!
112+
113+
1) Build and upload
105114
^^^^^^^^^^^^^^^^^^^
106115
Using Arduino IDE: open the sketch, select your board/port, then Compile/Upload.
107116
Using Arduino CLI (example):
@@ -111,8 +120,8 @@ Using Arduino CLI (example):
111120
arduino-cli compile --fqbn arduino:avr:uno tools/arduino/hello_xcp
112121
arduino-cli upload --fqbn arduino:avr:uno -p COM5 tools/arduino/hello_xcp
113122
114-
3) Connect from the host
115-
^^^^^^^^^^^^^^^^^^^^^^^^
123+
3) Connect from the client
124+
^^^^^^^^^^^^^^^^^^^^^^^^^^
116125
- Ethernet/WiFi: the slave listens on UDP port 5555 by default.
117126
- Use your preferred XCP master to connect (e.g., commercial tools or open-source clients). Ensure the IP is reachable.
118127
- CAN: configure your PC CAN interface with matching bit timing/IDs.
@@ -168,11 +177,6 @@ From the repository root:
168177
169178
Then flash the generated UF2 or use your preferred uploader.
170179

171-
3) Connect from the host
172-
^^^^^^^^^^^^^^^^^^^^^^^^
173-
- For SXI: connect your host to the Pico’s UART/USB-serial at the configured baud and use an XCP master that supports SXI.
174-
- For Ethernet (if you add a module and driver): follow the Arduino Ethernet steps for IP/port selection; sizes remain the same.
175-
176180
Further reading
177181
---------------
178182
- Configuration reference: :doc:`options`

0 commit comments

Comments
 (0)