espressif | all espressif stuff
kandi X-RAY | espressif Summary
kandi X-RAY | espressif Summary
espressif stuff (i.e. ESP32, ESP8266).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of espressif
espressif Key Features
espressif Examples and Code Snippets
Community Discussions
Trending Discussions on espressif
QUESTION
I'm working on an aws/amazon-freertos project. In there I found some unusual error "A stack overflow in task iot_thread has been detected".
Many time I got this error and somehow I managed to remove it by changing the code.
I just want to know what this error means actually?
As per what I know, it simply means that the iot_thread ask stack size is not sufficient. So it's getting overflow.
Is this the only reason why this error comes or can there be another reason for this?
If yes then where should I increase the stack size of the iot_thread task?
Full Log:
...ANSWER
Answered 2021-Jun-14 at 22:05It simply means that the iot_thread ask stack size is not sufficient. [...] Is this the only reason why this error comes or can there be another reason for this?
Either it is insufficient you your stack usage is excessive (due to recursion error or instantiation of instantiation of large objects or arrays. Either way the cause is the same. Whether it is due insufficient stack or excessive stack usage is a matter of design an intent.
If yes then where should I increase the stack size of the iot_thread task?
The stack for a thread is assigned in the task creation function. For a dynamically allocated stack that would be the xTaskCreate()
call usStackDepth
parameter:
QUESTION
I m working on an ESP32 project, where I m fetching some array value from a file that is saved in spiffs. After fetching the value in sending the raw value of IR using IRsend function and after that sending MQTT acknowledgement to aws. But at publishing time I m getting the error stack overflow error. Sending the acknowledgement
...ANSWER
Answered 2021-Jun-04 at 09:56While creating the task iot_thread
(presumably by calling xTaskCreate()
or xTaskCreatePinnedToCore()
) you've allocated insufficient stack space. Since you haven't posted the code where you create it, I can't be more specific. Start by increasing your current stack 2 times, see if it still crashes. If that doesn't help, repeat.
The usual approach for determining a task's stack size is to set the stack very large (perhaps 8-16 KiB) and let the task run its more stack-intensive stuff for a while. Then use the task monitoring functionality in vTaskGetInfo()
to see how much unused stack it has. Finally you can reduce the stack size to the actually used amount plus a sufficient reserve. I tend to keep 1-2 KiB of stack in reserve.
QUESTION
Using pin 26 for ADC seems to be discouraged in Toit.
From what I can see on https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc.html pin 26 should have an ADC converter, so what is the reason for that?
...ANSWER
Answered 2021-May-06 at 10:58The ESP32 is limited around ADC2:
Since the ADC2 module is also used by the Wi-Fi, only one of them could get the preemption when using together, which means the adc2_get_raw() may get blocked until Wi-Fi stops, and vice versa.
Therefore I suggest using ADC1-pins if WiFi is used for connectivity.
QUESTION
A freind and I are working together on an ESP32 webserver, and we have hit a wall. My buddie has pretty much given up on it, and I am less skilled than him.
We have the following functions, which compile fine, but cause the ESP32 to crash.
After lots of debugging I am pretty certain the crash occurs when trying to return c
ANSWER
Answered 2021-Apr-26 at 20:54You are returning a pointer to an automatic (i.e. stack-based) variable. That variable goes away when sdcard_list_files
returns, leaving the pointer 'dangling`.
One solution is to declare c
as static
. Another (in C++) would be to return a std::optional , 6>>
.
QUESTION
I have written a base 64 encoding / decoding library for the Arduino IDE (yes, I am aware such libraries already exist. This is for my own education as much as anything practical). My target microcontroller is an Espressif ESP32.
In my base64 decoding function, the index variable i
is affected by the presence of a Serial.println()
debug statement. It is the strangest thing I have ever seen and I cannot figure out why it should make a difference if there is debug printing or not.
Using the test program base64.ino
and the b64.cpp
functions below, here are two samples of my serial output. In the first example, I'm using a Serial.println(i);
in the function b64dec()
just after the for loop. In the second example, the Serial.println(i);
is commented out. That is the only difference and I get two drastically different results.
Am I missing something here? Is it a compiler optimization gone wonky? My understanding of C variable scoping is that there are only global, function, and parameter levels. The i
in the for loop should be the same as the int i = 0;
a few lines above it. I don't believe it's buffer eoverflow either, since the debugging output of 13 for the decoded length is accurate for a 12 character message and its NULL terminator.
This is what I expect to get any time I run it:
...ANSWER
Answered 2021-Apr-20 at 08:36You have declared an array of 4 chars:
QUESTION
I am learning to write apps on ESP32 platform. When I was trying to compile my code, I got this error from linker:
undefined reference to `Serial_Init'
Where Serial_Init is a function declared in a file serial_cli.h which is in the same directory and workspace. What's more, I declared some macros there, and can use them no problem in my code, so I really don't understand where the error comes from. Here's serial_cli.h:
...ANSWER
Answered 2021-Apr-11 at 15:00You need to add "serial_cli.c" to your main/CMakeLists.txt
. Something like this:
QUESTION
I just bought an ESP32-S, which looks like this : https://99tech.com.au/product/esp32-s-ai/, except the one I bought only have the writing "ESP32-S" and the espressif symbol instead of AI thinker symbol.
I have been searching the internet for a week for a specific tutorial for this "board" and found nothing. what I have found is mostly that there is ESP32, ESP32-S2, ESP32 WROOM, ESP32 WROVER... but which one is my esp32-S? is it the same with esp32 or is it the esp32 wroom or something else? if I am going to program this using platformio, which board should I pick? or does it matter which board?
thank you in advance
...ANSWER
Answered 2021-Feb-04 at 08:16It appears to be compatible with the ESP32 WROOM module.
QUESTION
I'm setting up Linux device to act as BLE host, and ESP32 to work as a BLE controller over UART.
I'm using BlueZ v5.55, with btattach and bluetoothctl utilities, and bluetoothd running in the background. However, after finishing the setup bluetoothctl
still says No default controller available
.
ANSWER
Answered 2021-Feb-05 at 16:38After a few days, I have found a solution of this problem.
I have also used nRF52 DK as an alternative to better understand if the problem lies on the side of ESP32 controller, or on the side of Linux host. Because the nRF HCI UART worked on Ubuntu 20.04, but didn't work on my embedded Linux, I looked deeper on the Linux host side.
After starting BlueZ daemon with
bluetoothd -n
it showed more details:
QUESTION
I'm currently working with ESP-NOW with the esp-idf. Below is a snippet from their espnow examples. I need some help in identifying what does this line means, but I'm not quite sure what to google. Can someone point me in the correct direction?
...ANSWER
Answered 2021-Feb-05 at 11:03You've truncated the relevant part from the definition of struct example_espnow_send_param_t
- the field buffer
:)
QUESTION
I'm trying to CMake a project. I'm new to using it so I guess it must be very obvious for someone familiar with CMake: In the main folder where main.c is residing I'm including
...ANSWER
Answered 2021-Feb-03 at 14:16#include
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install espressif
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page