freertos: Fix SMP FreeRTOS interrupt watchdog feeding

This commit fixes how SMP FreeRTOS feeds the INT WDT. Previously, the
port used vApplicationTickHook(). Now, all cores will feed the INT WDT
in xPortSysTickHandler().
This commit is contained in:
Darian Leung 2022-05-05 17:56:44 +08:00
parent eec3ac83f4
commit 9b5601b7c7
2 changed files with 7 additions and 11 deletions

View File

@ -198,7 +198,11 @@ This file get's pulled into assembly sources. Therefore, some includes need to b
#else
#define configUSE_IDLE_HOOK 0
#endif
#if CONFIG_FREERTOS_USE_TICK_HOOK
#define configUSE_TICK_HOOK 1
#else
#define configUSE_TICK_HOOK 0
#endif
#if CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE
#define configCHECK_FOR_STACK_OVERFLOW 0
#elif CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL

View File

@ -620,15 +620,14 @@ BaseType_t xPortSysTickHandler(void)
portbenchmarkIntLatency();
traceISR_ENTER(SYSTICK_INTR_ID);
BaseType_t ret;
esp_vApplicationTickHook();
if (portGET_CORE_ID() == 0) {
//Only Core 0 calls xTaskIncrementTick();
// FreeRTOS SMP requires that only core 0 calls xTaskIncrementTick()
ret = xTaskIncrementTick();
} else {
//Manually call the IDF tick hooks
esp_vApplicationTickHook();
ret = pdFALSE;
}
if(ret != pdFALSE) {
if (ret != pdFALSE) {
portYIELD_FROM_ISR();
} else {
traceISR_EXIT();
@ -657,13 +656,6 @@ void __attribute__((weak)) vApplicationStackOverflowHook( TaskHandle_t xTask, c
}
#endif
#if ( configUSE_TICK_HOOK > 0 )
void vApplicationTickHook( void )
{
esp_vApplicationTickHook();
}
#endif
#if CONFIG_FREERTOS_USE_MINIMAL_IDLE_HOOK
/*
By default, the port uses vApplicationMinimalIdleHook() to run IDF style idle