diff --git a/arch/tricore/src/common/tricore_main.c b/arch/tricore/src/common/tricore_main.c index 17181c99591..2d6708b7e30 100644 --- a/arch/tricore/src/common/tricore_main.c +++ b/arch/tricore/src/common/tricore_main.c @@ -28,8 +28,8 @@ #include #include "Ifx_Types.h" -#include "IfxScuWdt.h" #include "IfxCpu.h" +#include "IfxScuWdt.h" /**************************************************************************** * Private Functions @@ -43,9 +43,6 @@ static void core_main(void) * Enable the watchdogs and service them periodically if it is required */ - IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword()); - IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafetyWatchdogPassword()); - /* Wait for CPU sync event */ IfxCpu_emitEvent(&g_sync_event); @@ -66,6 +63,19 @@ static void core_main(void) void core0_main(void) { + /* All WDTs except WDTCPU0 and system watchdog WDTSYS are in + * disabled mode after Boot-FW execution. Disable the watchdog + * to ensure the normal startup of the system. + */ + +#if defined(CONFIG_ARCH_CHIP_AURIX_TC3XX) + IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword()); + IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafetyWatchdogPassword()); +#elif defined(CONFIG_ARCH_CHIP_AURIX_TC4XX) + IfxWtu_disableCpuWatchdog(IfxWtu_getCpuWatchdogPassword()); + IfxWtu_disableSystemWatchdog(IfxWtu_getSystemWatchdogPassword()); +#endif + core_main(); }