/* Timestamp each DriverInitList callback */
Break.Set EcuM_AL_DriverInitOne /Program TASK_ID Task_Init
Break.Set EcuM_AL_DriverInitTwo /Program
Break.Set NvM_ReadAll /Program
Break.Set EcuM_AL_RunSelfConf /Program
/* Log timestamps with Analyzer */
Analyzer.AutoSave "startup_trace.ad"
Go
/* Typical output:
EcuM_AL_DriverInitOne t=0 ms
Mcu_Init t=0.2 ms
Can_Init t=1.1 ms ← 0.9 ms
Fls_Init t=1.3 ms ← 0.2 ms
EcuM_AL_DriverInitTwo t=2.0 ms
NvM_Init t=2.1 ms
NvM_ReadAll (complete) t=85 ms ← 83 ms! (top target)
FULL_RUN t=91 ms
Optimization targets: NvM ReadAll (83ms), Flash driver (120ms if slow SPI) */| Startup Phase | Typical Duration | Optimization Potential |
|---|---|---|
| Mcu_Init (PLL lock) | 2–8 ms | Limited — PLL hardware constraint |
| Can_Init (bit timing) | 0.5–2 ms | Minimal |
| Fls_Init (SPI flash self-test) | 10–120 ms | Disable self-test in production via FlsInitCheckConfig=FALSE |
| NvM_ReadAll (all blocks) | 40–200 ms | Reduce block count; use early COM activation to overlap with app start |
| BswM FULL_RUN transition | 1–5 ms | Minimal; optimise mode rule evaluation complexity |