This video is a gem in the ocean. There are so many points to complain about Zephyr, yet zero complaints in the video. Instead, you turned this frustration into a treasure hunt. Well done, sir.
Thank you very much for your kind feedback. It's good to know that the story approach is helpful, I will try to continue to find ways to make the learning experience more effective.
Thank you very much for your kind feedback and encouragement! I'm enjoying the process of learning about the technology (and how to make videos) so having more people find the content useful is just an added bonus on top :-)
Just finished watching all 4 videos. Superb content, impeccable presentation and excellent pedagogy. I am no longer so afraid of device trees. I may even start drinking tea again.
It makes me very happy that you found the video useful, and thank you for sharing the kind feedback. Device trees are definitely not easy to get started with, but I find that they do make more sense after a few cups of tea ;-)
@@thepullupresistor They definitely make more sense after watching your videos! But maybe the choice of drink was my issue before finding these gems; too much coffee, not enough tea! 😅
Coincidentally I was also looking at pwm and had coding done. Then I bumped to your video. Your video gives precise and deep understanding. Thanks a lot 😊. I wish you keep making more videos. Somehow in my esp32, for 20ms (also set 20ms in DT), setting pulse width using dt_pulse_set() returns invalid parameters.
Very nice video! I really like the part of you showing how to troubleshoot the errors. I think this is a part most tutorials are missing. Thank you! Can‘t wait for the next video!
That's great feedback, thank you! Working on video number five in the series now, and I think there will be some troubleshooting of issues in that one too, so I hope you'll like it as well :-)
It makes me very happy to hear that you find the videos useful. I think Zephyr has a lot of potential and there are so many facets that I have still not explored.
Absolutely next level content! This is such a difficult concept yet you take us by the hand and even make us take breaks to get tea at the right time! What a great teacher.
Thank you for providing such high-quality content that has helped me to learn more about ZephyrRTOS. I have a question regarding your statement at 14:50, where you mentioned that "any node that wants to use this compatible MUST provide 3 specifier." From what I understand, you meant to say "MUST provide a specifier with 3 cells" instead. Could you please clarify your opinion on this matter please, thanks so much !!!
I hope you continue the series and show also pwm with servos, serial, i2c, spi communication with some sensors, Bluetooth, Wifi and EspNOW protocol in ZephyrOS
Thank you very much for your feedback and encouragement! A WiFi tutorial is definitely on my list of potential future videos, but I can't make any promises as to when I'll be able to get around to it, unfortunately.
That's a very good idea! I'll start thinking about ways to present the networking portions, since that is probably one of the most common reasons for choosing the ESP32 series ICs in the first place. Thank you for the suggestion! However, I can't promise how quickly I can put something together, so I ask for your patience! :-)
At 18:35 , you put compatible = “pwm-leds”; Would this not be compatible=“espressif, esp32-ledc”? If not where did you get this pwm-leds from. Otherwise very good video though :)
That's a great question, thank you! You can certainly use the espressif,esp32-ledc compatible directly if you would like. However, using pwm-leds adds another layer of abstraction so that you could easily change the underlying microcontroller to another family or even manufacturer, without having to make any change to the source code, only a few changes in the devicetree. This comes back to the concept of separating the application code from the hardware that Zephyr is trying to do. If you have a look at the generated devicetree for the application under build/zephyr/zephyr.dts, you can see that the pwmleds node (using the pwm-leds compatible) refers to the node &ledc in its pwms property. If you look up the ledc node in the same file, you will see that it indeed uses the espressif,esp32-ledc compatible: ledc0: ledc@3ff59000 { compatible = "espressif,esp32-ledc"; ...... So, we are just using an extra layer of indirection to separate application code from hardware. Does that make sense? Sorry if I misunderstood your question, and thanks again for making a great point!
Because it took me a while to puzzle this together, here is an overlay example for a stm32f411_nucleo_board. With pwm on the build in green user led (PA5): &timers2 { st,prescaler = ; status = "okay"; pwm2: pwm { pinctrl-0 = ; pinctrl-names = "default"; status = "okay"; }; }; / { pwmleds: pwmleds { compatible = "pwm-leds"; status = "okay"; green_pwm_led: green_pwm_led { pwms = ; }; }; };
Oh, this might come in very handy, thank you! I'm using the same board, and I'll definitely reference this if I run into too many issues. I'll start off on my own though of course as my purpose when watching these videos is to fiddle around with zephyr and device trees and learn on my own.
I'm so glad that you learned a lot from the video, and thank you for your kind feedback. I'm sorry if I misunderstood your comment, but would you mind elaborating a bit on your problem with the MCPWM driver? In this video we don't use the MCPWM driver, but rather the LEDC driver. Again, apologies if I misunderstood your problem or if my video was not clear enough on this point. Please do let me know if I can be of further help.
@@thepullupresistor Oh my problem was that I was following your video as to get the "basic" understanding on how to construct devicetree and bindings, but I couldn't get my own devictree and bindings based on MCPWM to work. My team have moved on to ESP-IDF though as we only plan to release our product on an ESP32 and we decided that going the Zephyr route when it's much harder than anything else is only going to complicate things. Anyways I will still follow this channel because I find the way you explain things much clearer than anyone else and it's also the most up to date guide, and that's important when Zephyr keeps having big changes with almost every update. I hope that when the technology becomes a little more mature I will dive into it yet again, but for now it really proved to be too much for a beginner software engineer like me!
Nice video. I tried using PWM for my project where I have 2 esp32 running pwm to drive led. initially they blink in sync, over time, after few hours, they are out of sync already. do you any idea or work around to solve this?
Thank you for the feedback. With regards to your project using two ESP32s where the PWM LEDs go out of sync after a few hours, I've not experimented with the accuracy of the different ESP32 clock sources, but the two things that came to mind was either to use a more stable internal clock source (if you're not doing that already), or to use an external crystal that provides the same clock source to both ESP32 ICs. Please do share if you get it working. Out of curiosity, would you mind sharing what your project is for? Using two ESP32s sounds interesting!
I see. If you do happen to find a source, please do share. I wasn't able to find anything definitive in the Devicetree specification, so I thought of the p as standing for "pointer" since phandle references another node in the Devicetree. But peripheral handle would also make sense to me as well. Thank you for sharing!