Ultra Low Power (ULP) processor - Part 1


  • Global Moderator

    Introduction

    In deep sleep most of the peripherals are turned off, however, the ULP processor, the RTC slow and fast memories and the RTC controller can still be powered on. In deep sleep the ULP can perform measurements using the ADC, read sensor data using the I2C interface, pulse counting, etc. In this short tutorial we will show how to compile the ULP processor.

    Compiling the ULP library

    To compile the ULP you need to set up the xtensia gcc toolchain, export the bin path and clone the pycom-esp-idf repository. Please follow the instructions here

    Before compiling the ulp library you need select this feature from the menuconfig. Go to "examples" -> "wifi" -> "scan" and in Terminal / command prompt type:

    make menuconfig
    

    The following screen will pop up:

    Menuconfig.png

    Go to "Component config" -> ESP32-sepific and then choose the "Enable Ultra Low Power (ULP) Coprocessor as shown below:

    ULP menuconfig.png

    Now exit from menuconfig and in the terminal type:

    make -j4
    

    to compile the libraries. The ULP library can now be found in "examples" -> "wifi" -> "scan" -> "build" -> "ulp"



  • I would like to see an example of an I2C sensor, read it value, check if below or above a threshold and then wake up the main CPU.

    To make it work: (missing assumptions)
    I had to $ export IDF_PATH=~/pycom-esp-idf
    and install much more dev packages like sudo apt-get install build-essential (Windows ubuntu 18.04)



  • Nice, will we be seeing a part 2? :-)


Log in to reply
 

Pycom on Twitter