Skip to content

Commit f5d1803

Browse files
dipakgmxkartben
authored andcommitted
tests: drivers: build_all: stepper: add uart configuration for tmc51xx
Now added a node to test builds with tmc51xx on uart. Signed-off-by: Dipak Shetty <[email protected]>
1 parent 358907b commit f5d1803

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed

tests/drivers/build_all/stepper/app.overlay

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,13 @@
3131

3232
#include "spi.dtsi"
3333
};
34+
35+
test_uart: uart@55556666 {
36+
compatible = "vnd,serial";
37+
reg = <0x55556666 0x1000>;
38+
status = "okay";
39+
40+
#include "uart.dtsi"
41+
};
3442
};
3543
};

tests/drivers/build_all/stepper/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ CONFIG_LOG=y
44
CONFIG_STEPPER_LOG_LEVEL_DBG=y
55
CONFIG_GPIO=y
66
CONFIG_SPI=y
7+
CONFIG_SERIAL=y
78
CONFIG_STEPPER=y
89
CONFIG_EMUL=y

tests/drivers/build_all/stepper/spi.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ adi_tmc51xx_1: adi_tmc51xx@1 {
124124
adi_tmc51xx_2: adi_tmc51xx@2 {
125125
compatible = "adi,tmc51xx";
126126
status = "okay";
127-
reg = <0x01>;
127+
reg = <0x02>;
128128
spi-max-frequency = <8000000>;
129129
label = "tmc5160_2";
130130

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* SPDX-FileCopyrightText: Copyright (c) 2025 Dipak Shetty
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
/****************************************
6+
* PLEASE KEEP REG ADDRESSES SEQUENTIAL *
7+
***************************************/
8+
9+
adi_tmc51xx_uart: adi_tmc51xx {
10+
compatible = "adi,tmc51xx";
11+
status = "okay";
12+
13+
label = "tmc5160_uart_1";
14+
15+
en-pwm-mode; test-mode; /* ADI TMC Global configuration flags */
16+
clock-frequency = <16000000>; /* Internal/External Clock frequency */
17+
18+
/* common stepper controller settings */
19+
invert-direction;
20+
micro-step-res = <256>;
21+
22+
/* ADI TMC stallguard settings specific to TMC5160 */
23+
activate-stallguard2;
24+
stallguard-velocity-check-interval-ms = <100>;
25+
stallguard2-threshold = <9>;
26+
stallguard-threshold-velocity = <50000>;
27+
28+
/* ADI TMC ramp generator as well as current settings */
29+
vstart = <10>;
30+
a1 = <20>;
31+
v1 = <30>;
32+
d1 = <40>;
33+
vmax = <50>;
34+
amax = <60>;
35+
dmax = <70>;
36+
tzerowait = <80>;
37+
thigh = <90>;
38+
tcoolthrs = <100>;
39+
tpwmthrs = <110>;
40+
tpowerdown = <120>;
41+
ihold = <1>;
42+
irun = <2>;
43+
iholddelay = <3>;
44+
};

0 commit comments

Comments
 (0)