Main Content

Overrun detection

You can configure a Simulink® model running on the target hardware to detect and notify you when a task overrun occurs. A task overrun occurs if the target hardware is still performing one instance of a task when the next instance of that task is scheduled to begin.

You can fix overruns by decreasing the frequency with which tasks are scheduled to run, and/or by reducing the number of tasks defined by your model.

If those solutions do not fix the task overrun condition, and you are using external mode or profiling, consider disabling external mode or profiling as both introduces additional code overhead.

Enable overrun detection

Enable to detect and notify when task overrun occurs.

Set/Clear/Toggle GPIO

Enable to select the General Purpose Input/Output (GPIO) action to notify on overrun.

Digital output pin to set an overrun

Specify the pin number of the digital output(GPIO) to notify on overrun.

Set GPIO mode

Select either Set, Clear, or Toggle as the GPIO action on overrun.

  • Set - GPIO value will be set on overrun. Initial value is clear.

  • Clear - GPIO value will be cleared on overrun. Initial value is set.

  • Toggle - GPIO value toggles on overrun. Initial value is clear.

Additional notification option

Select to notify through any of the additional notification option on overrun: None, Trigger interrupt, or Call user-defined function.

PIE number

Specify the Peripherals Interrupt Expansion (PIE) number for the interrupt to trigger on overrun.

This parameter appears only for specific processors and when the parameter Additional notification option is set to Trigger interrupt.

CPU number

Specify the CPU number for the interrupt to trigger on overrun.

This parameter appears only for specific processors and when the parameter Additional notification option is set to Trigger interrupt.

Interrupt number

Specify the interrupt number to trigger on overrun.

This parameter is available only for F2838x (ARM Cortex-M4) processor and if the parameter Additional notification option is set to Trigger interrupt.

Name of the function

Specify the name of the custom C function to be called on overrun.

This parameter is available only if you set the parameter Additional notification option as Call user-defined function. For more information, refer Model Configuration Parameters: Code Generation Custom Code (Simulink Coder).

Related Topics