Official development framework for ESP32 microcontroller (as opposed to Arduino). Abbreviation for Espressif IoT Development Framework.
Questions tagged [esp-idf]
377 questions
0
votes
4 answers
How to resync time from NTP server in esp-idf?
I use an ESP32 with esp-idf. I need correct time, therefore i'm trying resync time with NTP server.
I use this example.[1]: https://github.com/espressif/esp-idf/tree/master/examples/protocols/sntp
When i call again the obtain_time() method the…

gyb001
- 19
- 1
- 4
0
votes
1 answer
Why OR every SPI register of the SX1272 with 0x80
I use a library from GitHub that gives the functionality to read and write to the register of the SX1272 with SPI.
It works great but i dont understand why the Lora_write_ref() function OR's every register with 0x80.
So when lets say I want to write…

Erwin
- 3
- 1
- 2
0
votes
1 answer
unable to convert raw ADC1 reading to voltage
I could not understanding why ESP-IDF voltage calculation if apply to convert the raw reading from GPIO39 would result in crash ?
uint32_t voltage = esp_adc_cal_raw_to_voltage(read_raw, adc_chars);
Below is the simple source code
#include…

TSG anti SO dark forces
- 304
- 2
- 18
-1
votes
1 answer
platform io and partition tables
I am working on a project with VSCode and Platform IO that needs a new partition table. I have copied the partition csv file in the root of the project. When i compile the project i get this error message
This is the partition table that i…

Softtoon
- 23
- 4
-1
votes
2 answers
How to print error and stop further console monitor spam when developing on ESP32 in ESP-IDF?
I am using Eclipse with ESP-IDF 5.0.2 to develop for ESP32 C3.
In this code, esp_wifi_set_config call always fails because WiFi is not initialized.
#include
#include "esp_wifi.h"
void app_main(void) {
printf("hello\n");
…

mik13ST
- 95
- 7
-1
votes
1 answer
ESP-IDF: idf.py build fails with cmake error (unknown cmake command idf_component_register)
idf.py build consistently fails on my windows install of esp-idf, I installed it using the tools provided in espressif's documentation, here are the logs:
Logs
I tried reinstalling to no avail. Other than that I don't know what to do exactly since…

A R
- 1
- 1
-1
votes
1 answer
ESP32 debugging over serial port from VSCode?
I'm developing firmware on a custom board and would like breakpoints and step-through debugging. I can't retroactively fit JTAG.
What's the best way to add breakpoint debugging in VSCode on Windows? I print general logs to the serial port and would…

tpbedford
- 1
- 1
-1
votes
1 answer
I am running a code to read temperature and humidity sensor (AHT10), but the output is 7 always
Below given the code for reading AHT10 sensor using ESP-IDF.The output to the code is shown below.
It is not reading the temperature instead it prints only 7 always. Please help me to solve the problem
###########################…

Shivashankar Sukumar
- 29
- 2
-1
votes
2 answers
How to make a set of mutually dependent classes globally accessible?
I have a number of mutually dependent classes that work OK when used within one single scope. Now I want to make instances of them work in several procedures/scopes. It is probably my lack of in-depth knowledge of C++ that gives me trouble to…

f ckx
- 49
- 1
- 6
-1
votes
1 answer
start a freeRTOS task with a function
is it safe to create a task with a variable?
TaskHandle_t blablaTaskHandle= NULL;
...
bool startTask = readAVariable();
if(startTask ){
xTaskCreate(&blabla, "blabla", 2048, NULL, 2, &blablaTaskHandle);
}
And also suspend it and resume:
//…

D_A_8
- 9
- 4
-1
votes
1 answer
How to include a c++ library in a c project using Cmake
I'm a begginer on c, c++ and Cmake.
I've started from a project that allows me to send the data to Google Cloud IoT Core which is written in C: https://github.com/espressif/esp-google-iot/blob/master/examples/smart_outlet/README.md
As you can see I…

tomascharad
- 3,156
- 23
- 24
-1
votes
1 answer
Cross compile to esp-idf
I would like to use this library in ESP32:
https://github.com/CoolProp/CoolProp.git
It needs to be cross compiled.
And I have searched half the internet but no luck.
Anyone? Somewhere?

Lasse
- 111
- 1
- 9
-1
votes
1 answer
Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed) error shows when i use ESP now protocol
This error shows in my serial monitor see the code below for ESP32
and please help me to solve
Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached
memory region accessed) Core 1 register dump: PC : 0x400d1580 PS
: 0x00060034 …

Smit Babariya
- 9
- 3
-2
votes
1 answer
How to ensure that multiplication between unsigned integer will yield uint64 in C
I'm coding for an ESP32 that receives data through MQTT to set its deep sleep time. The problem is that sometimes the ESP32 will not sleep for the requested time. It is fine for smaller times < 1hr, but when asking for > 4hrs it usually sleeps for 5…

DCrown
- 57
- 7
-3
votes
2 answers
Function Pointer Initialization in C/C++
As I was going through a ESP IDF's documentation; I saw that a function pointer was initialized in a certain way that does not make sense to…

Rafay Shams
- 13
- 1
- 5