From: mahi Date: Mon, 10 Sep 2012 13:17:15 +0000 (+0200) Subject: EcuM: more fixes X-Git-Url: http://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/0d44d005276bbdfa60c2365f7055f37bbf332bb1 EcuM: more fixes --- diff --git a/include/EcuM_Types.h b/include/EcuM_Types.h index 4d6b1d6c..903c916e 100644 --- a/include/EcuM_Types.h +++ b/include/EcuM_Types.h @@ -45,6 +45,7 @@ #if defined(USE_WDGM) typedef struct EcuM_WdgM { + WdgM_SupervisedEntityIdType EcuMSupervisedEntity; WdgM_ModeType EcuMWdgMWakeupMode; WdgM_ModeType EcuMWdgMStartupMode; WdgM_ModeType EcuMWdgMRunMode; @@ -53,6 +54,14 @@ typedef struct EcuM_WdgM } EcuM_WdgMType; #endif +typedef struct EcuM_WakeupSourceConfig { + EcuM_WakeupSourceType EcuMWakeupSourceId; + uint32 EcuMValidationTimeout; + Mcu_ResetType EcuMResetReason; + boolean EcuMWakeupSourcePolling; + uint8 EcuMComMChannel; +} EcuM_WakeupSourceConfigType; + typedef struct EcuM_SleepMode { uint8 EcuMSleepModeId; diff --git a/system/EcuM/EcuM.c b/system/EcuM/EcuM.c index 04d1cf8f..5f3cd568 100644 --- a/system/EcuM/EcuM.c +++ b/system/EcuM/EcuM.c @@ -401,7 +401,7 @@ void EcuM_SetWakeupEvent(EcuM_WakeupSourceType sources) { internal_data.wakeupEvents |= sources; /* @req 3.1.5/EcuM2707 @req 3.1.5/EcuM2709*/ - internal_data.wakeupTimer = ECUM_VALIDATION_TIMEOUT; +// internal_data.wakeupTimer = ECUM_VALIDATION_TIMEOUT; } diff --git a/system/EcuM/EcuM_Main.c b/system/EcuM/EcuM_Main.c index 3fbed82c..4cfdf246 100644 --- a/system/EcuM/EcuM_Main.c +++ b/system/EcuM/EcuM_Main.c @@ -104,7 +104,7 @@ void EcuM_enter_run_mode(void){ #if defined(USE_WDGM) /* This seems strange, should be in FW instead */ - WdgM_SetMode(TODO_MODE); + WdgM_SetMode(internal_data.config->EcuMWdgMConfig->EcuMWdgMRunMode); #endif #if defined(USE_COMM) @@ -269,7 +269,7 @@ static inline void in_state_appRun(void){ EcuM_OnExitRun(); /** @req EcuM2865 */ #if defined(USE_WDGM) - WdgM_SetMode(FIXME_MODE); + // This is APPRUN not RUN.. so WdgM_SetMode() should not be called? #endif #if defined(USE_RTE) && defined(CFG_ECUM_USE_SERVICE_COMPONENT) @@ -382,7 +382,7 @@ void EcuM_MainFunction(void){ Mcu_SetMode(MCU_MODE_NORMAL); #if defined(USE_WDGM) - WdgM_SetMode(FIXME_MODE); + WdgM_SetMode(internal_data.config->EcuMWdgMConfig->EcuMWdgMWakeupMode); #endif wMask = EcuM_GetPendingWakeupEvents();