[#2] ESP32 on Zephyr OS: "Hello, world!" (Blinking LED) [Part 2]
Вставка
- Опубліковано 12 вер 2022
- The ESP32 family of microcontrollers are capable devices with many built-in peripherals, including Bluetooth and Wi-Fi. The official SDK and toolchain is the ESP IoT Development Framework (ESP-IDF) and uses FreeRTOS as its real-time operating system.
However, in this tutorial series, we'll use the Zephyr real-time operating system and SDK to program the firmware for the ESP32. This is the second video in the series, so I recommend watching the previous video first: • [#1] ESP32 on Zephyr O...
Links:
Zephyr Getting Started Guide: docs.zephyrproject.org/latest...
ESP32 specific instructions: docs.zephyrproject.org/latest...
ESP32 Technical Reference Manual: www.espressif.com/sites/defau...
Zephyr Devicetree Mysteries, Solved: • Zephyr Devicetree Myst...
Github repository: github.com/bokfink/esp32_zeph... - Наука та технологія
please make more, Really loved the content, the quality and the information in the video!!!
Thank you very much for your encouragement. I've just uploaded the next video in the series, I hope you'll enjoy it, too.
this series is super intuitive, and helpful for someone didn't have experience in linux. Thank you so much! Can't believe you only have some hundreds of subs.
Your feedback is so valuable to me, as this was the reason I decided to start making these videos in the first place. With regards to subscribers, your individual comments and feedback are far more motivating than having many more subscribers. Knowing that a few people are finding the videos helpful makes my day :-)
Again, great content!
Thanks again! :-)
Thank you so much for your explanations! I've never worked with Zephyr RTOS before, so your insight has been invaluable to me. Before watching this series, I actually didn't know what .dts and .dtsi files meant or what they were used for. I really appreciate the effort you put into these videos, I learned a lot!
Great to know that you found the video series useful. I also didn't know anything about .dts and .dtsi files before exploring Zephyr, and it was quite a steep learning curve.
Keep on going... We need everything that Zephyr and esp32 can do... Please upload videos regularly... Don't bother about views..
Thanks for the encouragement, it really helps to know that you find the content useful.
magnificent miracle
Great Videos. Thanks
Thank you very much for your kind feedback! :-)
For people wondering why overlay is not included into the final dts file, you need to include this .overlay in CMakeLists with for example "set(DTC_OVERLAY_FILE "esp32.overlay")"
Thank you for sharing that insight with everyone! I believe that Zephyr changed the board naming last year, so that the esp32.overlay file was not automatically picked up. Currently, I usually just call my overlay file app.overlay instead of esp32.overlay, as per the manual here: docs.zephyrproject.org/latest/build/dts/howtos.html#set-devicetree-overlays
Thanks again for taking the time to help anyone facing similar issues.
Currently we only have pin 25 specified in the blinking_leds port. What if we had more than one pin in the port? would all gpios defined in that port toggle?
i love this awesome video, its clearly , Can you make tutorial for nrf5xx with zephyr?. Many thanks
It makes me very happy that you found the video useful, thank you for letting me know! I don't have any plans for making tutorials for nrf5xx at the moment, but I'll be sure to keep it in mind for the future :-)
Hello, Do you know where to place the overlay file if I am using PlatformIO in Windows?
Sorry, but I don't use PlatformIO or Windows so I don't know. Good luck in finding an answer to your problem.
Thank you for your informative videos. Why is this information given twice: "gpios = " in the overlay file and "ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE)" in main.c? Isn't it redundant?
Thank you for the feedback and the excellent question. Whilst GPIO_ACTIVE_HIGH and GPIO_OUTPUT_ACTIVE look quite similar, their meaning is slightly different. In the devicetree overlay file, GPIO_ACTIVE_HIGH says that this pin will have the logical value of 1 (ACTIVE) when the voltage level is HIGH. So, for example, if the voltage on that pin is 3.3V or 5V (depending on your power supply), Zephyr will treat it as a logical value 1 (ACTIVE). If the voltage is at 0V (ground), Zephyr will treat the logical value as 0. If, instead, we had configured the devicetree overlay file to say GPIO_ACTIVE_LOW, then Zephyr would treat 3.3V/5V as a logical 0, and 0V as logical 1 (ACTIVE).
Now, as for the GPIO_OUTPUT_ACTIVE flag, this tells the MCU to treat the GPIO pin pointed to by &gpio0 25 as an output AND set it to logical value 1 (ACTIVE). Since we have configured GPIO_ACTIVE_HIGH in our devicetree, this means that the voltage will be set to 3.3V/5V. If, instead, we had configured the devicetree with GPIO_ACTIVE_LOW, then the MCU would set the voltage to 0V, because this is then the logical value 1 (ACTIVE).
Sorry for the long-winded explanation, but hopefully it makes sense. Please let me know if you're OK or if I misunderstood your question. Thanks again!
crystal clear, thank you@@thepullupresistor
&gpio0 > Definition present in .dtsi files
Yes, that is a very good point, thank you for highlighting it. I should have mentioned that in the video.