by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Sagar Jaiswal
@sagar448
thats what i've been using
Mike Dunston
@atanisoft
cool
as mentioned, most of the time functions run through the esp_timer code from what I've seen
good to know that a few functions are more reliable
lbernstone
@lbernstone
based on rtc- not really more reliable...
Mike Dunston
@atanisoft
well, through deep sleep
esp_timer is based on cpu start time and always starts at zero
lbernstone
@lbernstone
the rtc really does need to be supplemented at least once a day...
Mike Dunston
@atanisoft
yup
at least
chegewara
@chegewara
more likely every hour
Mike Dunston
@atanisoft
at least an sntp call is pretty cheap as long as the dns entry is in the cache
chegewara
@chegewara
hi, does anyone know if its possible to set touch pad wake up sensitivity?
lbernstone
@lbernstone
put another sheet of acetate over the top :smile:
chegewara
@chegewara
it works nicely with thick glass if i have option to control sensitivity, but wake up from deep sleep option seems to not have such control
lorol
@lorol
Did anyone measure in practice what a real application power consumption of the ESP32 itself is with deep sleep vs. normal running? I think, in most cases just with other means you can get satisfactory results only by shutting off screen, leds etc.
Sagar Jaiswal
@sagar448
Quick question @atanisoft You guys were talking about timers yesterday, does esp_timer_get_tine() survive deep sleep?
as in it doesnt reset after deep sleep right?
lbernstone
@lbernstone
@lorol : deep sleep can get down to ~10 microamps. Typical operation with wifi is around 60 milliamps at 80MHz. If the cpu power is dominating your use, that is 3.5 orders of magnitude difference. If you are running screens and motors, then it doesn't matter, and realistically you won't be able to run on a battery anyhow. If you are trying to eke out every watthour, then it is really important.
Mike Dunston
@atanisoft
@sagar448 esp_timer_get_time() resets to zero on startup.
Unexpected Maker
@UnexpectedMaker
Hey folks, so is there no software SPI on the S2 right now? I have to sue VSPI if I want to use my own IO for MOSI + CLK ?
lbernstone
@lbernstone
AFAIK SPI uses the gpio matrix in esp32s2, but the code has been heavily reworked with #if ESP32S2 code . Perhaps you should post your error.
chegewara
@chegewara
I can easily use any pins for SPI, either pins 34-38 or 6-10 works good to me
Mike Dunston
@atanisoft
@chegewara what issues did you face with 6-10?
chegewara
@chegewara
None, everything works fine with sd card or lora device
Mike Dunston
@atanisoft
oh ok, misread it as you had issues with those...
Victor Aprea
@vicatcu
hey guys, i'm experiencing what I image is a memory utilization issue concerning Wi-Fi / BLE co-existence
Victor Aprea
@vicatcu
after starting up BLE stack, I print out free RAM and get: "Free Memory: 6772" for example
if I then write to a BLE characteristic that causes an attempt to connect to Wi-Fi I sometimes get a system reset like this:
SSID Written: ogskg
Initiating Wi-Fi Connect [SSID]
Processing CONNECT...
Setting Wi-Fi Station Mode
Using DHCP
Connecting to WiFi using PERSONAL security...E (121498) phy_init: failed to allocate memory for RF calibration data
abort() was called at PC 0x400f0b1d on core 0
Backtrace: 0x40092724:0x3ffefb40 0x40092955:0x3ffefb60 0x400f0b1d:0x3ffefb80 0x401335a4:0x3ffefbb0 0x401336a7:0x3ffefbe0 0x401339c6:0x3ffefc10 0x4012fc86:0x3ffefc40 0x40095873:0x3ffefc60 0x4008ee39:0x3ffefca0
Victor Aprea
@vicatcu
where that backtrace decodes to:
Decoding stack results
0x40092724: multi_heap_realloc_impl at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap.c line 131
0x40092955: verify_allocated_region at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c line 109
0x400f0b1d: cpu_configure_region_protection at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/soc/esp32/include/soc/cpu.h line 77
0x4008ee39: xQueueGenericSend at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c line 747
i'm on the edge of a RAM limitation right?
Mike Dunston
@atanisoft
yup
Victor Aprea
@vicatcu
<sigh>
BLE stack is a hog
what to do...
Victor Aprea
@vicatcu
uh huh... someday
:)
Stavros Korokithakis
@skorokithakis
Does anyone know what the minimal amount of pins to boot/program an ESP32-S2 is?
lbernstone
@lbernstone
You can do it with 4 using USB CDC. For UART you will need 5 (tx/rx/vdd/g/0). Being able to reset is not required, but will keep you from throwing the thing against the wall.
Clemens Kirchgatterer
@everslick
everslick @everslick is dancing in circles
Clemens Kirchgatterer
@everslick
@lbernstone thanks for the link
Stavros Korokithakis
@skorokithakis
@lbernstone Do you know which 4 are needed if I don't need to flash? I usually reset by power-cycling too, I'm interested in stable operation with having to solder the minimal amount of pins
Achraf Boussaada
@achraf-boussaada

I'm currently following the espressif documentation to read from an encrypted custom nvs parition using the recommended API, but unfortunately I'm getting an error when executing idf.py flash I get the following error:

undefined reference to `nvs_flash_read_security_cfg'
undefined reference to `nvs_flash_secure_init_partition'

This is my code snippet:

    // find partition with nvs_keys
    const esp_partition_t *partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA,
                                                                ESP_PARTITION_SUBTYPE_DATA_NVS_KEYS,
                                                                KEYS_PARTITION_LABEL);

    if (partition == NULL)
    {
        printf("Could not locate nvs_key partition. Aborting.");
    }

    // read nvs_keys from key partition
    nvs_sec_cfg_t cfg;
    esp_err_t err = nvs_flash_read_security_cfg(partition, &cfg);
    if (err != ESP_OK)
    {
        printf("Failed to read nvs keys (rc=0x%x)", err);
    }

    // initialize the custom nvs partition
    err = nvs_flash_secure_init_partition(PARTITION_LABEL, &cfg);
    if (err != ESP_OK)
    {
        printf("failed to initialize nvs partition (err=0x%x). Aborting.", err);
    };

Any information to better understand the problem is much appreciated.

lbernstone
@lbernstone
You need to include nvs_flash.h
Achraf Boussaada
@achraf-boussaada
I've already done that. I also checked if the functions existed in the SDK I have installed and they do.
lbernstone
@lbernstone
#ifdef CONFIG_NVS_ENCRYPTION