Question about ULP processor

gerardpalk
Posts: 2
Joined: Sun Mar 31, 2019 10:35 pm

Question about ULP processor

Postby gerardpalk » Sun Mar 31, 2019 10:58 pm

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.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Question about ULP processor

Postby ESP_igrr » Sun Mar 31, 2019 11:20 pm

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.

gerardpalk
Posts: 2
Joined: Sun Mar 31, 2019 10:35 pm

Re: Question about ULP processor

Postby gerardpalk » Mon Apr 01, 2019 3:05 am

Thanks so much for the quick response.

PeteDD
Posts: 45
Joined: Sat Sep 24, 2022 5:22 pm

Re: Question about ULP processor

Postby PeteDD » Thu Mar 02, 2023 12:35 pm

Sadly, the URL mentioned above is no longer there.

https://github.com/espressif/esp-idf/bl ... system/ulp

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Question about ULP processor

Postby ESP_krzychb » Fri Mar 03, 2023 1:51 am

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).

PeteDD
Posts: 45
Joined: Sat Sep 24, 2022 5:22 pm

Re: Question about ULP processor

Postby PeteDD » Mon Mar 06, 2023 7:45 pm

Quoting from above...

Here are the links:

- ULP-FSM: https://github.com/espressif/esp-idf/tr ... em/ulp_fsm
...

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

PeteDD
Posts: 45
Joined: Sat Sep 24, 2022 5:22 pm

Re: Question about ULP processor

Postby PeteDD » Fri Mar 10, 2023 4:09 pm

Still hoping someone might know how to get this working under PlatformIO and share that knowledge with me.

Thanks all!

PeteDD
Posts: 45
Joined: Sat Sep 24, 2022 5:22 pm

Re: Question about ULP processor

Postby PeteDD » Fri Jul 07, 2023 2:16 pm

Still hoping on hope that someone has figured this out for ESP32-S3...

Anyone?? Buhler?

Who is online

Users browsing this forum: Google [Bot] and 73 guests