• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/18-Mar-2025-5345

src/18-Mar-2025-5641

CMakeLists.txtD18-Mar-2025293 117

KconfigD18-Mar-2025384 1913

README.rstD18-Mar-20251.4 KiB4934

prj.confD18-Mar-202530 32

sample.yamlD18-Mar-2025173 98

README.rst

1.. zephyr:code-sample:: tmc50xx
2   :name: TMC50XX stepper
3   :relevant-api: stepper_interface
4
5   Rotate a TMC50XX stepper motor and change velocity at runtime.
6
7Description
8***********
9
10This sample application periodically spins the stepper clockwise and counterclockwise depending on
11the :kconfig:option:`CONFIG_PING_PONG_N_REV` configuration.
12
13References
14**********
15
16 - TMC5041: https://www.analog.com/media/en/technical-documentation/data-sheets/TMC5041_datasheet_rev1.16.pdf
17 - TMC5072: https://www.analog.com/media/en/technical-documentation/data-sheets/TMC5072_datasheet_rev1.26.pdf
18
19Wiring
20*******
21
22This sample uses the TMC5072 BOB controlled using the SPI interface. The board's Devicetree must define
23a ``stepper`` alias for the stepper motor node.
24
25Building and Running
26********************
27
28This project spins the stepper and outputs the events to the console. It requires an TMC50XX stepper
29driver. It should work with any platform featuring a SPI peripheral interface.
30It does not work on QEMU.
31
32.. zephyr-app-commands::
33   :zephyr-app: samples/drivers/stepper/tmc50xx
34   :board: nucleo_g071rb
35   :goals: build flash
36
37Sample Output
38=============
39
40.. code-block:: console
41
42   Starting tmc50xx stepper sample
43   stepper is 0x8007240, name is tmc_stepper@0
44   stepper_callback steps completed changing direction
45   stepper_callback steps completed changing direction
46   stepper_callback steps completed changing direction
47
48   <repeats endlessly>
49