kopia lustrzana https://github.com/espressif/esp-idf
freertos/portmux: increase portmux timeouts to avoid crashing when using debug feature
Closes: https://github.com/espressif/esp-idf/issues/3629#release/v4.0
rodzic
b23f8e21cd
commit
e29da11f6b
|
@ -140,7 +140,7 @@ menu "Common ESP-related"
|
|||
config ESP_INT_WDT_TIMEOUT_MS
|
||||
int "Interrupt watchdog timeout (ms)"
|
||||
depends on ESP_INT_WDT
|
||||
default 300 if !ESP32_SPIRAM_SUPPORT
|
||||
default 600 if !ESP32_SPIRAM_SUPPORT
|
||||
default 800 if ESP32_SPIRAM_SUPPORT
|
||||
range 10 10000
|
||||
help
|
||||
|
|
|
@ -83,6 +83,11 @@ extern "C" {
|
|||
#include "esp_private/crosscore_int.h"
|
||||
#include "esp_timer.h" /* required for FreeRTOS run time stats */
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#include "esp32/clk.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2BETA
|
||||
#include "esp32s2beta/clk.h"
|
||||
#endif
|
||||
|
||||
#include <esp_heap_caps.h>
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ PORTMUX_AQUIRE_MUX_FN_NAME(portMUX_TYPE *mux, int timeout_cycles) {
|
|||
bool set_timeout = timeout_cycles > portMUX_NO_TIMEOUT;
|
||||
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
|
||||
if (!set_timeout) {
|
||||
timeout_cycles = 10000; // Always set a timeout in debug mode
|
||||
timeout_cycles = 1000000 * (esp_clk_cpu_freq() / 1000000); // Always set a timeout in debug mode
|
||||
set_timeout = true;
|
||||
}
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue