Home
last modified time | relevance | path

Searched full:stepper (Results 1 – 25 of 82) sorted by relevance

1234

/Zephyr-latest/samples/drivers/stepper/generic/
DREADME.rst1 .. zephyr:code-sample:: stepper
2 :name: Stepper
5 Rotate a stepper motor in 4 different modes.
10 This sample demonstrates how to use the stepper driver API to control a stepper motor. The sample
11 spins, enables, disables, stops the stepper and outputs the events to the console.
13 The stepper spins in 4 different modes: ping_pong_relative, ping_pong_absolute, continuous_clockwise
15 :kconfig:option:`CONFIG_STEP_INTERVAL_NS`. The sample also demonstrates how to use the stepper call…
16 to change the direction of the stepper after a certain number of steps.
18 Pressing any button should change the mode of the stepper. The mode is printed to the console.
22 The sample also has a monitor thread that prints the actual position of the stepper motor every
[all …]
Dsample.yaml2 name: Generic Stepper Sample
4 sample.drivers.stepper.generic:
5 harness: stepper
6 tags: stepper
/Zephyr-latest/samples/drivers/stepper/tmc50xx/src/
Dmain.c8 #include <zephyr/drivers/stepper.h>
10 #include <zephyr/drivers/stepper/stepper_trinamic.h>
12 const struct device *stepper = DEVICE_DT_GET(DT_ALIAS(stepper)); variable
15 DT_PROP(DT_ALIAS(stepper), micro_step_res);
32 printf("Starting tmc50xx stepper sample\n"); in main()
33 if (!device_is_ready(stepper)) { in main()
34 printf("Device %s is not ready\n", stepper->name); in main()
37 printf("stepper is %p, name is %s\n", stepper, stepper->name); in main()
39 stepper_set_event_callback(stepper, stepper_callback, NULL); in main()
40 stepper_enable(stepper, true); in main()
[all …]
/Zephyr-latest/drivers/stepper/
DKconfig4 menuconfig STEPPER config
5 bool "Stepper Controller"
7 Enable stepper controller
9 if STEPPER
11 module = STEPPER
12 module-str = stepper
16 int "Stepper Motor Controller init priority"
19 Stepper motor controller initialization priority.
22 bool "Stepper shell"
25 Enable stepper shell for testing.
[all …]
DKconfig.stepper_event_template5 bool "$(module-str) guarantee non ISR callbacks upon stepper events"
7 Enable the dispatch of stepper generated events via
10 then registered stepper event callback must be ISR safe.
13 int "$(module-str) maximum number of pending stepper events"
17 The maximum number of stepper events that can be pending before new events
DKconfig.fake1 # Fake stepper configuration options
7 bool "Fake stepper driver"
11 Enable support for the FFF-based fake stepper driver.
/Zephyr-latest/samples/drivers/stepper/generic/src/
Dmain.c8 #include <zephyr/drivers/stepper.h>
13 LOG_MODULE_REGISTER(stepper, CONFIG_STEPPER_LOG_LEVEL);
15 static const struct device *stepper = DEVICE_DT_GET(DT_ALIAS(stepper)); variable
30 CONFIG_STEPS_PER_REV * CONFIG_PING_PONG_N_REV * DT_PROP(DT_ALIAS(stepper), micro_step_res);
67 LOG_INF("Starting generic stepper sample\n"); in main()
68 if (!device_is_ready(stepper)) { in main()
69 LOG_ERR("Device %s is not ready\n", stepper->name); in main()
72 LOG_DBG("stepper is %p, name is %s\n", stepper, stepper->name); in main()
74 stepper_set_event_callback(stepper, stepper_callback, NULL); in main()
75 stepper_set_reference_position(stepper, 0); in main()
[all …]
/Zephyr-latest/doc/hardware/peripherals/
Dstepper.rst6 The stepper driver API provides a set of functions for controlling and configuring stepper drivers.
8 Configure Stepper Driver
16 - **Enable** the stepper driver using :c:func:`stepper_enable`.
18 Control Stepper
25 - Check if the stepper is **moving** using :c:func:`stepper_is_moving`.
31 In the context of stepper controllers device tree provides the initial hardware
32 configuration for stepper drivers on a per device level. Each device must specify
35 be used in a boards devicetree to configure a stepper driver to its initial state.
39 - :dtcompatible:`zephyr,gpio-stepper`
45 Zephyr has a `stepper discord`_ channel for stepper related discussions, which
[all …]
/Zephyr-latest/include/zephyr/drivers/
Dstepper.h8 * @file drivers/stepper.h
9 * @brief Public API for Stepper Driver
16 * @brief Stepper Driver Interface
17 * @defgroup stepper_interface Stepper Driver Interface
39 * @brief Stepper Motor micro-step resolution options
63 * @brief Stepper Motor direction options
73 * @brief Stepper Motor run mode options
85 * @brief Stepper Events
96 /** Stepper has stopped */
103 * Stepper driver API definition and system call entry points.
[all …]
/Zephyr-latest/samples/drivers/stepper/tmc50xx/
DREADME.rst2 :name: TMC50XX stepper
5 Rotate a TMC50XX stepper motor and change velocity at runtime.
10 This sample application periodically spins the stepper clockwise and counterclockwise depending on
23 a ``stepper`` alias for the stepper motor node.
28 This project spins the stepper and outputs the events to the console. It requires an TMC50XX stepper
33 :zephyr-app: samples/drivers/stepper/tmc50xx
42 Starting tmc50xx stepper sample
43 stepper is 0x8007240, name is tmc_stepper@0
Dsample.yaml2 name: TMC50XX Stepper Sample
4 sample.drivers.stepper.tmc50xx:
5 harness: stepper
6 tags: stepper
/Zephyr-latest/drivers/stepper/adi_tmc/
DKconfig5 bool "Trinamic Stepper Controller"
6 depends on STEPPER
9 Enable trinamic stepper controller
14 bool "Use Trinamic Stepper Controller with SPI"
18 A Trinamic Stepper Controller with SPI is enabled
20 comment "Trinamic Stepper Drivers"
Dadi_tmc50xx_stepper_controller.c11 #include <zephyr/drivers/stepper.h>
12 #include <zephyr/drivers/stepper/stepper_trinamic.h>
38 const struct device *stepper; member
155 const struct tmc50xx_stepper_config *stepper_config = stepper_data->stepper->config; in stallguard_work_handler()
157 err = stallguard_enable(stepper_data->stepper, true); in stallguard_work_handler()
187 const struct tmc50xx_stepper_config *stepper_config = stepper_data->stepper->config; in rampstat_work_handler()
197 LOG_ERR("%s: Failed to read DRVSTATUS register", stepper_data->stepper->name); in rampstat_work_handler()
202 LOG_INF("%s: Stall detected", stepper_data->stepper->name); in rampstat_work_handler()
207 LOG_ERR("%s: Failed to stop motor", stepper_data->stepper->name); in rampstat_work_handler()
217 LOG_ERR("%s: Failed to read RAMPSTAT register", stepper_data->stepper->name); in rampstat_work_handler()
[all …]
/Zephyr-latest/dts/bindings/stepper/
Dzephyr,gpio-stepper.yaml6 GPIO Stepper Controller for darlington transistor arrays or dual H-bridge
10 stepper: stepper {
11 compatible = "zephyr,gpio-stepper";
18 compatible: "zephyr,gpio-stepper"
20 include: stepper-controller.yaml
27 The gpio pin array on which the stepper inputs are to be connected
Dzephyr,fake-stepper.yaml5 This binding provides a fake stepper controller for use as either a stub or a mock in
8 compatible: "zephyr,fake-stepper"
10 include: stepper-controller.yaml
/Zephyr-latest/drivers/stepper/step_dir/
Dstep_dir_stepper_common.h11 * @brief Stepper Driver APIs
12 * @defgroup step_dir_stepper Stepper Driver APIs
19 #include <zephyr/drivers/stepper.h>
25 * @brief Common step direction stepper config.
38 * @brief Initialize common step direction stepper config from devicetree instance.
56 * @brief Initialize common step direction stepper config from devicetree instance.
63 * @brief Common step direction stepper data.
94 * @brief Initialize common step direction stepper data from devicetree instance.
104 * @brief Initialize common step direction stepper data from devicetree instance.
123 * @brief Common function to initialize a step direction stepper device at init time.
[all …]
Dstep_dir_stepper_timing_source.h12 * @brief Initialize the stepper timing source.
20 * @brief Update the stepper timing source.
30 * @brief Start the stepper timing source.
38 * @brief Whether the stepper timing source requires rescheduling (keeps running
47 * @brief Stop the stepper timing source.
55 * @brief Check if the stepper timing source is running.
63 * @brief Stepper timing source API.
/Zephyr-latest/tests/drivers/stepper/shell/src/
Dmain.c9 #include <zephyr/drivers/stepper.h>
10 #include <zephyr/drivers/stepper/stepper_fake.h>
46 int err = shell_execute_cmd(sh, "stepper enable " FAKE_STEPPER_NAME " on"); in ZTEST()
53 err = shell_execute_cmd(sh, "stepper enable " FAKE_STEPPER_NAME " off"); in ZTEST()
61 int err = shell_execute_cmd(sh, "stepper move_by " FAKE_STEPPER_NAME " 1000"); in ZTEST()
70 int err = shell_execute_cmd(sh, "stepper set_microstep_interval " FAKE_STEPPER_NAME " 200"); in ZTEST()
80 int err = shell_execute_cmd(sh, "stepper set_micro_step_res " FAKE_STEPPER_NAME " 64"); in ZTEST()
90 int err = shell_execute_cmd(sh, "stepper set_micro_step_res " FAKE_STEPPER_NAME " 111"); in ZTEST()
98 int err = shell_execute_cmd(sh, "stepper get_micro_step_res " FAKE_STEPPER_NAME); in ZTEST()
106 int err = shell_execute_cmd(sh, "stepper set_reference_position " FAKE_STEPPER_NAME " 100"); in ZTEST()
[all …]
/Zephyr-latest/tests/drivers/stepper/stepper_api/src/
Dmain.c7 #include <zephyr/drivers/stepper.h>
66 .dev = DEVICE_DT_GET(DT_ALIAS(stepper)), in stepper_setup()
89 ZTEST_SUITE(stepper, NULL, stepper_setup, stepper_before, NULL, NULL);
91 ZTEST_F(stepper, test_set_micro_step_res_incorrect) in ZTEST_F() argument
98 ZTEST_F(stepper, test_get_micro_step_res) in ZTEST_F() argument
102 zassert_equal(res, DT_PROP(DT_ALIAS(stepper), micro_step_res), in ZTEST_F()
106 ZTEST_F(stepper, test_set_micro_step_interval_invalid_zero) in ZTEST_F() argument
113 ZTEST_F(stepper, test_actual_position) in ZTEST_F() argument
122 ZTEST_F(stepper, test_target_position_w_fixed_step_interval) in ZTEST_F() argument
142 ZTEST_F(stepper, test_stop) in ZTEST_F() argument
[all …]
/Zephyr-latest/drivers/stepper/allegro/
DKconfig5 bool "Allegro Stepper Controller"
6 depends on STEPPER
9 Enable allegro stepper controller
13 comment "Allegro Stepper Drivers"
/Zephyr-latest/samples/drivers/stepper/
Dindex.rst1 .. zephyr:code-sample-category:: stepper
2 :name: Stepper
5 These samples demonstrate how to use the :ref:`stepper <stepper_api>` driver API.
/Zephyr-latest/include/zephyr/drivers/stepper/
Dstepper_drv8424.h2 * @file drivers/stepper/stepper_drv8424.h
4 * @brief Public API for DRV8424 Stepper Controller Specific Functions
15 #include <zephyr/drivers/stepper.h>
24 * @param dev Pointer to the stepper motor controller instance
Dstepper_trinamic.h2 * @file drivers/stepper/stepper_trinamic.h
4 * @brief Public API for Trinamic Stepper Controller Specific Functions
18 * @brief Trinamic Stepper Controller Interface
19 * @defgroup trinamic_stepper_interface Trinamic Stepper Controller Interface
25 #include <zephyr/drivers/stepper.h>
32 * @brief Trinamic stepper controller ramp generator data limits
63 * @brief Trinamic Stepper Ramp Generator data
128 * @brief Get Trinamic Stepper Ramp Generator data from DT
153 * @brief Configure Trinamic Stepper Ramp Generator
155 * @param dev Pointer to the stepper motor controller instance
[all …]
/Zephyr-latest/tests/drivers/stepper/shell/
Dtestcase.yaml4 - stepper
8 drivers.stepper.shell:
12 drivers.stepper.shell_async:
/Zephyr-latest/tests/drivers/stepper/stepper_api/
Dtestcase.yaml7 - stepper
10 drivers.stepper.stepper_api.adi_tmc2209:
19 drivers.stepper.stepper_api.ti_drv8424:
30 drivers.stepper.stepper_api.zephyr_gpio_stepper:

1234