mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
Add option to disable brownout detector (#1784)
* Update defines.h * Update main.cpp
This commit is contained in:
@@ -16,7 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
// server_tflite.cpp
|
// server_tflite.cpp
|
||||||
//#define TASK_ANALYSIS_ON
|
//#define TASK_ANALYSIS_ON
|
||||||
|
|
||||||
|
// ######## debug options :
|
||||||
|
//#define DISABLE_BROWNOUT_DETECTOR
|
||||||
|
|
||||||
/* Uncomment this to keep the logfile open for appending.
|
/* Uncomment this to keep the logfile open for appending.
|
||||||
* If commented out, the logfile gets opened/closed for each log measage (old behaviour) */
|
* If commented out, the logfile gets opened/closed for each log measage (old behaviour) */
|
||||||
@@ -25,7 +27,7 @@
|
|||||||
|
|
||||||
//compiler optimization for tflite-micro-esp-examples
|
//compiler optimization for tflite-micro-esp-examples
|
||||||
#define XTENSA
|
#define XTENSA
|
||||||
#define CONFIG_IDF_TARGET_ARCH_XTENSA
|
//#define CONFIG_IDF_TARGET_ARCH_XTENSA //not needed with platformio/espressif32 @ 5.2.0
|
||||||
|
|
||||||
|
|
||||||
//ClassControllCamera + ClassFlowMakeImage + connect_wlan + main
|
//ClassControllCamera + ClassFlowMakeImage + connect_wlan + main
|
||||||
|
|||||||
@@ -40,9 +40,14 @@
|
|||||||
//#include "server_GPIO.h"
|
//#include "server_GPIO.h"
|
||||||
|
|
||||||
#ifdef ENABLE_SOFTAP
|
#ifdef ENABLE_SOFTAP
|
||||||
#include "softAP.h"
|
#include "softAP.h"
|
||||||
#endif //ENABLE_SOFTAP
|
#endif //ENABLE_SOFTAP
|
||||||
|
|
||||||
|
#ifdef DISABLE_BROWNOUT_DETECTOR
|
||||||
|
#include "soc/soc.h"
|
||||||
|
#include "soc/rtc_cntl_reg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern const char* GIT_TAG;
|
extern const char* GIT_TAG;
|
||||||
extern const char* GIT_REV;
|
extern const char* GIT_REV;
|
||||||
extern const char* GIT_BRANCH;
|
extern const char* GIT_BRANCH;
|
||||||
@@ -144,6 +149,10 @@ void task_MainInitError_blink(void *pvParameter)
|
|||||||
extern "C" void app_main(void)
|
extern "C" void app_main(void)
|
||||||
{
|
{
|
||||||
TickType_t xDelay;
|
TickType_t xDelay;
|
||||||
|
|
||||||
|
#ifdef DISABLE_BROWNOUT_DETECTOR
|
||||||
|
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
|
||||||
|
#endif
|
||||||
|
|
||||||
ESP_LOGI(TAG, "\n\n\n\n\n"); // Add mark on log to see when it restarted
|
ESP_LOGI(TAG, "\n\n\n\n\n"); // Add mark on log to see when it restarted
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user