StartUpGraphic

MICRO
RESET
Out of Reset
























































































































































































































































































































































































































































































































































































































































































































































In Reset



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































TOD
STATE
Pwr On
























































































































































































































































































































































































































































































































































































































































































































































Pwr Off



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































WATCHDOG
STATE
Active
























































































































































































































































































































































































































































































































































































































































































































































Inactive



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































ERROR-OUT
STATE
Normal
























































































































































































































































































































































































































































































































































































































































































































































Faulted



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































INTRPT VECTOR TBLEbase
























































































































































































































































































































































































































































































































































































































































































































































Rbase



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































ECM
STATE
Intlzd
























































































































































































































































































































































































































































































































































































































































































































































Not Intlzd



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































DIAG MGR
STATE
Avail
























































































































































































































































































































































































































































































































































































































































































































































Not Avail



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Motor Control ISRActive
























































































































































































































































































































































































































































































































































































































































































































































Not Active















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































FDD Ref.













CM110A_FblStrtUpCfg



















CM112A_CoreVltgMonrCM106A _McuCoreConfigAndDiagcCM104A_EcmOutpAndDiagc






































CM107A_GuardCfgAndDiagcCM108A_DataAndAdrPar















CM101A_ExcpnHdlg





CM107A_GuardCfgAndDiagcCM800A_SyncCrcCM102A_FlsMem

















































































































































































































































































































































































































































































































































































































































































































































































































Hardware Power UpBIST ExecutionLock Step Init*Init Local RAMInit DTS RAMBSS/Data SectionsPower On Reset?
























































































































































































































































































































































































































































































































































































































































































































































































































































































* BRAMDAT0 = FlsProgmReq or























































































































































































































































































































































































































































































































































































* Includes































Yes è

Backup RAM Test





















































































































No app or cals?























































































































































































































































































































































































































































































































































































FPU Init










































































































































































































































































































































































































































































































































































































































































































































Init Server Runnable Names













GP Init







































Pass è

McuDiag = PwrOnRstConfigure BIST Reset (only on POR)AConfigure Code Flash ECCConfigure Data Flash ECC OffConfigure Local RAM ECC / I CacheInit SPI ECC Peripheral MemConfg SEGCONTInit SPIInit PortsBStay in FBL*?










































































MCALMcuCoreCfgAndDiagcInit1McuCoreCfgAndDiagcInit2EcmOutpAndDiagcInit3MCALEcmOutpAndDiagcInit4EcmOutpAndDiagcInit1






























GuardCfgAndDiagcInit3DataAndAdrParInit1















ExcpnHdlgInit1





GuardCfgAndDiagcInit1SyncCrcInit0FlsMemInit2




































































System Reg Init

























































































































































































































































































































































































































































































































































































































































































































































MPU Init







































Fail è

McuDiag = BackupRamTstFailr











































































Yes è

Temporal Monitor to Flash ModeInit FEE for FBLInit Serial CommPROGRAMMING….McuDiag = FlsProgmCmplSW RESETX


























































































































































































































































































































































































































































































































Cache init































































































































































































































































































































































































































































































































































































































































































































































































































































































































No è

Reset Temporal MonitorJump to ApplicationCEstablish C EnvironmentInit DET(ExecStrtUpTest == TRUE)?























(PowerOnReset == TRUE) AND (DebugMode = OFF)?


















(ExecStrtUpTest == TRUE) AND (DebugMode = OFF)?






































































































































































































































































































































































































































No è

CVM Low Reset?











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Yes è

CVM Start Up Test

































Yes è

BIST Checks






























Yes è

Lock Step Tests












(ExecStrtUpTest == TRUE) AND (ECM Status Bits = 0)?































EInit ECM*(ExecStrtUpTest == TRUE) AND (ECM Status Bits = 0)?















































Init AutoSAR SPI DriversInit PortsEnable Watchdog ISRStart Watchdog(ExecStrtUpTest == TRUE)?
























(ExecStrtUpTest == TRUE)?






























Init Digital IOInit Flash DriverEnable FPU ExceptionsFStartOS*Configure GuardsSync CRC InitFlash Mem Init*CRC Check StartInit FEE and LoadInit DEMConfig Prog Flow / Alive MonitorsGStart Alarms / Run RTE InitsPERIODICS RUN




Condition to Check If a test has to be performed for Power On Reset/ Soft Reset/ Hard Reset:



















































Yes è

McuDiag = CoreVltgMonLoClear CVM Error




















































































































































































































































































































































































































































































































































































































































ChkForStrtUpTest ( Address of ExecStrtUpTest)















































































































































































































































































Pass è

* Do Nothing *























Pass è

* Do Nothing *
























Pass è

* Do Nothing *

















Pass è

EI Interrupt Test

























*MCU_Init()






















Yes è

Pseudo Error Injection















ECM Compare Tests






















































Yes è

PBG Start Up Test






















Yes è

P Bus Data Parity Start Up Test










































* Init MPUs, User mode























* This function starts the Cofe Flash CRC









































* Includes DMA initialization





















If (ExecStrtUpTest == TRUE)



















































No è

CVM High Reset?




































































































































































































































































































































































































































































































































































































































































Enable Motor Control ISR





















{















































































































































































































































































Fail è

McuDiag = CVM Start Up Test Failure























Fail è

McuDiag = Bist Failures
























Fail è

McuDiag = Lock Step failures
























Pass è

* Do Nothing *

































Pass è

* Do Nothing *





Pass è

* Do Nothing *



















































Pass è

* Do Nothing *






















Pass è

* Do Nothing *





























































































Start OS Timer






















Execute Start Up Test

























































Yes è

McuDiag = CoreVltgMonHiClear CVM Error





























































































































































































































































































































































































































































































































































































































AutoSAR mode to RUN





















}







































































































































































































































































No è

* Do Nothing *

















No è

* Do Nothing *

















No è

* Do Nothing *
























Fail è

McuDiag = EI Interrupt Test Failure

































Fail è

McuDiag = Pseudo Error Injection Failure





Fail è

McuDiag = Mst/Chkr Compare



















































Fail è

McuDiag = PBG Start Up Test Fault






















Fail è

McuDiag = P Bus Data Parity Start Up Test





























































































INITs Execute

















































































No è

Pin Reset ?





























































































































































































































































































































































































































































































































































































































































Reset Cause




























































































































































































































































































































































































































Fail è

McuDiag = ECM Start Up Fault/FACI Reset Transfer Error
























No è

* Do Nothing *








































No è

Do Nothiing








No è

Do Nothiing























































































































































































Yes è

McuDiag = PinRstClear POF Flag


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































No è

ECM Reset ?







































































































































































































































































































Check for ECM Bits that are set from reset.
FACI Reset is a special case because it is being checked in the If-Else If Conditions.
If(FACI Reset Bit Clear and No ECM Bits Set, Perform Test)
Else If (FACI Bit Set, Set BRAMDAT with FACI Error)
Else If (Any other ECM Bits set, Set BRAMDAT0 with ECM Start Up Fault)
Else (ExecStrtUpTest = False, Do Nothing)

*MCU_Init() does not clear the ECM Bits due to RESF Bits being cleared in FBL on an ECM Reset.
On a Power On Reset and SW Reset, irrespective of the RESF Bits, the MCU_Init does not clear the ECM Error Status Registers and there is no reason to clear the ECM Status Register. ECM Status Register gets cleared on a Power On Reset.




















































































































































































































































































































































































































































































































































































































































































































Rationale: PBG Lock bits once set, don't allow the control registers to chagne its values. Hence it is required that this Start Up test is run before the Guard is configured









































































































































































































































Yes è

McuDiag = EcmRstClear POF Flag













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































No è

Software Reset?












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Yes è

Clear POF Flag





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































No è

Debug Mode?










































































































































































































































































































































































Rationale: When out an ECM Reset, the BRAMDAT0 is loaded with ECMRESET value and cannot be over written. This value is then checked in the Reset Cause and the ECM Bits are checked if it's a Lockstep Error and the NTC is logged. Hence we do not clear the ECM Status Bits.
In the Else case Statement, we are supposed to check for the ECM bits and log it as a ECM Start Up Fault. This means that the bit was set during the window where the Init3 ends and the MCU_Init() configuraiton is complete.








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Yes è

* Do Nothing *







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































No è

McuDiag = RstUkwn











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Last modified October 12, 2025: Initial commit (1fadfc4)