void EcuM_StartupTwo(void) { #if defined(USE_SCHM) SchM_Init(); #endif #if defined(USE_BSWM) BswM_Init(EcuM_World.config->BswMConfig); #endif }
/** * Part of STARTUP I * * @param ConfigPtr */ void EcuM_AL_DriverInitOne(const EcuM_ConfigType *ConfigPtr) { (void)ConfigPtr; #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) { ; } Mcu_DistributePllClock(); #endif #if defined(USE_DEM) // Preinitialize DEM NO_DRIVER(Dem_PreInit(ConfigPtr->DemConfig)); #endif #if defined(USE_PORT) // Setup Port Port_Init(ConfigPtr->PortConfig); #endif #if defined(USE_DIO) // Setup Dio Dio_Init(ConfigPtr->DioCfg); #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) NO_DRIVER(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 #if defined(USE_BSWM) // Setup BSWM - not supporting configustructure for BswM BswM_Init(NULL); #endif // Setup ICU #if defined(USE_ICU) Icu_Init(ConfigPtr->IcuConfig); #endif // Setup PWM #if defined(USE_PWM) // Setup PWM Pwm_Init(ConfigPtr->PwmConfig); #endif // Setup OCU #if defined(USE_OCU) Ocu_Init(ConfigPtr->OcuConfig); #endif #if defined(CFG_SHELL) SHELL_Init(); #endif }
void EcuM_Callout_DriverInitListTwo(void) { /* status of NvM initialization */ NvM_RequestResultType Result; BswM_Init(BswM_ConfigPtr); Fls_Init(NULL_PTR); #ifdef BASE_EA_ENABLED EA_INIT_FUNC(); #endif #ifdef BASE_FEE_ENABLED FEE_INIT_FUNC(); /* wait for FEE to complete the init sequence */ do { Fee_MainFunction(); Fls_MainFunction(); } while (MEMIF_IDLE != Fee_GetStatus()); #endif #ifdef BASE_NVM_ENABLED NVM_INIT_FUNC(); NvM_ReadAll(); /* wait for the NvM_ReadAll() to complete - some of the remaining modules need valid NvRam data... */ do { NvM_MainFunction(); Fee_MainFunction(); Fls_MainFunction(); (void)NvM_GetErrorStatus(NvMConf_NvMBlockDescriptor_NvMBlock_ConfigID, &Result); } while (Result == NVM_REQ_PENDING); #endif LinEmuUart_Init(); Can_InitMemory(); Can_Init(&CanConfigSet); CanIf_InitMemory(); CanIf_Init(&CanIf_Config); //CanNm_Init(&CanNmGlobalConfig); //Nm_Init(&Nm_Configuration0); PduR_InitMemory(); PduR_Init(&PduRGlobalConfig); Com_InitMemory(); Com_Init(&ComConfig); CanSM_InitMemory(); CanSM_Init(); CanTp_InitMemory(); CanTp_Init(); ComM_InitMemory(); ComM_Init(&ComMConfig); Xcp_Init(NULL); FiM_Init(&FiM_Config_0); DiagMeas_Init(); DiagCtrl_Init(); SCI_B6Bridge_Init(); SCI_Pfc_Init(); SCI_IOHW_Init(); #ifdef BASE_DEM_ENABLED DEM_INIT_FUNC(); /* start the standard operation cycle */ /* (void) Dem_SetOperationCycleState(DEM_OPCYC_POWER, DEM_CYCLE_STATE_START); */ #endif Dcm_Init(); }