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.

Step 1 of 5

CREATE YOUR PROFILE *Required

OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Connect & collaborate 🀝with other tech professionals
Learn & Grow πŸ“š
Contribute Experience & Expertise πŸ”§
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware Design πŸ’‘
Embedded Software πŸ’»
Edge Networking ⚑
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Device Tree Syntax Error in STM32 Overlay

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
  1. 32bitwidesaviour#0000

    looks to me, the phandles should be outside root node.

  2. melta101#0000

    does green_pwn_led exist in it?

  3. superbike_z#0000

    I tried that and it didnt work

  4. superbike_z#0000
  5. 32bitwidesaviour#0000

    you get the same error message?

  6. melta101#0000

    try explicitly naming the label
    Something like this
    `green_led=&pwmleds.green_pwm_led`

  7. superbike_z#0000
    -- Found BOARD.dts: /home/zacck/zephyrproject/zephyr/boards/st/stm32f4_disco/stm32f4_disco.dts
    -- Found devicetree overlay: /home/zacck/zephyrproject/zephyr/samples/basic/blinky_pwm/boards/stm32f4_disco.overlay
    devicetree error: 'pinmux' is marked as required in 'properties:' in /home/zacck/zephyrproject/zephyr/dts/bindings/pinctrl/st,stm32-pinctrl.yaml, but does not appear in 
    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/
    
  8. superbike_z#0000

    at the moment it’s not a label issue

  9. superbike_z#0000

    I got past that by setting up the aliases unless there is a part of the error I am missing.

  10. melta101#0000

    isnt pwm4 already defined?

  11. 32bitwidesaviour#0000

    can you remove `group1` and have the properties directly under the `pwn_d12_default` node

  12. superbike_z#0000

    it is I just added a property

  13. superbike_z#0000

    I can go back to this

  14. melta101#0000

    yea,
    even i feel pinmux group1 is messing it

  15. superbike_z#0000

    ok here look this builds

    / {
      aliases {
            pwm-led0 = &green_pwm_led;
      };
    };
    
    
      &pwm4 {
        status = "okay";
      };
    
  16. superbike_z#0000

    but the pin stays at 0

  17. superbike_z#0000

    this is all I needed in the overlay

    / {
        aliases {
            pwm-led0 = &green_pwm_led;
        };
    };
    
    
    
    &pwmleds {
        status = "okay";
    };
    
    &pwm4 {
        status = "okay";
    };
    
    
  18. superbike_z#0000

    @32bitwidesaviour @melta101 on the plus side I know almost every line in the stm32 dts in zephyr

  19. superbike_z#0000

    I think the pwmleds are not enabled by default

  20. superbike_z#0000

    and pwm_led 0 does not exist

  21. melta101#0000

    i think it’s all just different naming conventions

  22. superbike_z#0000

    Yeah I mean I could have just used the node in the dts directly without an alias

  23. superbike_z#0000

    My issue now is prescalers and clocks via device tree, wish me luck

  24. melta101#0000

    wait,
    This is little confusing.
    why are you dealing with psc, clk when developing application level code?

  25. melta101#0000

    should’nt the pwm driver handle those?

  26. superbike_z#0000

    Well it seems like I need to

  27. superbike_z#0000

    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

Browse other questions tagged 

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @chitour
    600 XP
  • 5.
    Avatar
    @lifegochi
    250 XP
  • 6.
    Avatar
    @Youuce
    180 XP