Search found 2067 matches

by ESP_igrr
Mon Sep 24, 2018 12:38 pm
Forum: ESP32 Arduino
Topic: Starting WiFi with custom mac address
Replies: 2
Views: 8500

Re: Starting WiFi with custom mac address

There is an example of specifying custom MAC addresses in ESP-IDF: https://github.com/espressif/esp-idf/blob/master/examples/system/base_mac_address/main/base_mac_address_example_main.c. Basically, you need to call esp_base_mac_addr_set before starting WiFi. To get the default address, you can use e...
by ESP_igrr
Fri Sep 21, 2018 4:09 pm
Forum: ESP-IDF
Topic: C++11 threads
Replies: 4
Views: 7698

Re: C++11 threads

No, that's an internal structure which contains the handle: https://github.com/espressif/esp-idf/bl ... read.c#L51
by ESP_igrr
Fri Sep 21, 2018 7:36 am
Forum: General Discussion
Topic: Delayed/latched re-triggered wake-up
Replies: 4
Views: 4956

Re: Delayed/latched re-triggered wake-up

When ULP is running constantly, current consumption will be closer to 1.4mA. It takes about 4 cycles for the ULP to wake up and go to sleep, the rest is determined by the program being run. For simple programs which only check GPIOs you can expect around 15uA current consumption. Above mentioned ulp...
by ESP_igrr
Thu Sep 20, 2018 3:52 pm
Forum: General Discussion
Topic: Delayed/latched re-triggered wake-up
Replies: 4
Views: 4956

Re: Delayed/latched re-triggered wake-up

Depending on duty cycle of your ULP program, ULP might be an option. Based on your description, duty cycle can be made very low — it would be sufficient to let ULP wake up every, say, 100ms and keep working for a few 100us. This would result in average current consumption little over the deep sleep ...
by ESP_igrr
Thu Sep 20, 2018 2:33 pm
Forum: ESP-IDF
Topic: Using esp_ping.h
Replies: 1
Views: 3848

Re: Using esp_ping.h

Sorry, this is a regression in latest master. Will be fixed shortly.
by ESP_igrr
Thu Sep 20, 2018 2:31 pm
Forum: ESP-IDF
Topic: C++11 threads
Replies: 4
Views: 7698

Re: C++11 threads

C++ threading is implemented on top of pthreads (that's the standard implentation in libstdc++v3) which in turn is implemented on top of FreeRTOS in ESP-IDF. So all threads (pthreads, c++11 threads) are actually FreeRTOS threads, just wrapped with some levels of indirection. Same applies to mutexes....
by ESP_igrr
Thu Sep 20, 2018 7:33 am
Forum: General Discussion
Topic: Convert NTP timestamp to UNIX timestamp
Replies: 8
Views: 13356

Re: Convert NTP timestamp to UNIX timestamp

Perhaps something like

Code: Select all

struct timeval tv;
gettimeofday(&tv, NULL);
int64_t milliseconds = tv.tv_sec * 1000LL + tv.tv_usec / 1000LL;
by ESP_igrr
Wed Sep 19, 2018 10:45 pm
Forum: General Discussion
Topic: Synchronizing access to file from different tasks
Replies: 10
Views: 16713

Re: Synchronizing access to file from different tasks

Such crash typically indicates memory corruption, when something overwrites a member of the semaphore (queue) structure. Can you please try to set heap checking level to "comprehensive" in menuconfig?
by ESP_igrr
Wed Sep 19, 2018 2:59 pm
Forum: General Discussion
Topic: Convert NTP timestamp to UNIX timestamp
Replies: 8
Views: 13356

Re: Convert NTP timestamp to UNIX timestamp

That's going to be =now*1000
by ESP_igrr
Wed Sep 19, 2018 2:26 pm
Forum: General Discussion
Topic: Synchronizing access to file from different tasks
Replies: 10
Views: 16713

Re: Synchronizing access to file from different tasks

What kind of file system is that, FAT or SPIFFS, and what is the storage, SD card (SDMMC or SPI?) or flash? Corruption by 2 bytes would have pointed to a potential DMA issue (such as when one attempts to use an unaligned DMA buffer) but 4 byte shift means that this is likely something else. Can you ...