ECU Reset
OpenECU can reset for various reasons. The put_Reset block provides an output flag for the events below. The flag is set to 1 for the event causing the last reset.
Flag |
Cause |
How to Debug |
---|---|---|
power_reset |
Loss of power to the module |
|
watchdog_reset |
Watchdog timeout |
|
access_reset |
Invalid memory access |
|
fp_reset |
Invalid floating-point operation |
|
mem_reset |
Memory corruption |
|
forced_reset |
Forced reset by application |
|
unknown_reset |
Other unknown causes |
|
If the application can’t run long enough to read reset flags, consult the Flash Code Output.
Watchdog Reset
The ECU has an internal watchdog requiring periodic updates. The psc_CpuLoading block can monitor CPU load. Absent a psc_KickWatchdog block, OpenECU updates the watchdog automatically.
Note
Infinite loops could cause watchdog resets, although unlikely in pure Simulink models.
Stack Overflow
Monitor stack usage with the psc_StackUsed block. The default stack size is 8192 bytes. To change it, see How to change the stack size.