ULP (ESP32) : a simple example

The ULP is a low-power coprocessor (Ultra Low Power) integrated into the ESP32 MCU. It’s a very small processor that can run independently from the main cores and that has access to the GPIOs, some peripheral and an I²C controller.

The ULP is also able to run when the ESP32 is is deep-sleep mode. In this mode, nearly the whole MCU is powered-off, except the RTC domain, in which the ULP is built. It is also able to wake the ESP32 up.

A possible application of the ULP is to acquire temperature while the ESP32 is in deep-sleep and to wake it up once it reaches a specified threshold.

Programming the ULP seems very interesting, but even if the documentation from Espressif is very complete, I couldn’t find a simple and easy example to learn how to use it.

Here is then in details an ultra simple exemple : the traditional blink, which blinks 2 LEDs on the WROVER-KIT V3.

Continue reading “ULP (ESP32) : a simple example”

ESP32, ESP-IDF, CMake & CLion

I’ve been working with ESP8266 and ESP32 for some times now. Until now, I used the Arduino framework, mostly because it’s easy : it provides a lot of services and libraries, allowing me to go straight to the point and concentrate on my own code.

But I like to understand what lies underneath the top-layers, get closer to the metal, the transistors, the peripherals and the registers. For that, Espressif provides a well-documented SDK, and for which a lot of resources are available online.

This framework, name ESP-IDF (“Ce framework, nommé ESP-IDF (“Espressif IoT Development Framework”) provides toolchains and tools allowing the development of application for ESP32 MCU. In fact, the Arduino framework integrates this SDK to provide a higher-level API, and compatible with other platforms

When I installed the IDF, I was surprised (in a very good way) to find CMake files! CMake is an open-source tool to manager the build process of a project, especially for C++ projects. And CMake is natively supported by my favorite IDE : CLion.

So, shouldn’t it be possible to create, edit, build and run an ESP-IDF project in CLion ? That’s what we are going to see! (TL;DR : the answer is ‘YES’!).

Continue reading “ESP32, ESP-IDF, CMake & CLion”