mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos/portmux: increase portmux timeouts to avoid crashing when using debug feature
Closes: https://github.com/espressif/esp-idf/issues/3629#
This commit is contained in:
parent
b3b7fcf51c
commit
fe6bc06366
@ -156,7 +156,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user