EasyManua.ls Logo

Espressif Systems ESP - Page 137

Default Icon
191 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4. Software framework
4.9.18 When using the ESP-WROOM-02D module with a battery for power supply, are
there any risks in frequently formatted reading and writing ash as the battery is
low (the module barely starts up)?
Frequent formatting and read/write operations on 󰝙ash storage in low power situations may have some
risks. It may not work properly or be susceptible to cause errors under low power conditions. In addition,
frequent formatting and read/write operations in this situation may lead to the following risks:
Data loss or corruption: Flash storage may not be able to write data properly under low power
conditions. Frequent formatting and read/write operations may result in data loss or corruption.
Module crash or damage: Frequent formatting and read/write operations on 󰝙ash storage in low
power conditions will consume the modules power, which may cause the module to crash or
damage.
Therefore, it is recommended to minimize access and operations on 󰝙ash storage in low power conditions
and avoid frequent formatting and read/write operations. If formatting and read/write operations are
necessary, ensure that the module has su󰝚cient power, backup data before the operation to prevent data
loss, use low power mode and optimize code to minimize power consumption.
4.9.19 How to check the maximum stack size used by a thread for ESP32?
You can call the UBaseType_t uxTaskGetStackHighWaterMark(TaskHandle_t xTask) function. This function
will return the minimum remaining stack space after the task is started.
4.9.20 What is the meaning of the SW_CPU_RESETlog when using ESP32?
On ESP32, the SW_CPU_RESETlog is usually caused by abnormal termination of the program.
ESP32 has two cores, the main core and the assistant core. In some cases, if the program is executed
on the main core and some abnormal situations occur, such as accessing illegal addresses or unhandled
interrupts, it may cause the main core to enter into an exception state and restart. When this happens,
ESP32 will print theSW_CPU_RESETlog on the serial terminal (UART). In addition, when devel-
oping applications using ESP-IDF, it is also possible to call the esp_restart() function in the application
to restart ESP32. In this case, ESP32 will also print theSW_CPU_RESETlog on the serial terminal.
It should be noted that the appearance of the SW_CPU_RESETlog does not necessarily mean that
there is a problem with the program or ESP32 hardware. It may be a normal phenomenon caused by
some abnormal situations. However, if the program frequently encounters exceptions and restarts, it
is necessary to debug and troubleshoot the problem. You can determine the reason of the problem by
checking the program log and hardware device status.
4.9.21 For ESP32 products, when testing NVS separately, I found it occupies a lot of
memory. What is the reason?
Please check the partition table settings. It is recommended to set a smaller NVS data partition in the partition
table to test. The larger the NVS data partition setting, the more memory it will occupy.
Espressif Systems 120
Submit Document Feedback
Release master

Table of Contents