MotoHawk:Blocks:Application Monitor
Contents
Application Monitor Definition
This MotoHawk™ block sets up the Continuous Built-In Tests (CBIT) in every MotoHawk application.
Block ID
motohawk_app_monitor
Library
MotoHawk_lib/System Debug Blocks
Description
This block is used to monitor the application's stack, heap, idle CPU usage, and OS errors for the 5xx processor modules. Upon discovery of a critical error, the application is stopped and certain actuators shut down safely. These currently include the Injector and Spark Sequence blocks. In the "System | Debug | Application Monitor" section, various display variables may be used to diagnose the problem.
At any time, the application is in one of four states: Init, Run, Pause, or Stop, and may be manually set from MotoTune. Init pauses after it has started up and before it runs any application code. Run has the program run until the application monitor is triggered for low stacks/heap, or high processor use. Pause, stops the application where it currently is in the app. Stop, stops the application where it is and puts all outputs in a safe state (this includes MPRD).
Modules
The Application Monitor Definition Block is supported on the 48, 80, and 128 pin ECUs. For the other modules, use the Second Generation Application Monitor Block instead.
Block Parameters
Parameter Field | Values | Comments/Description |
---|---|---|
Foreground Stack Margin [bytes] | Numeric | Allot number of bytes for the foreground stack. |
Foreground Angle Stack Margin [bytes] | Numeric | Allot number of bytes for the foreground angle stack. |
Background Stack Margin [bytes] | Numeric | Allot number of bytes for the background stack. |
Idle Stack Margin [bytes] | Numeric | Allot number of bytes for the idle stack. |
Interrupt Stack Margin [bytes] | Numeric | Allot number of bytes for the interrupt stack. |
Heap Margin [bytes] | Numeric | Allot number of bytes for the heap. |
CPU Margin [%] | Numeric (0-100) | Set percentage of CPU usage allowed. |
Enable Monitor | Enabled/Disabled | Enable/Disable this monitor. |
On Startup | Set Pause point, if any, for monitoring status. | |
Pause Before Model Initialization | As listed. | |
Pause After Model Init - Before STARTUP Event | As listed. | |
Pause After STARTUP Event - Before Run | As listed. | |
Do Not Pause on Startup | As listed. |