Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
boards/ | 18-Mar-2025 | - | 53 | 45 | ||
src/ | 18-Mar-2025 | - | 56 | 41 | ||
CMakeLists.txt | D | 18-Mar-2025 | 293 | 11 | 7 | |
Kconfig | D | 18-Mar-2025 | 384 | 19 | 13 | |
README.rst | D | 18-Mar-2025 | 1.4 KiB | 49 | 34 | |
prj.conf | D | 18-Mar-2025 | 30 | 3 | 2 | |
sample.yaml | D | 18-Mar-2025 | 173 | 9 | 8 |
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