Fix int wdt iram, fix some fallout of moving panic stuff to esp32

This commit is contained in:
Jeroen Domburg 2016-10-28 12:05:42 +08:00
parent 933b6bd94a
commit 4d8ad3c877
4 changed files with 6 additions and 5 deletions

View File

@ -157,7 +157,7 @@ config ULP_COPROC_RESERVE_MEM
choice ESP32_PANIC choice ESP32_PANIC
prompt "Panic handler behaviour" prompt "Panic handler behaviour"
default FREERTOS_PANIC_PRINT_REBOOT default ESP32_PANIC_PRINT_REBOOT
help help
If FreeRTOS detects unexpected behaviour or an unhandled exception, the panic handler is If FreeRTOS detects unexpected behaviour or an unhandled exception, the panic handler is
invoked. Configure the panic handlers action here. invoked. Configure the panic handlers action here.

View File

@ -24,6 +24,7 @@
#include <esp_types.h> #include <esp_types.h>
#include "esp_err.h" #include "esp_err.h"
#include "esp_intr.h" #include "esp_intr.h"
#include "esp_attr.h"
#include "soc/timer_group_struct.h" #include "soc/timer_group_struct.h"
#include "soc/timer_group_reg.h" #include "soc/timer_group_reg.h"
@ -66,7 +67,7 @@ void esp_int_wdt_init() {
//Not static; the ISR assembly checks this. //Not static; the ISR assembly checks this.
bool int_wdt_app_cpu_ticked=false; bool int_wdt_app_cpu_ticked=false;
void vApplicationTickHook(void) { void IRAM_ATTR vApplicationTickHook(void) {
if (xPortGetCoreID()!=0) { if (xPortGetCoreID()!=0) {
int_wdt_app_cpu_ticked=true; int_wdt_app_cpu_ticked=true;
} else { } else {
@ -82,7 +83,7 @@ void vApplicationTickHook(void) {
} }
} }
#else #else
void vApplicationTickHook(void) { void IRAM_ATTR vApplicationTickHook(void) {
if (xPortGetCoreID()!=0) return; if (xPortGetCoreID()!=0) return;
TIMERG1.wdt_wprotect=TIMG_WDT_WKEY_VALUE; TIMERG1.wdt_wprotect=TIMG_WDT_WKEY_VALUE;
TIMERG1.wdt_config2=CONFIG_INT_WDT_TIMEOUT_MS*2; //Set timeout before interrupt TIMERG1.wdt_config2=CONFIG_INT_WDT_TIMEOUT_MS*2; //Set timeout before interrupt

View File

@ -18,6 +18,6 @@
#define USED #define USED
#endif #endif
#ifdef CONFIG_FREERTOS_DEBUG_OCDAWARE #ifdef CONFIG_ESP32_DEBUG_OCDAWARE
const int USED uxTopUsedPriority = configMAX_PRIORITIES - 1; const int USED uxTopUsedPriority = configMAX_PRIORITIES - 1;
#endif #endif

View File

@ -121,7 +121,7 @@ endchoice
config FREERTOS_BREAK_ON_SCHEDULER_START_JTAG config FREERTOS_BREAK_ON_SCHEDULER_START_JTAG
bool "Stop program on scheduler start when JTAG/OCD is detected" bool "Stop program on scheduler start when JTAG/OCD is detected"
depends on FREERTOS_DEBUG_OCDAWARE depends on ESP32_DEBUG_OCDAWARE
default y default y
help help
If JTAG/OCD is connected, stop execution when the scheduler is started and the first If JTAG/OCD is connected, stop execution when the scheduler is started and the first