Search found 21 matches

by zhaozhaozhao
Mon Sep 27, 2021 12:21 pm
Forum: ESP-IDF 中文讨论版
Topic: 有办法使ESP32-WROOM进入light-sleep或deep-sleep后,能保持连接?
Replies: 8
Views: 11306

Re: 有办法使ESP32-WROOM进入light-sleep或deep-sleep后,能保持连接?

你好, auto_light_sleep不需要对原代码作任何改动,睡眠和唤醒都是自动的。除了freertos/tikeless idle之外,还需要启用power management,请见 https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-pm-enable 。 如果需要在自动睡眠唤醒时调用自己的函数也是可以的,见 https://github.com/espressif/esp-idf/pull/4352 。 之前我试的esp_light_sleep_s...
by zhaozhaozhao
Sun Sep 26, 2021 8:48 am
Forum: ESP-IDF 中文讨论版
Topic: 有办法使ESP32-WROOM进入light-sleep或deep-sleep后,能保持连接?
Replies: 8
Views: 11306

Re: 有办法使ESP32-WROOM进入light-sleep或deep-sleep后,能保持连接?

我的idf版本是v4.2,这个自动浅睡模式因为要一直保持wifi,待机状态耗电也要大概5mA
by zhaozhaozhao
Sat Sep 25, 2021 6:47 pm
Forum: ESP-IDF 中文讨论版
Topic: 有办法使ESP32-WROOM进入light-sleep或deep-sleep后,能保持连接?
Replies: 8
Views: 11306

Re: 有办法使ESP32-WROOM进入light-sleep或deep-sleep后,能保持连接?

对的就是power management包,这个我前一阵子也在搞。默认的light_sleep_start()和deep_sleep_start()都会切断无线网络,请参阅 https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/sleep_modes.html#wifi-bt-and-sleep-modes 。 在esp_pm包里有一个叫automatic light sleep的设置,启用后不用显示地调用sleep_start函数,freertos检测到后续没有任务时就会自动进入浅睡眠...
by zhaozhaozhao
Sat Sep 25, 2021 6:34 pm
Forum: ESP-IDF
Topic: What is a good practice to transfer image data through MQTT
Replies: 0
Views: 2273

What is a good practice to transfer image data through MQTT

Hello all, again thanks for your time in advance. I am using an ArduCAM Mini 2MP Plus camera module for my application. This camera module has an internal JPEG compressor and outputs compressed image binary. Now my idea is transfer the binary directly to an edge device (Nodered) through MQTT and ren...
by zhaozhaozhao
Tue Sep 21, 2021 8:59 am
Forum: ESP-IDF
Topic: ESP I2C: Read a specific byte in ESP32 slave inner buffer?
Replies: 2
Views: 3057

Re: ESP I2C: Read a specific byte in ESP32 slave inner buffer?

Yeah maybe few people have the same demand. From the master side I want to read an arbitary byte, say the second byte in the slave ring buffer. Or from the 5th to the 10th byte in the salve ring buffer. From the slave side I want to clear the ring buffer before writing new content into it, so that t...
by zhaozhaozhao
Mon Sep 20, 2021 1:19 pm
Forum: ESP-IDF
Topic: ESP I2C: Read a specific byte in ESP32 slave inner buffer?
Replies: 2
Views: 3057

ESP I2C: Read a specific byte in ESP32 slave inner buffer?

Hello all, I want to transfer data between two ESP32 through I2C instead of ESP-NOW. When the ESP32 is set as a slave device, it maintans a slave address and an internal ring buffer. The protocol used by ESP is: after receiving the slave address, the slave device will immediately send N bytes to the...
by zhaozhaozhao
Sat Aug 07, 2021 5:48 am
Forum: ESP-IDF
Topic: periodically wake up in light sleep mode
Replies: 4
Views: 5741

Re: periodically wake up in light sleep mode

I had the same problem and used this: https://github.com/espressif/esp-idf/pull/4352 Although if I was doing it today I'd simply put a callback in esp_light_sleep_start (just before it returns). Hopefully IDF will have something like that in future. Thanks. It is good to know that there is a callba...
by zhaozhaozhao
Sat Aug 07, 2021 5:32 am
Forum: ESP-IDF
Topic: periodically wake up in light sleep mode
Replies: 4
Views: 5741

Re: periodically wake up in light sleep mode

Hello @zhaozhaozhao have you had a look at the light-sleep example? It uses `esp_sleep_get_wakeup_cause()` to figure out the wake up reason. https://github.com/espressif/esp-idf/tree/master/examples/system/light_sleep Thanks Felix Thanks, but do you how do you call the function in automatic light s...
by zhaozhaozhao
Fri Aug 06, 2021 9:29 am
Forum: ESP-IDF
Topic: periodically wake up in light sleep mode
Replies: 4
Views: 5741

periodically wake up in light sleep mode

Hello ESPers, how do you wake up the ESP32 board in light sleep mode periodically and execute a certain function? In deep sleep mode I can check the wakeup reason at the beginning of the main function. However in light sleep mode the board just continues from where it stops right? Is there any inter...
by zhaozhaozhao
Thu Jun 24, 2021 8:45 pm
Forum: ESP-IDF
Topic: Missing the first rising edge when waking up
Replies: 6
Views: 6515

Re: Missing the first rising edge when waking up

To me waiting for the two GPIO rising edges, storing direction bit based on which one came first, waking up the main cores with the ULP and reading that bit from the wake up interrupt would be elegant, not overkill. But I'm just an old assembler writer :D Hi Victor, yeah, at last I have to turn to ...