mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'feature/portmux_debug_bump_timeout_v4.0' into 'release/v4.0'
bugfix/freertos: increase portmux timeouts to avoid crashing when using debug feature (v4.0) See merge request espressif/esp-idf!13750
This commit is contained in:
@ -140,7 +140,7 @@ menu "Common ESP-related"
|
|||||||
config ESP_INT_WDT_TIMEOUT_MS
|
config ESP_INT_WDT_TIMEOUT_MS
|
||||||
int "Interrupt watchdog timeout (ms)"
|
int "Interrupt watchdog timeout (ms)"
|
||||||
depends on ESP_INT_WDT
|
depends on ESP_INT_WDT
|
||||||
default 300 if !ESP32_SPIRAM_SUPPORT
|
default 600 if !ESP32_SPIRAM_SUPPORT
|
||||||
default 800 if ESP32_SPIRAM_SUPPORT
|
default 800 if ESP32_SPIRAM_SUPPORT
|
||||||
range 10 10000
|
range 10 10000
|
||||||
help
|
help
|
||||||
|
@ -83,6 +83,11 @@ extern "C" {
|
|||||||
#include "esp_private/crosscore_int.h"
|
#include "esp_private/crosscore_int.h"
|
||||||
#include "esp_timer.h" /* required for FreeRTOS run time stats */
|
#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>
|
#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;
|
bool set_timeout = timeout_cycles > portMUX_NO_TIMEOUT;
|
||||||
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
|
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
|
||||||
if (!set_timeout) {
|
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;
|
set_timeout = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user