Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
I’m getting a device tree syntax error on this overlay
/ {
aliases {
pwm-led0 = &green_pwm_led;
};
&pwm4 {
status = "okay";
pinctrl-0 = <&pwm_d12_default>;
pinctrl-names = "default";
};
&pinctrl {
pwm_d12_default: pwm_d12_default {
group1 {
pinmux = ;
bias-pull-up;
};
};
};
};
this is the error I am facing, does anyone have a clue
-- Found devicetree overlay: /home/zacck/zephyrproject/zephyr/samples/basic/blinky_pwm/boards/stm32f4_disco.overlay
devicetree error: /home/zacck/zephyrproject/zephyr/samples/basic/blinky_pwm/boards/stm32f4_disco.overlay:8 (column 3): parse error: expected node name, property name, or '}'
CMake Error at /home/zacck/zephyrproject/zephyr/cmake/modules/dts.cmake:303 (execute_process):
execute_process failed command indexes:
1: "Child return code: 1"
Call Stack (most recent call first):
/home/zacck/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
/home/zacck/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/home/zacck/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/zacck/zephyrproject/.venv/bin/python3 -B/home/zacck/zephyrproject/zephyr/samples/basic/blinky_pwm/build -GNinja -DBOARD=stm32f4_disco -S/home/zacck/zephyrproject/zephyr/samples/basic/blinky_pwm
Browse other questions tagged
looks to me, the phandles should be outside root node.
does green_pwn_led exist in it?
I tried that and it didnt work
https://github.com/zephyrproject-rtos/zephyr/blob/cd772b374f548ee46cb4c7cb0026d8893a0e79c0/boards/st/stm32f4_disco/stm32f4_disco.dts#L61
you get the same error message?
try explicitly naming the label
Something like this
`green_led=&pwmleds.green_pwm_led`
at the moment it’s not a label issue
I got past that by setting up the aliases unless there is a part of the error I am missing.
isnt pwm4 already defined?
can you remove `group1` and have the properties directly under the `pwn_d12_default` node
it is I just added a property
I can go back to this
yea,
even i feel pinmux group1 is messing it
ok here look this builds
but the pin stays at 0
this is all I needed in the overlay
@32bitwidesaviour @melta101 on the plus side I know almost every line in the stm32 dts in zephyr
I think the pwmleds are not enabled by default
and pwm_led 0 does not exist
i think it’s all just different naming conventions
Yeah I mean I could have just used the node in the dts directly without an alias
My issue now is prescalers and clocks via device tree, wish me luck
wait,
This is little confusing.
why are you dealing with psc, clk when developing application level code?
should’nt the pwm driver handle those?
Well it seems like I need to
Because first of all, I know the clock is preset for me but I canβt find a peek api to tell me and Iβm too lazy to go look at registers right now
CONTRIBUTE TO THIS THREAD