From: hebe Date: Mon, 17 Sep 2012 07:53:47 +0000 (+0200) Subject: mpc5516, updated examples. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/4fcf8b5bd06e2f12c9d8d2a4aacbd0dca8d24382 mpc5516, updated examples. --- diff --git a/boards/mpc5516it/board_mpc5516it.arxml b/boards/mpc5516it/board_mpc5516it.arxml index 00057dae..a388a677 100644 --- a/boards/mpc5516it/board_mpc5516it.arxml +++ b/boards/mpc5516it/board_mpc5516it.arxml @@ -432,8 +432,28 @@ - - McuModeSettingConf + + RUN + + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf/McuMode + 0 + + + + + SLEEP + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf @@ -1722,6 +1742,72 @@ User_1 /ArcCore/EcuM/EcuMConfiguration/EcuMUserConfig + + EcuMDefaultShutdownTarget + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultState + EcuMStateReset + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultSleepModeRef + + + + + EcuMSleepMode + + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeSuspend + false + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeMcuModeRef + /board_mpc5516it/Mcu/McuModuleConfiguration/SLEEP + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMWakeupSourceMask + /board_mpc5516it/EcuM/EcuMConfiguration/EcuMWakeupSource + + + + + EcuMWakeupSource + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMResetReason + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMValidationTimeout + 0.0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourceId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourcePolling + false + + + diff --git a/boards/mpc5516it/examples/com_simple/com_simple_mpc5516it.arxml b/boards/mpc5516it/examples/com_simple/com_simple_mpc5516it.arxml index 3745e612..e57a0a60 100644 --- a/boards/mpc5516it/examples/com_simple/com_simple_mpc5516it.arxml +++ b/boards/mpc5516it/examples/com_simple/com_simple_mpc5516it.arxml @@ -2077,8 +2077,28 @@ - - McuModeSettingConf + + RUN + + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf/McuMode + 0 + + + + + SLEEP + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf @@ -2148,6 +2168,72 @@ User_1 /ArcCore/EcuM/EcuMConfiguration/EcuMUserConfig + + EcuMDefaultShutdownTarget + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultState + EcuMStateReset + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultSleepModeRef + + + + + EcuMSleepMode + + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeSuspend + false + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeMcuModeRef + /com_simple_mpc5516it/Mcu/McuModuleConfiguration/SLEEP + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMWakeupSourceMask + /com_simple_mpc5516it/EcuM/EcuMConfiguration/EcuMWakeupSource + + + + + EcuMWakeupSource + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMResetReason + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMValidationTimeout + 0.0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourceId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourcePolling + false + + + diff --git a/boards/mpc5516it/examples/com_simple/config/Can_Cfg.h b/boards/mpc5516it/examples/com_simple/config/Can_Cfg.h index 536d3311..f4b990c0 100644 --- a/boards/mpc5516it/examples/com_simple/config/Can_Cfg.h +++ b/boards/mpc5516it/examples/com_simple/config/Can_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.3 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/com_simple/config/Can_PBcfg.c b/boards/mpc5516it/examples/com_simple/config/Can_PBcfg.c index 8108872b..00e3f5f1 100644 --- a/boards/mpc5516it/examples/com_simple/config/Can_PBcfg.c +++ b/boards/mpc5516it/examples/com_simple/config/Can_PBcfg.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.3 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/com_simple/config/Com_Cfg.h b/boards/mpc5516it/examples/com_simple/config/Com_Cfg.h index fd206e42..65271db2 100644 --- a/boards/mpc5516it/examples/com_simple/config/Com_Cfg.h +++ b/boards/mpc5516it/examples/com_simple/config/Com_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.8 +* Generator version: 2.1.1 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.c b/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.c index 955f406d..60bf24f4 100644 --- a/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.c +++ b/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.8 +* Generator version: 2.1.1 * * Generated by Arctic Studio (http://arccore.com) */ @@ -75,8 +75,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_32_21_BE_Tester, + .ComBitPosition = 20, .ComBitSize = 21, + .ComSignalEndianess = COM_BIG_ENDIAN, .ComSignalType = UINT32, .Com_Arc_IsSignalGroup = 0, @@ -103,8 +105,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_1_4_LE_Tester, + .ComBitPosition = 1, .ComBitSize = 4, + .ComSignalEndianess = COM_LITTLE_ENDIAN, .ComSignalType = UINT8, .Com_Arc_IsSignalGroup = 0, @@ -131,8 +135,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_45_12_LE_Tester, + .ComBitPosition = 45, .ComBitSize = 12, + .ComSignalEndianess = COM_LITTLE_ENDIAN, .ComSignalType = SINT16, .Com_Arc_IsSignalGroup = 0, @@ -159,8 +165,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_29_12_BE_Tester, + .ComBitPosition = 0, .ComBitSize = 12, + .ComSignalEndianess = COM_BIG_ENDIAN, .ComSignalType = SINT16, .Com_Arc_IsSignalGroup = 0, @@ -187,8 +195,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_32_21_BE, + .ComBitPosition = 20, .ComBitSize = 21, + .ComSignalEndianess = COM_BIG_ENDIAN, .ComSignalType = UINT32, .Com_Arc_IsSignalGroup = 0, @@ -215,8 +225,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_1_4_LE, + .ComBitPosition = 1, .ComBitSize = 4, + .ComSignalEndianess = COM_LITTLE_ENDIAN, .ComSignalType = UINT8, .Com_Arc_IsSignalGroup = 0, @@ -243,8 +255,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_45_12_LE, + .ComBitPosition = 45, .ComBitSize = 12, + .ComSignalEndianess = COM_LITTLE_ENDIAN, .ComSignalType = SINT16, .Com_Arc_IsSignalGroup = 0, @@ -271,8 +285,10 @@ const ComSignal_type ComSignal[] = { .ComSignalInitValue = &Com_SignalInitValue_CanDB_Signal_29_12_BE, + .ComBitPosition = 0, .ComBitSize = 12, + .ComSignalEndianess = COM_BIG_ENDIAN, .ComSignalType = SINT16, .Com_Arc_IsSignalGroup = 0, diff --git a/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.h b/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.h index ffef12ec..9e4644d1 100644 --- a/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.h +++ b/boards/mpc5516it/examples/com_simple/config/Com_PbCfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.8 +* Generator version: 2.1.1 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/com_simple/config/EcuM_Callout_Stubs.c b/boards/mpc5516it/examples/com_simple/config/EcuM_Callout_Stubs.c deleted file mode 100644 index 5b0c9000..00000000 --- a/boards/mpc5516it/examples/com_simple/config/EcuM_Callout_Stubs.c +++ /dev/null @@ -1,332 +0,0 @@ -/* -* Configuration of module: EcuM (EcuM_Callout_Stubs.c) -* -* Created by: ArcCore -* Copyright: -* -* Configured for (MCU): MPC551x -* -* Module vendor: ArcCore -* Generator version: 2.0.2 -* -* Generated by Arctic Studio (http://arccore.com) -*/ - - -#include "EcuM.h" -#include "EcuM_Generated_Types.h" -#include "Det.h" -#if defined(USE_DEM) -#include "Dem.h" -#endif -#if defined(USE_MCU) -#include "Mcu.h" -#endif -#if defined(USE_GPT) -#include "Gpt.h" -#endif -#if defined(USE_CAN) -#include "Can.h" -#endif -#if defined(USE_CANIF) -#include "CanIf.h" -#endif -#if defined(USE_PDUR) -#include "PduR.h" -#endif -#if defined(USE_COM) -#include "Com.h" -#endif -#if defined(USE_CANTP) -#include "CanTp.h" -#endif -#if defined(USE_J1939TP) -#include "J1939Tp.h" -#endif -#if defined(USE_DCM) -#include "Dcm.h" -#endif -#if defined(USE_PWM) -#include "Pwm.h" -#endif -#if defined(USE_IOHWAB) -#include "IoHwAb.h" -#endif -#if defined(USE_FLS) -#include "Fls.h" -#endif -#if defined(USE_EEP) -#include "Eep.h" -#endif -#if defined(USE_FEE) -#include "Fee.h" -#endif -#if defined(USE_EA) -#include "Ea.h" -#endif -#if defined(USE_NVM) -#include "NvM.h" -#endif -#if defined(USE_COMM) -#include "ComM.h" -#endif -#if defined(USE_NM) -#include "Nm.h" -#endif -#if defined(USE_CANNM) -#include "CanNm.h" -#endif -#if defined(USE_CANSM) -#include "CanSM.h" -#endif -#if defined(USE_UDPNM) -#include "UdpNm.h" -#endif -#if defined(USE_LINSM) -#include "LinSM.h" -#endif -#if defined(USE_SPI) -#include "Spi.h" -#endif -#if defined(USE_WDG) -#include "Wdg.h" -#endif -#if defined(USE_WDGM) -#include "WdgM.h" -#endif - -void EcuM_AL_DriverInitZero(void) -{ - Det_Init();/** @req EcuM2783 */ - Det_Start();/** @req EcuM2634 */ -} - -extern EcuM_ConfigType EcuMConfig; - -EcuM_ConfigType* EcuM_DeterminePbConfiguration(void) -{ - return &EcuMConfig; -} - -void EcuM_AL_DriverInitOne(const EcuM_ConfigType *ConfigPtr) -{ - (void)ConfigPtr; - //lint --e{715} PC-Lint (715) - ConfigPtr usage depends on configuration of modules - -#if defined(USE_MCU) - Mcu_Init(ConfigPtr->McuConfig); - - /* Set up default clock (Mcu_InitClock requires initRun==1) */ - /* Ignoring return value */ - (void) Mcu_InitClock( ConfigPtr->McuConfig->McuDefaultClockSettings ); - - // Wait for PLL to sync. - while (Mcu_GetPllStatus() != MCU_PLL_LOCKED) - { - ; - } -#endif - -#if defined(USE_DEM) - // Preinitialize DEM - Dem_PreInit(); -#endif - -#if defined(USE_PORT) - // Setup Port - Port_Init(ConfigPtr->PortConfig); -#endif - - -#if defined(USE_GPT) - // Setup the GPT - Gpt_Init(ConfigPtr->GptConfig); -#endif - - // Setup watchdog -#if defined(USE_WDG) - Wdg_Init(ConfigPtr->WdgConfig); -#endif -#if defined(USE_WDGM) - WdgM_Init(ConfigPtr->WdgMConfig); -#endif - -#if defined(USE_DMA) - // Setup DMA - Dma_Init(ConfigPtr->DmaConfig); -#endif - -#if defined(USE_ADC) - // Setup ADC - Adc_Init(ConfigPtr->AdcConfig); -#endif - - // Setup ICU - // TODO - - // Setup PWM -#if defined(USE_PWM) - // Setup PWM - Pwm_Init(ConfigPtr->PwmConfig); -#endif -} - -void EcuM_AL_DriverInitTwo(const EcuM_ConfigType* ConfigPtr) -{ - (void)ConfigPtr; - //lint --e{715} PC-Lint (715) - ConfigPtr usage depends on configuration of modules - -#if defined(USE_SPI) - // Setup SPI - Spi_Init(ConfigPtr->SpiConfig); -#endif - -#if defined(USE_EEP) - // Setup EEP - Eep_Init(ConfigPtr->EepConfig); -#endif - -#if defined(USE_FLS) - // Setup Flash - Fls_Init(ConfigPtr->FlashConfig); -#endif - -#if defined(USE_FEE) - // Setup FEE - Fee_Init(); -#endif - -#if defined(USE_EA) - // Setup EA - Ea_Init(); -#endif - -#if defined(USE_NVM) - // Setup NVRAM Manager and start the read all job - NvM_Init(); - NvM_ReadAll(); -#endif - - // Setup CAN tranceiver - // TODO - -#if defined(USE_CAN) - // Setup Can driver - Can_Init(ConfigPtr->CanConfig); -#endif - -#if defined(USE_CANIF) - // Setup CanIf - CanIf_Init(ConfigPtr->CanIfConfig); -#endif - -#if defined(USE_CANTP) - // Setup CAN TP - CanTp_Init(); -#endif - -#if defined(USE_CANSM) - CanSM_Init(ConfigPtr->CanSMConfig); -#endif - -#if defined(USE_J1939TP) - // Setup J1939Tp - J1939Tp_Init(ConfigPtr->J1939TpConfig); -#endif - - - // Setup LIN - // TODO - -#if defined(USE_PDUR) - // Setup PDU Router - PduR_Init(ConfigPtr->PduRConfig); -#endif - -#if defined(USE_CANNM) - // Setup Can Network Manager - CanNm_Init(ConfigPtr->CanNmConfig); -#endif - -#if defined(USE_UDPNM) - // Setup Udp Network Manager - UdpNm_Init(ConfigPtr->UdpNmConfig); -#endif - -#if defined(USE_NM) - // Setup Network Management Interface - Nm_Init(ConfigPtr->NmConfig); -#endif - -#if defined(USE_COM) - // Setup COM layer - Com_Init(ConfigPtr->ComConfig); -#endif - -#if defined(USE_DCM) - // Setup DCM - Dcm_Init(); -#endif - -#if defined(USE_IOHWAB) - // Setup IO hardware abstraction layer - IoHwAb_Init(); -#endif - -} - -void EcuM_AL_DriverInitThree(const EcuM_ConfigType* ConfigPtr) -{ - (void)ConfigPtr; - //lint --e{715} PC-Lint (715) - ConfigPtr usage depends on configuration of modules - -#if defined(USE_DEM) - // Setup DEM - Dem_Init(); -#endif - -#if defined(USE_COMM) - // Setup Communication Manager - ComM_Init(ConfigPtr->ComMConfig); -#endif -} - -void EcuM_OnEnterRUN(void) -{ - -} - -void EcuM_OnExitRun(void) -{ - -} - -void EcuM_OnExitPostRun(void) -{ - -} - -void EcuM_OnPrepShutdown(void) -{ - -} - -void EcuM_OnGoSleep(void) -{ - -} - -void EcuM_OnGoOffOne(void) -{ - -} - -void EcuM_OnGoOffTwo(void) -{ - -} - -void EcuM_AL_SwitchOff(void) -{ - -} diff --git a/boards/mpc5516it/examples/com_simple/config/EcuM_Cfg.h b/boards/mpc5516it/examples/com_simple/config/EcuM_Cfg.h index 9cb3039a..d02d2499 100644 --- a/boards/mpc5516it/examples/com_simple/config/EcuM_Cfg.h +++ b/boards/mpc5516it/examples/com_simple/config/EcuM_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.1.10 * * Generated by Arctic Studio (http://arccore.com) */ @@ -30,12 +30,26 @@ #define ECUM_NVRAM_WRITEALL_TIMEOUT (10000) #define ECUM_NVRAM_MIN_RUN_DURATION (10000) +#define ECUM_VALIDATION_TIMEOUT 0 typedef enum { ECUM_USER_User_1, ECUM_USER_ENDMARK // Must be the last in list! } EcuM_UserList; +// EcuM Sleep Mode IDs +#define ECUM_SLEEP_MODE_EcuMSleepMode 0 +#define ECUM_SLEEP_MODE_CNT 1 + +typedef enum { + ECUM_WKSOURCE_POWER = (1<<0), + ECUM_WKSOURCE_RESET = (1<<1), + ECUM_WKSOURCE_INTERNAL_RESET = (1<<2), + ECUM_WKSOURCE_INTERNAL_WDG = (1<<3), + ECUM_WKSOURCE_EXTERNAL_WDG = (1<<4), + ECUM_WKSOURCE_ECUMWAKEUPSOURCE = (1<<5), + ECUM_WKSOURCE_ALL_SOURCES = 0x3FFFFFFF +} EcuM_WakeupSourceType ; #endif /*ECUM_CFG_H_*/ diff --git a/boards/mpc5516it/examples/com_simple/config/EcuM_Generated_Types.h b/boards/mpc5516it/examples/com_simple/config/EcuM_Generated_Types.h deleted file mode 100644 index bcdfa93a..00000000 --- a/boards/mpc5516it/examples/com_simple/config/EcuM_Generated_Types.h +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Configuration of module: EcuM (EcuM_Generated_Types.h) -* -* Created by: ArcCore -* Copyright: -* -* Configured for (MCU): MPC551x -* -* Module vendor: ArcCore -* Generator version: 2.0.2 -* -* Generated by Arctic Studio (http://arccore.com) -*/ - - -#if !(((ECUM_SW_MAJOR_VERSION == 2) && (ECUM_SW_MINOR_VERSION == 0)) ) -#error EcuM: Configuration file expected BSW module version to be 2.0.* -#endif - - -#ifndef _ECUM_GENERATED_TYPES_H_ -#define _ECUM_GENERATED_TYPES_H_ - -#ifdef CFG_ECUM_USE_SERVICE_COMPONENT -#include "Rte_EcuM.h" -#endif - -#include "EcuM_Types.h" - -#if defined(USE_MCU) -#include "Mcu.h" -#endif -#if defined(USE_PORT) -#include "Port.h" -#endif -#if defined(USE_CAN) -#include "Can.h" -#endif -#if defined(USE_CANIF) -#include "CanIf.h" -#endif -#if defined(USE_PWM) -#include "Pwm.h" -#endif -#if defined(USE_COM) -#include "Com.h" -#endif -#if defined(USE_PDUR) -#include "PduR.h" -#endif -#if defined(USE_DMA) -#include "Dma.h" -#endif -#if defined(USE_ADC) -#include "Adc.h" -#endif -#if defined(USE_GPT) -#include "Gpt.h" -#endif -#if defined(USE_COMM) -#include "ComM.h" -#endif -#if defined(USE_NM) -#include "Nm.h" -#endif -#if defined(USE_CANNM) -#include "CanNm.h" -#endif -#if defined(USE_CANSM) -#include "CanSM.h" -#endif -#if defined(USE_J1939TP) -#include "J1939Tp.h" -#endif -#if defined(USE_UDPNM) -#include "UdpNm.h" -#endif -#if defined(USE_LINSM) -#include "LinSM.h" -#endif -#if defined(USE_FLS) -#include "Fls.h" -#endif -#if defined(USE_EEP) -#include "Eep.h" -#endif -#if defined(USE_SPI) -#include "Spi.h" -#endif -#if defined(USE_WDG) -#include "Wdg.h" -#endif -#if defined(USE_WDGM) -#include "WdgM.h" -#endif -#if defined(USE_WDGIF) -#include "WdgIf.h" -#endif - - -typedef struct -{ - EcuM_StateType EcuMDefaultShutdownTarget; - uint8 EcuMDefaultSleepMode; - AppModeType EcuMDefaultAppMode; - uint32 EcuMRunMinimumDuration; - uint32 EcuMNvramReadAllTimeout; - uint32 EcuMNvramWriteAllTimeout; - -#if defined(USE_MCU) - const Mcu_ConfigType* McuConfig; -#endif -#if defined(USE_PORT) - const Port_ConfigType* PortConfig; -#endif -#if defined(USE_CAN) - const Can_ConfigType* CanConfig; -#endif -#if defined(USE_CANIF) - const CanIf_ConfigType* CanIfConfig; -#endif -#if defined(USE_CANSM) - const CanSM_ConfigType* CanSMConfig; -#endif -#if defined(USE_NM) - const Nm_ConfigType* NmConfig; -#endif -#if defined(USE_CANNM) - const CanNm_ConfigType* CanNmConfig; -#endif -#if defined(USE_UDPNM) - const UdpNm_ConfigType* UdpNmConfig; -#endif -#if defined(USE_COMM) - const ComM_ConfigType* ComMConfig; -#endif -#if defined(USE_COM) - const Com_ConfigType* ComConfig; -#endif -#if defined(USE_J1939TP) - const J1939Tp_ConfigType* J1939TpConfig; -#endif -#if defined(USE_PDUR) - const PduR_PBConfigType* PduRConfig; -#endif -#if defined(USE_PWM) - const Pwm_ConfigType* PwmConfig; -#endif -#if defined(USE_DMA) - const Dma_ConfigType* DmaConfig; -#endif -#if defined(USE_ADC) - const Adc_ConfigType* AdcConfig; -#endif -#if defined(USE_GPT) - const Gpt_ConfigType* GptConfig; -#endif -#if defined(USE_FLS) - const Fls_ConfigType* FlashConfig; -#endif -#if defined(USE_EEP) - const Eep_ConfigType* EepConfig; -#endif -#if defined(USE_SPI) - const Spi_ConfigType* SpiConfig; -#endif -#if defined(USE_WDG) - const Wdg_ConfigType* WdgConfig; -#endif -#if defined(USE_WDGIF) - const WdgIf_ConfigType* WdgIfConfig; -#endif -#if defined(USE_WDGM) - const WdgM_ConfigType* WdgMConfig; -#endif -} EcuM_ConfigType; - -#endif /*_ECUM_GENERATED_TYPES_H_*/ diff --git a/boards/mpc5516it/examples/com_simple/config/EcuM_PBcfg.c b/boards/mpc5516it/examples/com_simple/config/EcuM_PBcfg.c index 36f166df..34c18101 100644 --- a/boards/mpc5516it/examples/com_simple/config/EcuM_PBcfg.c +++ b/boards/mpc5516it/examples/com_simple/config/EcuM_PBcfg.c @@ -7,13 +7,12 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.1.10 * * Generated by Arctic Studio (http://arccore.com) */ - #include "EcuM.h" #include "EcuM_Generated_Types.h" @@ -37,6 +36,39 @@ extern const ComM_ConfigType ComM_Config; extern const J1939Tp_ConfigType J1939Tp_Config; #endif +#if defined(USE_WDGM) +const EcuM_WdgMType EcuM_WdgMConfig = { + .EcuMSupervisedEntity = NULL, + .EcuMWdgMWakeupMode = NULL, + .EcuMWdgMStartupMode = NULL, + .EcuMWdgMRunMode = NULL, + .EcuMWdgMPostRunMode = NULL, + .EcuMWdgMShutdownMode = NULL, +}; +#endif + +const EcuM_SleepModeType EcuM_SleepModeConfig[] = { + { // EcuMSleepMode + .EcuMSleepModeId = ECUM_SLEEP_MODE_EcuMSleepMode, + .EcuMWakeupSourceMask = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + .EcuMSleepModeMcuMode = MCU_MODE_SLEEP, +#if defined(USE_WDGM) + .EcuMSleepModeWdgMMode = NULL, +#endif + } +}; + +const EcuM_WakeupSourceConfigType EcuM_WakeupSourceConfig[] = { + { // EcuMWakeupSource + .EcuMWakeupSourceId = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + .EcuMWakeupSourcePolling = false, + .EcuMValidationTimeout = 0, +#if defined(USE_COMM) + .EcuMComMChannel = NULL, +#endif + } +}; + EcuM_ConfigType EcuMConfig = { @@ -46,54 +78,58 @@ EcuM_ConfigType EcuMConfig = .EcuMNvramReadAllTimeout = ECUM_NVRAM_READALL_TIMEOUT, .EcuMNvramWriteAllTimeout = ECUM_NVRAM_WRITEALL_TIMEOUT, .EcuMRunMinimumDuration = ECUM_NVRAM_MIN_RUN_DURATION, +#if defined(USE_WDGM) + .EcuMWdgMConfig = &EcuM_WdgMConfig, +#endif + .EcuMSleepModeConfig = &EcuM_SleepModeConfig, #if defined(USE_MCU) - .McuConfig = McuConfigData, + .McuConfig = McuConfigData, #endif #if defined(USE_PORT) - .PortConfig = &PortConfigData, + .PortConfig = &PortConfigData, #endif #if defined(USE_CAN) - .CanConfig = &CanConfigData, + .CanConfig = &CanConfigData, #endif #if defined(USE_CANIF) - .CanIfConfig = &CanIf_Config, + .CanIfConfig = &CanIf_Config, #endif #if defined(USE_CANSM) - .CanSMConfig = &CanSM_Config, + .CanSMConfig = &CanSM_Config, #endif #if defined(USE_CANNM) - .CanNmConfig = &CanNm_Config, + .CanNmConfig = &CanNm_Config, #endif #if defined(USE_UDPNM) - .UdpNmConfig = &UdpNm_Config, + .UdpNmConfig = &UdpNm_Config, #endif #if defined(USE_COM) - .ComConfig = &ComConfiguration, + .ComConfig = &ComConfiguration, #endif #if defined(USE_COMM) - .ComMConfig = &ComM_Config, + .ComMConfig = &ComM_Config, #endif #if defined(USE_J1939TP) - .J1939TpConfig = &J1939Tp_Config, + .J1939TpConfig = &J1939Tp_Config, #endif #if defined(USE_NM) - .NmConfig = &Nm_Config, + .NmConfig = &Nm_Config, #endif #if defined(USE_PDUR) - .PduRConfig = &PduR_Config, + .PduRConfig = &PduR_Config, #endif #if defined(USE_J1939TP) - .J1939TpConfig = &J1939Tp_Config, + .J1939TpConfig = &J1939Tp_Config, #endif #if defined(USE_DMA) - .DmaConfig = DmaConfig, + .DmaConfig = DmaConfig, #endif #if defined(USE_ADC) - .AdcConfig = AdcConfig, + .AdcConfig = AdcConfig, #endif #if defined(USE_PWM) - .PwmConfig = &PwmConfig, + .PwmConfig = &PwmConfig, #endif #if defined(USE_WDG) .WdgConfig = &WdgConfig, @@ -105,7 +141,7 @@ EcuM_ConfigType EcuMConfig = .WdgIfConfig = &WdgIfConfig, #endif #if defined(USE_GPT) - .GptConfig = GptConfigData, + .GptConfig = GptConfigData, #endif #if defined(USE_FLS) .FlashConfig = FlsConfigSet, diff --git a/boards/mpc5516it/examples/com_simple/config/Mcu_Cfg.h b/boards/mpc5516it/examples/com_simple/config/Mcu_Cfg.h index eca13bcb..381f7704 100644 --- a/boards/mpc5516it/examples/com_simple/config/Mcu_Cfg.h +++ b/boards/mpc5516it/examples/com_simple/config/Mcu_Cfg.h @@ -26,6 +26,14 @@ #define MCU_PERFORM_RESET_API STD_ON #define MCU_VERSION_INFO_API STD_ON + +typedef enum { + MCU_MODE_RUN = 0, + MCU_MODE_SLEEP = 1, + MCU_MODE_NORMAL = 2 // Here for backwards compatibility reasons. Not used anymore. +} Mcu_ModeType; + + typedef enum { MCU_CLOCKTYPE_EXT_REF_80MHZ = 0, MCU_CLOCKTYPE_EXT_REF_66MHZ = 1, diff --git a/boards/mpc5516it/examples/com_simple/config/Port_Cfg.c b/boards/mpc5516it/examples/com_simple/config/Port_Cfg.c index 5470bf1d..f1b183ea 100644 --- a/boards/mpc5516it/examples/com_simple/config/Port_Cfg.c +++ b/boards/mpc5516it/examples/com_simple/config/Port_Cfg.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.1 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/com_simple/config/Port_Cfg.h b/boards/mpc5516it/examples/com_simple/config/Port_Cfg.h index d75346b4..7d5a6e22 100644 --- a/boards/mpc5516it/examples/com_simple/config/Port_Cfg.h +++ b/boards/mpc5516it/examples/com_simple/config/Port_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.1 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Calibration_Settings.h b/boards/mpc5516it/examples/led_rte/config/Calibration_Settings.h index 0072973a..058246ac 100644 --- a/boards/mpc5516it/examples/led_rte/config/Calibration_Settings.h +++ b/boards/mpc5516it/examples/led_rte/config/Calibration_Settings.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/EcuM_Cfg.h b/boards/mpc5516it/examples/led_rte/config/EcuM_Cfg.h index 9b8b9660..bf16ba23 100644 --- a/boards/mpc5516it/examples/led_rte/config/EcuM_Cfg.h +++ b/boards/mpc5516it/examples/led_rte/config/EcuM_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.1.10 * * Generated by Arctic Studio (http://arccore.com) */ @@ -30,12 +30,26 @@ #define ECUM_NVRAM_WRITEALL_TIMEOUT (10000) #define ECUM_NVRAM_MIN_RUN_DURATION (10000) +#define ECUM_VALIDATION_TIMEOUT 0 typedef enum { ECUM_USER_User_1, ECUM_USER_ENDMARK // Must be the last in list! } EcuM_UserList; +// EcuM Sleep Mode IDs +#define ECUM_SLEEP_MODE_EcuMSleepMode 0 +#define ECUM_SLEEP_MODE_CNT 1 + +typedef enum { + ECUM_WKSOURCE_POWER = (1<<0), + ECUM_WKSOURCE_RESET = (1<<1), + ECUM_WKSOURCE_INTERNAL_RESET = (1<<2), + ECUM_WKSOURCE_INTERNAL_WDG = (1<<3), + ECUM_WKSOURCE_EXTERNAL_WDG = (1<<4), + ECUM_WKSOURCE_ECUMWAKEUPSOURCE = (1<<5), + ECUM_WKSOURCE_ALL_SOURCES = 0x3FFFFFFF +} EcuM_WakeupSourceType ; #endif /*ECUM_CFG_H_*/ diff --git a/boards/mpc5516it/examples/led_rte/config/EcuM_Generated_Types.h b/boards/mpc5516it/examples/led_rte/config/EcuM_Generated_Types.h deleted file mode 100644 index d74e5b8d..00000000 --- a/boards/mpc5516it/examples/led_rte/config/EcuM_Generated_Types.h +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Configuration of module: EcuM (EcuM_Generated_Types.h) -* -* Created by: -* Copyright: -* -* Configured for (MCU): MPC551x -* -* Module vendor: ArcCore -* Generator version: 2.0.2 -* -* Generated by Arctic Studio (http://arccore.com) -*/ - - -#if !(((ECUM_SW_MAJOR_VERSION == 2) && (ECUM_SW_MINOR_VERSION == 0)) ) -#error EcuM: Configuration file expected BSW module version to be 2.0.* -#endif - - -#ifndef _ECUM_GENERATED_TYPES_H_ -#define _ECUM_GENERATED_TYPES_H_ - -#ifdef CFG_ECUM_USE_SERVICE_COMPONENT -#include "Rte_EcuM.h" -#endif - -#include "EcuM_Types.h" - -#if defined(USE_MCU) -#include "Mcu.h" -#endif -#if defined(USE_PORT) -#include "Port.h" -#endif -#if defined(USE_CAN) -#include "Can.h" -#endif -#if defined(USE_CANIF) -#include "CanIf.h" -#endif -#if defined(USE_PWM) -#include "Pwm.h" -#endif -#if defined(USE_COM) -#include "Com.h" -#endif -#if defined(USE_PDUR) -#include "PduR.h" -#endif -#if defined(USE_DMA) -#include "Dma.h" -#endif -#if defined(USE_ADC) -#include "Adc.h" -#endif -#if defined(USE_GPT) -#include "Gpt.h" -#endif -#if defined(USE_COMM) -#include "ComM.h" -#endif -#if defined(USE_NM) -#include "Nm.h" -#endif -#if defined(USE_CANNM) -#include "CanNm.h" -#endif -#if defined(USE_CANSM) -#include "CanSM.h" -#endif -#if defined(USE_J1939TP) -#include "J1939Tp.h" -#endif -#if defined(USE_UDPNM) -#include "UdpNm.h" -#endif -#if defined(USE_LINSM) -#include "LinSM.h" -#endif -#if defined(USE_FLS) -#include "Fls.h" -#endif -#if defined(USE_EEP) -#include "Eep.h" -#endif -#if defined(USE_SPI) -#include "Spi.h" -#endif -#if defined(USE_WDG) -#include "Wdg.h" -#endif -#if defined(USE_WDGM) -#include "WdgM.h" -#endif -#if defined(USE_WDGIF) -#include "WdgIf.h" -#endif - - -typedef struct -{ - EcuM_StateType EcuMDefaultShutdownTarget; - uint8 EcuMDefaultSleepMode; - AppModeType EcuMDefaultAppMode; - uint32 EcuMRunMinimumDuration; - uint32 EcuMNvramReadAllTimeout; - uint32 EcuMNvramWriteAllTimeout; - -#if defined(USE_MCU) - const Mcu_ConfigType* McuConfig; -#endif -#if defined(USE_PORT) - const Port_ConfigType* PortConfig; -#endif -#if defined(USE_CAN) - const Can_ConfigType* CanConfig; -#endif -#if defined(USE_CANIF) - const CanIf_ConfigType* CanIfConfig; -#endif -#if defined(USE_CANSM) - const CanSM_ConfigType* CanSMConfig; -#endif -#if defined(USE_NM) - const Nm_ConfigType* NmConfig; -#endif -#if defined(USE_CANNM) - const CanNm_ConfigType* CanNmConfig; -#endif -#if defined(USE_UDPNM) - const UdpNm_ConfigType* UdpNmConfig; -#endif -#if defined(USE_COMM) - const ComM_ConfigType* ComMConfig; -#endif -#if defined(USE_COM) - const Com_ConfigType* ComConfig; -#endif -#if defined(USE_J1939TP) - const J1939Tp_ConfigType* J1939TpConfig; -#endif -#if defined(USE_PDUR) - const PduR_PBConfigType* PduRConfig; -#endif -#if defined(USE_PWM) - const Pwm_ConfigType* PwmConfig; -#endif -#if defined(USE_DMA) - const Dma_ConfigType* DmaConfig; -#endif -#if defined(USE_ADC) - const Adc_ConfigType* AdcConfig; -#endif -#if defined(USE_GPT) - const Gpt_ConfigType* GptConfig; -#endif -#if defined(USE_FLS) - const Fls_ConfigType* FlashConfig; -#endif -#if defined(USE_EEP) - const Eep_ConfigType* EepConfig; -#endif -#if defined(USE_SPI) - const Spi_ConfigType* SpiConfig; -#endif -#if defined(USE_WDG) - const Wdg_ConfigType* WdgConfig; -#endif -#if defined(USE_WDGIF) - const WdgIf_ConfigType* WdgIfConfig; -#endif -#if defined(USE_WDGM) - const WdgM_ConfigType* WdgMConfig; -#endif -} EcuM_ConfigType; - -#endif /*_ECUM_GENERATED_TYPES_H_*/ diff --git a/boards/mpc5516it/examples/led_rte/config/EcuM_PBcfg.c b/boards/mpc5516it/examples/led_rte/config/EcuM_PBcfg.c index 072d9958..13661ad8 100644 --- a/boards/mpc5516it/examples/led_rte/config/EcuM_PBcfg.c +++ b/boards/mpc5516it/examples/led_rte/config/EcuM_PBcfg.c @@ -7,13 +7,12 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.1.10 * * Generated by Arctic Studio (http://arccore.com) */ - #include "EcuM.h" #include "EcuM_Generated_Types.h" @@ -37,6 +36,39 @@ extern const ComM_ConfigType ComM_Config; extern const J1939Tp_ConfigType J1939Tp_Config; #endif +#if defined(USE_WDGM) +const EcuM_WdgMType EcuM_WdgMConfig = { + .EcuMSupervisedEntity = NULL, + .EcuMWdgMWakeupMode = NULL, + .EcuMWdgMStartupMode = NULL, + .EcuMWdgMRunMode = NULL, + .EcuMWdgMPostRunMode = NULL, + .EcuMWdgMShutdownMode = NULL, +}; +#endif + +const EcuM_SleepModeType EcuM_SleepModeConfig[] = { + { // EcuMSleepMode + .EcuMSleepModeId = ECUM_SLEEP_MODE_EcuMSleepMode, + .EcuMWakeupSourceMask = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + .EcuMSleepModeMcuMode = MCU_MODE_SLEEP, +#if defined(USE_WDGM) + .EcuMSleepModeWdgMMode = NULL, +#endif + } +}; + +const EcuM_WakeupSourceConfigType EcuM_WakeupSourceConfig[] = { + { // EcuMWakeupSource + .EcuMWakeupSourceId = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + .EcuMWakeupSourcePolling = false, + .EcuMValidationTimeout = 0, +#if defined(USE_COMM) + .EcuMComMChannel = NULL, +#endif + } +}; + EcuM_ConfigType EcuMConfig = { @@ -46,54 +78,58 @@ EcuM_ConfigType EcuMConfig = .EcuMNvramReadAllTimeout = ECUM_NVRAM_READALL_TIMEOUT, .EcuMNvramWriteAllTimeout = ECUM_NVRAM_WRITEALL_TIMEOUT, .EcuMRunMinimumDuration = ECUM_NVRAM_MIN_RUN_DURATION, +#if defined(USE_WDGM) + .EcuMWdgMConfig = &EcuM_WdgMConfig, +#endif + .EcuMSleepModeConfig = &EcuM_SleepModeConfig, #if defined(USE_MCU) - .McuConfig = McuConfigData, + .McuConfig = McuConfigData, #endif #if defined(USE_PORT) - .PortConfig = &PortConfigData, + .PortConfig = &PortConfigData, #endif #if defined(USE_CAN) - .CanConfig = &CanConfigData, + .CanConfig = &CanConfigData, #endif #if defined(USE_CANIF) - .CanIfConfig = &CanIf_Config, + .CanIfConfig = &CanIf_Config, #endif #if defined(USE_CANSM) - .CanSMConfig = &CanSM_Config, + .CanSMConfig = &CanSM_Config, #endif #if defined(USE_CANNM) - .CanNmConfig = &CanNm_Config, + .CanNmConfig = &CanNm_Config, #endif #if defined(USE_UDPNM) - .UdpNmConfig = &UdpNm_Config, + .UdpNmConfig = &UdpNm_Config, #endif #if defined(USE_COM) - .ComConfig = &ComConfiguration, + .ComConfig = &ComConfiguration, #endif #if defined(USE_COMM) - .ComMConfig = &ComM_Config, + .ComMConfig = &ComM_Config, #endif #if defined(USE_J1939TP) - .J1939TpConfig = &J1939Tp_Config, + .J1939TpConfig = &J1939Tp_Config, #endif #if defined(USE_NM) - .NmConfig = &Nm_Config, + .NmConfig = &Nm_Config, #endif #if defined(USE_PDUR) - .PduRConfig = &PduR_Config, + .PduRConfig = &PduR_Config, #endif #if defined(USE_J1939TP) - .J1939TpConfig = &J1939Tp_Config, + .J1939TpConfig = &J1939Tp_Config, #endif #if defined(USE_DMA) - .DmaConfig = DmaConfig, + .DmaConfig = DmaConfig, #endif #if defined(USE_ADC) - .AdcConfig = AdcConfig, + .AdcConfig = AdcConfig, #endif #if defined(USE_PWM) - .PwmConfig = &PwmConfig, + .PwmConfig = &PwmConfig, #endif #if defined(USE_WDG) .WdgConfig = &WdgConfig, @@ -105,7 +141,7 @@ EcuM_ConfigType EcuMConfig = .WdgIfConfig = &WdgIfConfig, #endif #if defined(USE_GPT) - .GptConfig = GptConfigData, + .GptConfig = GptConfigData, #endif #if defined(USE_FLS) .FlashConfig = FlsConfigSet, diff --git a/boards/mpc5516it/examples/led_rte/config/Mcu_Cfg.h b/boards/mpc5516it/examples/led_rte/config/Mcu_Cfg.h index 2593e7c6..6c8cbc6a 100644 --- a/boards/mpc5516it/examples/led_rte/config/Mcu_Cfg.h +++ b/boards/mpc5516it/examples/led_rte/config/Mcu_Cfg.h @@ -26,6 +26,14 @@ #define MCU_PERFORM_RESET_API STD_ON #define MCU_VERSION_INFO_API STD_ON + +typedef enum { + MCU_MODE_RUN = 0, + MCU_MODE_SLEEP = 1, + MCU_MODE_NORMAL = 2 // Here for backwards compatibility reasons. Not used anymore. +} Mcu_ModeType; + + typedef enum { MCU_CLOCKTYPE_EXT_REF_80MHZ = 0, MCU_CLOCKTYPE_EXT_REF_66MHZ = 1, diff --git a/boards/mpc5516it/examples/led_rte/config/Port_Cfg.c b/boards/mpc5516it/examples/led_rte/config/Port_Cfg.c index 02116a9d..7b9fa898 100644 --- a/boards/mpc5516it/examples/led_rte/config/Port_Cfg.c +++ b/boards/mpc5516it/examples/led_rte/config/Port_Cfg.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.1 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Port_Cfg.h b/boards/mpc5516it/examples/led_rte/config/Port_Cfg.h index bf7be85b..1af26934 100644 --- a/boards/mpc5516it/examples/led_rte/config/Port_Cfg.h +++ b/boards/mpc5516it/examples/led_rte/config/Port_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.1 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte.c b/boards/mpc5516it/examples/led_rte/config/Rte.c index 49d787bd..b2324ff5 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte.c +++ b/boards/mpc5516it/examples/led_rte/config/Rte.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.c b/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.c index e1dcf441..f42a540f 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.c +++ b/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.h b/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.h index 90471b0b..3af8338f 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.h +++ b/boards/mpc5516it/examples/led_rte/config/Rte_Blinker.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_Blinker_Internal.h b/boards/mpc5516it/examples/led_rte/config/Rte_Blinker_Internal.h index 1f1146cf..7187bb3b 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_Blinker_Internal.h +++ b/boards/mpc5516it/examples/led_rte/config/Rte_Blinker_Internal.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_Cbk.c b/boards/mpc5516it/examples/led_rte/config/Rte_Cbk.c index fd458696..ae1fed33 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_Cbk.c +++ b/boards/mpc5516it/examples/led_rte/config/Rte_Cbk.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_Data.c b/boards/mpc5516it/examples/led_rte/config/Rte_Data.c index b94ab14a..29abe831 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_Data.c +++ b/boards/mpc5516it/examples/led_rte/config/Rte_Data.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_Data.h b/boards/mpc5516it/examples/led_rte/config/Rte_Data.h index d5d01b89..4e5075a9 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_Data.h +++ b/boards/mpc5516it/examples/led_rte/config/Rte_Data.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.c b/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.c index 7ce05548..37033cde 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.c +++ b/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.h b/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.h index 6dd66703..870dd89a 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.h +++ b/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction_Internal.h b/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction_Internal.h index d2e53138..24fdfc4b 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction_Internal.h +++ b/boards/mpc5516it/examples/led_rte/config/Rte_EcuAbstraction_Internal.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/led_rte/config/Rte_Type.h b/boards/mpc5516it/examples/led_rte/config/Rte_Type.h index 390c492b..81918aae 100644 --- a/boards/mpc5516it/examples/led_rte/config/Rte_Type.h +++ b/boards/mpc5516it/examples/led_rte/config/Rte_Type.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 0.0.9 +* Generator version: 0.0.13 * * Generated by Arctic Studio (http://arccore.com) */ @@ -37,6 +37,90 @@ typedef uint8 DigitalLevel; #define _DEFINED_TYPEDEF_FOR_DigitalLevel_ +typedef uint8 EcuM_BootTargetType; +#ifndef ECUM_BOOT_TARGET_APP +#define ECUM_BOOT_TARGET_APP ((EcuM_BootTargetType)0) +#endif /*ECUM_BOOT_TARGET_APP*/ +#ifndef ECUM_BOOT_TARGET_OEM_BOOTLOADER +#define ECUM_BOOT_TARGET_OEM_BOOTLOADER ((EcuM_BootTargetType)1) +#endif /*ECUM_BOOT_TARGET_OEM_BOOTLOADER*/ +#ifndef ECUM_BOOT_TARGET_SYS_BOOTLOADER +#define ECUM_BOOT_TARGET_SYS_BOOTLOADER ((EcuM_BootTargetType)2) +#endif /*ECUM_BOOT_TARGET_SYS_BOOTLOADER*/ +#define EcuM_BootTargetType_LowerLimit 0 +#define EcuM_BootTargetType_UpperLimit 1 + +#define _DEFINED_TYPEDEF_FOR_EcuM_BootTargetType_ + +typedef uint8 EcuM_StateType; +#ifndef ECUM_STATE_STARTUP +#define ECUM_STATE_STARTUP ((EcuM_StateType)16) +#endif /*ECUM_STATE_STARTUP*/ +#ifndef ECUM_STATE_STARTUP_ONE +#define ECUM_STATE_STARTUP_ONE ((EcuM_StateType)17) +#endif /*ECUM_STATE_STARTUP_ONE*/ +#ifndef ECUM_STATE_STARTUP_TWO +#define ECUM_STATE_STARTUP_TWO ((EcuM_StateType)18) +#endif /*ECUM_STATE_STARTUP_TWO*/ +#ifndef ECUM_STATE_WAKEUP +#define ECUM_STATE_WAKEUP ((EcuM_StateType)32) +#endif /*ECUM_STATE_WAKEUP*/ +#ifndef ECUM_STATE_WAKEUP_ONE +#define ECUM_STATE_WAKEUP_ONE ((EcuM_StateType)33) +#endif /*ECUM_STATE_WAKEUP_ONE*/ +#ifndef ECUM_STATE_WAKEUP_VALIDATION +#define ECUM_STATE_WAKEUP_VALIDATION ((EcuM_StateType)34) +#endif /*ECUM_STATE_WAKEUP_VALIDATION*/ +#ifndef ECUM_STATE_WAKEUP_REACTION +#define ECUM_STATE_WAKEUP_REACTION ((EcuM_StateType)35) +#endif /*ECUM_STATE_WAKEUP_REACTION*/ +#ifndef ECUM_STATE_WAKEUP_TWO +#define ECUM_STATE_WAKEUP_TWO ((EcuM_StateType)36) +#endif /*ECUM_STATE_WAKEUP_TWO*/ +#ifndef ECUM_STATE_WAKEUP_WAKESLEEP +#define ECUM_STATE_WAKEUP_WAKESLEEP ((EcuM_StateType)37) +#endif /*ECUM_STATE_WAKEUP_WAKESLEEP*/ +#ifndef ECUM_STATE_WAKEUP_TTII +#define ECUM_STATE_WAKEUP_TTII ((EcuM_StateType)38) +#endif /*ECUM_STATE_WAKEUP_TTII*/ +#ifndef ECUM_STATE_RUN +#define ECUM_STATE_RUN ((EcuM_StateType)48) +#endif /*ECUM_STATE_RUN*/ +#ifndef ECUM_STATE_APP_RUN +#define ECUM_STATE_APP_RUN ((EcuM_StateType)50) +#endif /*ECUM_STATE_APP_RUN*/ +#ifndef ECUM_STATE_APP_POST_RUN +#define ECUM_STATE_APP_POST_RUN ((EcuM_StateType)51) +#endif /*ECUM_STATE_APP_POST_RUN*/ +#ifndef ECUM_STATE_SHUTDOWN +#define ECUM_STATE_SHUTDOWN ((EcuM_StateType)64) +#endif /*ECUM_STATE_SHUTDOWN*/ +#ifndef ECUM_STATE_PREP_SHUTDOWN +#define ECUM_STATE_PREP_SHUTDOWN ((EcuM_StateType)68) +#endif /*ECUM_STATE_PREP_SHUTDOWN*/ +#ifndef ECUM_STATE_GO_SLEEP +#define ECUM_STATE_GO_SLEEP ((EcuM_StateType)73) +#endif /*ECUM_STATE_GO_SLEEP*/ +#ifndef ECUM_STATE_GO_OFF_ONE +#define ECUM_STATE_GO_OFF_ONE ((EcuM_StateType)77) +#endif /*ECUM_STATE_GO_OFF_ONE*/ +#ifndef ECUM_STATE_GO_OFF_TWO +#define ECUM_STATE_GO_OFF_TWO ((EcuM_StateType)78) +#endif /*ECUM_STATE_GO_OFF_TWO*/ +#ifndef ECUM_STATE_SLEEP +#define ECUM_STATE_SLEEP ((EcuM_StateType)80) +#endif /*ECUM_STATE_SLEEP*/ +#ifndef ECUM_STATE_OFF +#define ECUM_STATE_OFF ((EcuM_StateType)128) +#endif /*ECUM_STATE_OFF*/ +#ifndef ECUM_STATE_RESET +#define ECUM_STATE_RESET ((EcuM_StateType)144) +#endif /*ECUM_STATE_RESET*/ +#define EcuM_StateType_LowerLimit 0x10 +#define EcuM_StateType_UpperLimit 0x90 + +#define _DEFINED_TYPEDEF_FOR_EcuM_StateType_ + typedef float Float; #define _DEFINED_TYPEDEF_FOR_Float_ @@ -165,6 +249,15 @@ typedef uint8 Rte_ModeType_WdgMMode; #define RTE_MODE_WdgMMode_ALIVE_STOPPED ((Rte_ModeType_WdgMMode)4) #define RTE_MODE_WdgMMode_ALIVE_DEACTIVATED ((Rte_ModeType_WdgMMode)0) +typedef uint8 Rte_ModeType_EcuM_Mode; +#define RTE_TRANSITION_EcuM_Mode ((Rte_ModeType_EcuM_Mode)6) +#define RTE_MODE_EcuM_Mode_STARTUP ((Rte_ModeType_EcuM_Mode)4) +#define RTE_MODE_EcuM_Mode_RUN ((Rte_ModeType_EcuM_Mode)1) +#define RTE_MODE_EcuM_Mode_POST_RUN ((Rte_ModeType_EcuM_Mode)0) +#define RTE_MODE_EcuM_Mode_SLEEP ((Rte_ModeType_EcuM_Mode)3) +#define RTE_MODE_EcuM_Mode_WAKE_SLEEP ((Rte_ModeType_EcuM_Mode)5) +#define RTE_MODE_EcuM_Mode_SHUTDOWN ((Rte_ModeType_EcuM_Mode)2) + typedef struct { } Rte_PDS_Blinker_DigitalOutput_P; typedef struct { diff --git a/boards/mpc5516it/examples/led_rte/led_rte_ecuc_mpc5516.arxml b/boards/mpc5516it/examples/led_rte/led_rte_ecuc_mpc5516.arxml index 01657198..a5c6f7e4 100644 --- a/boards/mpc5516it/examples/led_rte/led_rte_ecuc_mpc5516.arxml +++ b/boards/mpc5516it/examples/led_rte/led_rte_ecuc_mpc5516.arxml @@ -95,6 +95,72 @@ User_1 /ArcCore/EcuM/EcuMConfiguration/EcuMUserConfig + + EcuMDefaultShutdownTarget + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultState + EcuMStateReset + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultSleepModeRef + + + + + EcuMSleepMode + + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeSuspend + false + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeMcuModeRef + /led_rte_ecuc_mpc5516/Mcu/McuModuleConfiguration/SLEEP + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMWakeupSourceMask + /led_rte_ecuc_mpc5516/EcuM/EcuMConfiguration/EcuMWakeupSource + + + + + EcuMWakeupSource + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMResetReason + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMValidationTimeout + 0.0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourceId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourcePolling + false + + + @@ -846,8 +912,28 @@ - - McuModeSettingConf + + RUN + + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf/McuMode + 0 + + + + + SLEEP + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf diff --git a/boards/mpc5516it/examples/os_simple/config/EcuM_Callout_Stubs.c b/boards/mpc5516it/examples/os_simple/config/EcuM_Callout_Stubs.c deleted file mode 100644 index 96d746c4..00000000 --- a/boards/mpc5516it/examples/os_simple/config/EcuM_Callout_Stubs.c +++ /dev/null @@ -1,332 +0,0 @@ -/* -* Configuration of module: EcuM (EcuM_Callout_Stubs.c) -* -* Created by: -* Copyright: -* -* Configured for (MCU): MPC551x -* -* Module vendor: ArcCore -* Generator version: 2.0.2 -* -* Generated by Arctic Studio (http://arccore.com) -*/ - - -#include "EcuM.h" -#include "EcuM_Generated_Types.h" -#include "Det.h" -#if defined(USE_DEM) -#include "Dem.h" -#endif -#if defined(USE_MCU) -#include "Mcu.h" -#endif -#if defined(USE_GPT) -#include "Gpt.h" -#endif -#if defined(USE_CAN) -#include "Can.h" -#endif -#if defined(USE_CANIF) -#include "CanIf.h" -#endif -#if defined(USE_PDUR) -#include "PduR.h" -#endif -#if defined(USE_COM) -#include "Com.h" -#endif -#if defined(USE_CANTP) -#include "CanTp.h" -#endif -#if defined(USE_J1939TP) -#include "J1939Tp.h" -#endif -#if defined(USE_DCM) -#include "Dcm.h" -#endif -#if defined(USE_PWM) -#include "Pwm.h" -#endif -#if defined(USE_IOHWAB) -#include "IoHwAb.h" -#endif -#if defined(USE_FLS) -#include "Fls.h" -#endif -#if defined(USE_EEP) -#include "Eep.h" -#endif -#if defined(USE_FEE) -#include "Fee.h" -#endif -#if defined(USE_EA) -#include "Ea.h" -#endif -#if defined(USE_NVM) -#include "NvM.h" -#endif -#if defined(USE_COMM) -#include "ComM.h" -#endif -#if defined(USE_NM) -#include "Nm.h" -#endif -#if defined(USE_CANNM) -#include "CanNm.h" -#endif -#if defined(USE_CANSM) -#include "CanSM.h" -#endif -#if defined(USE_UDPNM) -#include "UdpNm.h" -#endif -#if defined(USE_LINSM) -#include "LinSM.h" -#endif -#if defined(USE_SPI) -#include "Spi.h" -#endif -#if defined(USE_WDG) -#include "Wdg.h" -#endif -#if defined(USE_WDGM) -#include "WdgM.h" -#endif - -void EcuM_AL_DriverInitZero(void) -{ - Det_Init();/** @req EcuM2783 */ - Det_Start();/** @req EcuM2634 */ -} - -extern EcuM_ConfigType EcuMConfig; - -EcuM_ConfigType* EcuM_DeterminePbConfiguration(void) -{ - return &EcuMConfig; -} - -void EcuM_AL_DriverInitOne(const EcuM_ConfigType *ConfigPtr) -{ - (void)ConfigPtr; - //lint --e{715} PC-Lint (715) - ConfigPtr usage depends on configuration of modules - -#if defined(USE_MCU) - Mcu_Init(ConfigPtr->McuConfig); - - /* Set up default clock (Mcu_InitClock requires initRun==1) */ - /* Ignoring return value */ - (void) Mcu_InitClock( ConfigPtr->McuConfig->McuDefaultClockSettings ); - - // Wait for PLL to sync. - while (Mcu_GetPllStatus() != MCU_PLL_LOCKED) - { - ; - } -#endif - -#if defined(USE_DEM) - // Preinitialize DEM - Dem_PreInit(); -#endif - -#if defined(USE_PORT) - // Setup Port - Port_Init(ConfigPtr->PortConfig); -#endif - - -#if defined(USE_GPT) - // Setup the GPT - Gpt_Init(ConfigPtr->GptConfig); -#endif - - // Setup watchdog -#if defined(USE_WDG) - Wdg_Init(ConfigPtr->WdgConfig); -#endif -#if defined(USE_WDGM) - WdgM_Init(ConfigPtr->WdgMConfig); -#endif - -#if defined(USE_DMA) - // Setup DMA - Dma_Init(ConfigPtr->DmaConfig); -#endif - -#if defined(USE_ADC) - // Setup ADC - Adc_Init(ConfigPtr->AdcConfig); -#endif - - // Setup ICU - // TODO - - // Setup PWM -#if defined(USE_PWM) - // Setup PWM - Pwm_Init(ConfigPtr->PwmConfig); -#endif -} - -void EcuM_AL_DriverInitTwo(const EcuM_ConfigType* ConfigPtr) -{ - (void)ConfigPtr; - //lint --e{715} PC-Lint (715) - ConfigPtr usage depends on configuration of modules - -#if defined(USE_SPI) - // Setup SPI - Spi_Init(ConfigPtr->SpiConfig); -#endif - -#if defined(USE_EEP) - // Setup EEP - Eep_Init(ConfigPtr->EepConfig); -#endif - -#if defined(USE_FLS) - // Setup Flash - Fls_Init(ConfigPtr->FlashConfig); -#endif - -#if defined(USE_FEE) - // Setup FEE - Fee_Init(); -#endif - -#if defined(USE_EA) - // Setup EA - Ea_Init(); -#endif - -#if defined(USE_NVM) - // Setup NVRAM Manager and start the read all job - NvM_Init(); - NvM_ReadAll(); -#endif - - // Setup CAN tranceiver - // TODO - -#if defined(USE_CAN) - // Setup Can driver - Can_Init(ConfigPtr->CanConfig); -#endif - -#if defined(USE_CANIF) - // Setup CanIf - CanIf_Init(ConfigPtr->CanIfConfig); -#endif - -#if defined(USE_CANTP) - // Setup CAN TP - CanTp_Init(); -#endif - -#if defined(USE_CANSM) - CanSM_Init(ConfigPtr->CanSMConfig); -#endif - -#if defined(USE_J1939TP) - // Setup J1939Tp - J1939Tp_Init(ConfigPtr->J1939TpConfig); -#endif - - - // Setup LIN - // TODO - -#if defined(USE_PDUR) - // Setup PDU Router - PduR_Init(ConfigPtr->PduRConfig); -#endif - -#if defined(USE_CANNM) - // Setup Can Network Manager - CanNm_Init(ConfigPtr->CanNmConfig); -#endif - -#if defined(USE_UDPNM) - // Setup Udp Network Manager - UdpNm_Init(ConfigPtr->UdpNmConfig); -#endif - -#if defined(USE_NM) - // Setup Network Management Interface - Nm_Init(ConfigPtr->NmConfig); -#endif - -#if defined(USE_COM) - // Setup COM layer - Com_Init(ConfigPtr->ComConfig); -#endif - -#if defined(USE_DCM) - // Setup DCM - Dcm_Init(); -#endif - -#if defined(USE_IOHWAB) - // Setup IO hardware abstraction layer - IoHwAb_Init(); -#endif - -} - -void EcuM_AL_DriverInitThree(const EcuM_ConfigType* ConfigPtr) -{ - (void)ConfigPtr; - //lint --e{715} PC-Lint (715) - ConfigPtr usage depends on configuration of modules - -#if defined(USE_DEM) - // Setup DEM - Dem_Init(); -#endif - -#if defined(USE_COMM) - // Setup Communication Manager - ComM_Init(ConfigPtr->ComMConfig); -#endif -} - -void EcuM_OnEnterRUN(void) -{ - -} - -void EcuM_OnExitRun(void) -{ - -} - -void EcuM_OnExitPostRun(void) -{ - -} - -void EcuM_OnPrepShutdown(void) -{ - -} - -void EcuM_OnGoSleep(void) -{ - -} - -void EcuM_OnGoOffOne(void) -{ - -} - -void EcuM_OnGoOffTwo(void) -{ - -} - -void EcuM_AL_SwitchOff(void) -{ - -} diff --git a/boards/mpc5516it/examples/os_simple/config/EcuM_Cfg.h b/boards/mpc5516it/examples/os_simple/config/EcuM_Cfg.h index 5467b0b3..c98417e8 100644 --- a/boards/mpc5516it/examples/os_simple/config/EcuM_Cfg.h +++ b/boards/mpc5516it/examples/os_simple/config/EcuM_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.1.10 * * Generated by Arctic Studio (http://arccore.com) */ @@ -30,12 +30,26 @@ #define ECUM_NVRAM_WRITEALL_TIMEOUT (10000) #define ECUM_NVRAM_MIN_RUN_DURATION (10000) +#define ECUM_VALIDATION_TIMEOUT 0 typedef enum { ECUM_USER_EcuMUserConfig, ECUM_USER_ENDMARK // Must be the last in list! } EcuM_UserList; +// EcuM Sleep Mode IDs +#define ECUM_SLEEP_MODE_EcuMSleepMode 0 +#define ECUM_SLEEP_MODE_CNT 1 + +typedef enum { + ECUM_WKSOURCE_POWER = (1<<0), + ECUM_WKSOURCE_RESET = (1<<1), + ECUM_WKSOURCE_INTERNAL_RESET = (1<<2), + ECUM_WKSOURCE_INTERNAL_WDG = (1<<3), + ECUM_WKSOURCE_EXTERNAL_WDG = (1<<4), + ECUM_WKSOURCE_ECUMWAKEUPSOURCE = (1<<5), + ECUM_WKSOURCE_ALL_SOURCES = 0x3FFFFFFF +} EcuM_WakeupSourceType ; #endif /*ECUM_CFG_H_*/ diff --git a/boards/mpc5516it/examples/os_simple/config/EcuM_Generated_Types.h b/boards/mpc5516it/examples/os_simple/config/EcuM_Generated_Types.h deleted file mode 100644 index d74e5b8d..00000000 --- a/boards/mpc5516it/examples/os_simple/config/EcuM_Generated_Types.h +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Configuration of module: EcuM (EcuM_Generated_Types.h) -* -* Created by: -* Copyright: -* -* Configured for (MCU): MPC551x -* -* Module vendor: ArcCore -* Generator version: 2.0.2 -* -* Generated by Arctic Studio (http://arccore.com) -*/ - - -#if !(((ECUM_SW_MAJOR_VERSION == 2) && (ECUM_SW_MINOR_VERSION == 0)) ) -#error EcuM: Configuration file expected BSW module version to be 2.0.* -#endif - - -#ifndef _ECUM_GENERATED_TYPES_H_ -#define _ECUM_GENERATED_TYPES_H_ - -#ifdef CFG_ECUM_USE_SERVICE_COMPONENT -#include "Rte_EcuM.h" -#endif - -#include "EcuM_Types.h" - -#if defined(USE_MCU) -#include "Mcu.h" -#endif -#if defined(USE_PORT) -#include "Port.h" -#endif -#if defined(USE_CAN) -#include "Can.h" -#endif -#if defined(USE_CANIF) -#include "CanIf.h" -#endif -#if defined(USE_PWM) -#include "Pwm.h" -#endif -#if defined(USE_COM) -#include "Com.h" -#endif -#if defined(USE_PDUR) -#include "PduR.h" -#endif -#if defined(USE_DMA) -#include "Dma.h" -#endif -#if defined(USE_ADC) -#include "Adc.h" -#endif -#if defined(USE_GPT) -#include "Gpt.h" -#endif -#if defined(USE_COMM) -#include "ComM.h" -#endif -#if defined(USE_NM) -#include "Nm.h" -#endif -#if defined(USE_CANNM) -#include "CanNm.h" -#endif -#if defined(USE_CANSM) -#include "CanSM.h" -#endif -#if defined(USE_J1939TP) -#include "J1939Tp.h" -#endif -#if defined(USE_UDPNM) -#include "UdpNm.h" -#endif -#if defined(USE_LINSM) -#include "LinSM.h" -#endif -#if defined(USE_FLS) -#include "Fls.h" -#endif -#if defined(USE_EEP) -#include "Eep.h" -#endif -#if defined(USE_SPI) -#include "Spi.h" -#endif -#if defined(USE_WDG) -#include "Wdg.h" -#endif -#if defined(USE_WDGM) -#include "WdgM.h" -#endif -#if defined(USE_WDGIF) -#include "WdgIf.h" -#endif - - -typedef struct -{ - EcuM_StateType EcuMDefaultShutdownTarget; - uint8 EcuMDefaultSleepMode; - AppModeType EcuMDefaultAppMode; - uint32 EcuMRunMinimumDuration; - uint32 EcuMNvramReadAllTimeout; - uint32 EcuMNvramWriteAllTimeout; - -#if defined(USE_MCU) - const Mcu_ConfigType* McuConfig; -#endif -#if defined(USE_PORT) - const Port_ConfigType* PortConfig; -#endif -#if defined(USE_CAN) - const Can_ConfigType* CanConfig; -#endif -#if defined(USE_CANIF) - const CanIf_ConfigType* CanIfConfig; -#endif -#if defined(USE_CANSM) - const CanSM_ConfigType* CanSMConfig; -#endif -#if defined(USE_NM) - const Nm_ConfigType* NmConfig; -#endif -#if defined(USE_CANNM) - const CanNm_ConfigType* CanNmConfig; -#endif -#if defined(USE_UDPNM) - const UdpNm_ConfigType* UdpNmConfig; -#endif -#if defined(USE_COMM) - const ComM_ConfigType* ComMConfig; -#endif -#if defined(USE_COM) - const Com_ConfigType* ComConfig; -#endif -#if defined(USE_J1939TP) - const J1939Tp_ConfigType* J1939TpConfig; -#endif -#if defined(USE_PDUR) - const PduR_PBConfigType* PduRConfig; -#endif -#if defined(USE_PWM) - const Pwm_ConfigType* PwmConfig; -#endif -#if defined(USE_DMA) - const Dma_ConfigType* DmaConfig; -#endif -#if defined(USE_ADC) - const Adc_ConfigType* AdcConfig; -#endif -#if defined(USE_GPT) - const Gpt_ConfigType* GptConfig; -#endif -#if defined(USE_FLS) - const Fls_ConfigType* FlashConfig; -#endif -#if defined(USE_EEP) - const Eep_ConfigType* EepConfig; -#endif -#if defined(USE_SPI) - const Spi_ConfigType* SpiConfig; -#endif -#if defined(USE_WDG) - const Wdg_ConfigType* WdgConfig; -#endif -#if defined(USE_WDGIF) - const WdgIf_ConfigType* WdgIfConfig; -#endif -#if defined(USE_WDGM) - const WdgM_ConfigType* WdgMConfig; -#endif -} EcuM_ConfigType; - -#endif /*_ECUM_GENERATED_TYPES_H_*/ diff --git a/boards/mpc5516it/examples/os_simple/config/EcuM_PBcfg.c b/boards/mpc5516it/examples/os_simple/config/EcuM_PBcfg.c index 072d9958..13661ad8 100644 --- a/boards/mpc5516it/examples/os_simple/config/EcuM_PBcfg.c +++ b/boards/mpc5516it/examples/os_simple/config/EcuM_PBcfg.c @@ -7,13 +7,12 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.1.10 * * Generated by Arctic Studio (http://arccore.com) */ - #include "EcuM.h" #include "EcuM_Generated_Types.h" @@ -37,6 +36,39 @@ extern const ComM_ConfigType ComM_Config; extern const J1939Tp_ConfigType J1939Tp_Config; #endif +#if defined(USE_WDGM) +const EcuM_WdgMType EcuM_WdgMConfig = { + .EcuMSupervisedEntity = NULL, + .EcuMWdgMWakeupMode = NULL, + .EcuMWdgMStartupMode = NULL, + .EcuMWdgMRunMode = NULL, + .EcuMWdgMPostRunMode = NULL, + .EcuMWdgMShutdownMode = NULL, +}; +#endif + +const EcuM_SleepModeType EcuM_SleepModeConfig[] = { + { // EcuMSleepMode + .EcuMSleepModeId = ECUM_SLEEP_MODE_EcuMSleepMode, + .EcuMWakeupSourceMask = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + .EcuMSleepModeMcuMode = MCU_MODE_SLEEP, +#if defined(USE_WDGM) + .EcuMSleepModeWdgMMode = NULL, +#endif + } +}; + +const EcuM_WakeupSourceConfigType EcuM_WakeupSourceConfig[] = { + { // EcuMWakeupSource + .EcuMWakeupSourceId = ECUM_WKSOURCE_ECUMWAKEUPSOURCE, + .EcuMWakeupSourcePolling = false, + .EcuMValidationTimeout = 0, +#if defined(USE_COMM) + .EcuMComMChannel = NULL, +#endif + } +}; + EcuM_ConfigType EcuMConfig = { @@ -46,54 +78,58 @@ EcuM_ConfigType EcuMConfig = .EcuMNvramReadAllTimeout = ECUM_NVRAM_READALL_TIMEOUT, .EcuMNvramWriteAllTimeout = ECUM_NVRAM_WRITEALL_TIMEOUT, .EcuMRunMinimumDuration = ECUM_NVRAM_MIN_RUN_DURATION, +#if defined(USE_WDGM) + .EcuMWdgMConfig = &EcuM_WdgMConfig, +#endif + .EcuMSleepModeConfig = &EcuM_SleepModeConfig, #if defined(USE_MCU) - .McuConfig = McuConfigData, + .McuConfig = McuConfigData, #endif #if defined(USE_PORT) - .PortConfig = &PortConfigData, + .PortConfig = &PortConfigData, #endif #if defined(USE_CAN) - .CanConfig = &CanConfigData, + .CanConfig = &CanConfigData, #endif #if defined(USE_CANIF) - .CanIfConfig = &CanIf_Config, + .CanIfConfig = &CanIf_Config, #endif #if defined(USE_CANSM) - .CanSMConfig = &CanSM_Config, + .CanSMConfig = &CanSM_Config, #endif #if defined(USE_CANNM) - .CanNmConfig = &CanNm_Config, + .CanNmConfig = &CanNm_Config, #endif #if defined(USE_UDPNM) - .UdpNmConfig = &UdpNm_Config, + .UdpNmConfig = &UdpNm_Config, #endif #if defined(USE_COM) - .ComConfig = &ComConfiguration, + .ComConfig = &ComConfiguration, #endif #if defined(USE_COMM) - .ComMConfig = &ComM_Config, + .ComMConfig = &ComM_Config, #endif #if defined(USE_J1939TP) - .J1939TpConfig = &J1939Tp_Config, + .J1939TpConfig = &J1939Tp_Config, #endif #if defined(USE_NM) - .NmConfig = &Nm_Config, + .NmConfig = &Nm_Config, #endif #if defined(USE_PDUR) - .PduRConfig = &PduR_Config, + .PduRConfig = &PduR_Config, #endif #if defined(USE_J1939TP) - .J1939TpConfig = &J1939Tp_Config, + .J1939TpConfig = &J1939Tp_Config, #endif #if defined(USE_DMA) - .DmaConfig = DmaConfig, + .DmaConfig = DmaConfig, #endif #if defined(USE_ADC) - .AdcConfig = AdcConfig, + .AdcConfig = AdcConfig, #endif #if defined(USE_PWM) - .PwmConfig = &PwmConfig, + .PwmConfig = &PwmConfig, #endif #if defined(USE_WDG) .WdgConfig = &WdgConfig, @@ -105,7 +141,7 @@ EcuM_ConfigType EcuMConfig = .WdgIfConfig = &WdgIfConfig, #endif #if defined(USE_GPT) - .GptConfig = GptConfigData, + .GptConfig = GptConfigData, #endif #if defined(USE_FLS) .FlashConfig = FlsConfigSet, diff --git a/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.c b/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.c index d66f94d4..4aff46d1 100644 --- a/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.c +++ b/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.0.3 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.h b/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.h index a357e4da..6c8cbc6a 100644 --- a/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.h +++ b/boards/mpc5516it/examples/os_simple/config/Mcu_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.2 +* Generator version: 2.0.3 * * Generated by Arctic Studio (http://arccore.com) */ @@ -26,6 +26,14 @@ #define MCU_PERFORM_RESET_API STD_ON #define MCU_VERSION_INFO_API STD_ON + +typedef enum { + MCU_MODE_RUN = 0, + MCU_MODE_SLEEP = 1, + MCU_MODE_NORMAL = 2 // Here for backwards compatibility reasons. Not used anymore. +} Mcu_ModeType; + + typedef enum { MCU_CLOCKTYPE_EXT_REF_80MHZ = 0, MCU_CLOCKTYPE_EXT_REF_66MHZ = 1, diff --git a/boards/mpc5516it/examples/os_simple/config/Port_Cfg.c b/boards/mpc5516it/examples/os_simple/config/Port_Cfg.c index f9f4c7d8..d61e70b8 100644 --- a/boards/mpc5516it/examples/os_simple/config/Port_Cfg.c +++ b/boards/mpc5516it/examples/os_simple/config/Port_Cfg.c @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.1 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ @@ -71,24 +71,24 @@ const uint16_t PortPadConfigData[] = { ( PORT_FUNC1 | PORT_IBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 49 : PORT_PIN_MODE_CAN */ ( PORT_PCR_RESET | PORT_IBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 50 : PORT_PIN_MODE_OTHER */ PORT_PCR_RESET, /* PCR 51 */ - ( PORT_FUNC0 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 52 : PORT_PIN_MODE_DIO */ - ( PORT_FUNC0 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 53 : PORT_PIN_MODE_DIO */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 52 : PORT_PIN_MODE_DIO */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 53 : PORT_PIN_MODE_DIO */ PORT_PCR_RESET, /* PCR 54 */ PORT_PCR_RESET, /* PCR 55 */ ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 56 : PORT_PIN_MODE_OTHER */ ( PORT_PCR_RESET | PORT_IBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 57 : PORT_PIN_MODE_OTHER */ PORT_PCR_RESET, /* PCR 58 */ PORT_PCR_RESET, /* PCR 59 */ - ( PORT_FUNC1 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 60 : PORT_PIN_MODE_SPI */ - ( PORT_FUNC1 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 61 : PORT_PIN_MODE_SPI */ - ( PORT_FUNC1 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 62 : PORT_PIN_MODE_SPI */ - ( PORT_FUNC1 | PORT_IBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 63 : PORT_PIN_MODE_SPI */ - ( PORT_FUNC1 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 64 : PORT_PIN_MODE_SPI */ - ( PORT_FUNC1 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 65 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 60 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 61 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 62 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_IBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 63 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 64 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 65 : PORT_PIN_MODE_SPI */ PORT_PCR_RESET, /* PCR 66 */ - ( PORT_FUNC1 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 67 : PORT_PIN_MODE_SPI */ - ( PORT_FUNC1 | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 68 : PORT_PIN_MODE_SPI */ - ( PORT_FUNC1 | PORT_IBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 69 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 67 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_OBE_ENABLE | PORT_SLEW_RATE_MAX | PORT_PULL_NONE ), /* PCR 68 : PORT_PIN_MODE_SPI */ + ( PORT_PCR_RESET | PORT_IBE_ENABLE | PORT_SLEW_RATE_MIN | PORT_PULL_NONE ), /* PCR 69 : PORT_PIN_MODE_SPI */ PORT_PCR_RESET, /* PCR 70 */ PORT_PCR_RESET, /* PCR 71 */ PORT_PCR_RESET, /* PCR 72 */ diff --git a/boards/mpc5516it/examples/os_simple/config/Port_Cfg.h b/boards/mpc5516it/examples/os_simple/config/Port_Cfg.h index d43c7076..551c4894 100644 --- a/boards/mpc5516it/examples/os_simple/config/Port_Cfg.h +++ b/boards/mpc5516it/examples/os_simple/config/Port_Cfg.h @@ -7,7 +7,7 @@ * Configured for (MCU): MPC551x * * Module vendor: ArcCore -* Generator version: 2.0.1 +* Generator version: 2.0.2 * * Generated by Arctic Studio (http://arccore.com) */ diff --git a/boards/mpc5516it/examples/os_simple/os_simple_mpc5516it.arxml b/boards/mpc5516it/examples/os_simple/os_simple_mpc5516it.arxml index 25616b36..defefd40 100644 --- a/boards/mpc5516it/examples/os_simple/os_simple_mpc5516it.arxml +++ b/boards/mpc5516it/examples/os_simple/os_simple_mpc5516it.arxml @@ -238,8 +238,28 @@ - - McuModeSettingConf + + RUN + + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf/McuMode + 0 + + + + + SLEEP + + + + + /ArcCore/Mcu/McuModuleConfiguration/McuModeSettingConf @@ -1702,6 +1722,72 @@ EcuMUserConfig /ArcCore/EcuM/EcuMConfiguration/EcuMUserConfig + + EcuMDefaultShutdownTarget + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultState + EcuMStateReset + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMDefaultShutdownTarget/EcuMDefaultSleepModeRef + + + + + EcuMSleepMode + + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeSuspend + false + + + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMSleepModeMcuModeRef + /os_simple_mpc5516it/Mcu/McuModuleConfiguration/SLEEP + + + /ArcCore/EcuM/EcuMConfiguration/EcuMSleepMode/EcuMWakeupSourceMask + /os_simple_mpc5516it/EcuM/EcuMConfiguration/EcuMWakeupSource + + + + + EcuMWakeupSource + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMResetReason + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMValidationTimeout + 0.0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourceId + 0 + + + /ArcCore/EcuM/EcuMConfiguration/EcuMWakeupSource/EcuMWakeupSourcePolling + false + + +