Page 1 of 1
Question about ULP processor
Posted: Sun Mar 31, 2019 10:58 pm
by gerardpalk
I am planning on building a weather station using the ESP32. I want to be able to use the deep sleep mode, and allow it to wake every 5 mins and read some instruments and post the data to a website. However, while asleep I would like it to monitor a tipping bucket rain gauge (essentially a pulse counter). Question. Does code on the ULP continue to execute when the board wakes up and goes to normal power mode. So when it is awake, will the counter still be running on the ULP processor? I found some of the documentation on the ULP mode a bit ambiguous about this.
Re: Question about ULP processor
Posted: Sun Mar 31, 2019 11:20 pm
by ESP_igrr
Yes, unless you stop the ULP periodic wake up timer, ULP will keep waking up and running while the main CPU is active.
You can check
https://github.com/espressif/esp-idf/bl ... system/ulp example, it should be pretty close to what you need. The only difference seems to be that the example is set to wake up after a given number of pulses, rather than a fixed amount of time. However it is pretty easy to change that, by enabling deep sleep wake up from timer.
Re: Question about ULP processor
Posted: Mon Apr 01, 2019 3:05 am
by gerardpalk
Thanks so much for the quick response.
Re: Question about ULP processor
Posted: Thu Mar 02, 2023 12:35 pm
by PeteDD
Re: Question about ULP processor
Posted: Fri Mar 03, 2023 1:51 am
by ESP_krzychb
Hi PeteDD,
In the meantime, the RISC-V version of ULP was introduced in the new ESP chip series and several new examples have been added.
Here are the links:
- ULP-FSM:
https://github.com/espressif/esp-idf/tr ... em/ulp_fsm
- ULP-RISC-V:
https://github.com/espressif/esp-idf/tr ... /ulp_riscv
See "Supported Targets" in the example README.md what example is for what chip series(s).
Re: Question about ULP processor
Posted: Mon Mar 06, 2023 7:45 pm
by PeteDD
...
Thank you. I am still at a loss as to how to build this example (the pulse_cnt one) using Visual Studio and Platformio.
Trying the esp32, the espressif32, and the arduino frameworks, none work. I get "Error: This board doesn't support esp32 framework!" from the esp frameworks after a clean. And with the Arduino framework, I've have been playing a "sack-a-mole" game trying to find missing .h files and now missing ulp_ variables.
Any guide for getting this working in platformio?
my platformio.ini:
Code: Select all
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
;framework = espressif32
monitor_speed = 115200
lib_ldf_mode = deep
lib_extra_dirs = ~/Documents/Arduino/libraries
board_build.partitions = default_partitions.csv
build_flags =
-I./src/
-I./ulp/
-DCORE_DEBUG_LEVEL=5
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-fmax-errors=5
Re: Question about ULP processor
Posted: Fri Mar 10, 2023 4:09 pm
by PeteDD
Still hoping someone might know how to get this working under PlatformIO and share that knowledge with me.
Thanks all!
Re: Question about ULP processor
Posted: Fri Jul 07, 2023 2:16 pm
by PeteDD
Still hoping on hope that someone has figured this out for ESP32-S3...
Anyone?? Buhler?