When to use:
When to use:
When NOT to use:
The MCU OVERLOAD block monitors the multitasking scheduler for deadline violations. It outputs a bitmask indicating which task(s) experienced overload and optionally drives a GPIO pin high when any overload occurs.

| Port | Data Type | Description |
|---|---|---|
| (Overload Status) | uint16 | Bitmask of task overload status (bit N = TID N overload) |
| Parameter | Variable | Description | Values |
|---|---|---|---|
| Enable Block Output | MCUOverloadBlockOutput | Enable the block output port | on / off |
| MCU Overload PIN | MCUOverLoadPin | GPIO pin set high asynchronously when overload occurs | None | Any available GPIO pin |
| Sample Time | SampleTime | Block output update rate | Any positive value (e.g., 0.001) |
The block output is a 16-bit bitmask where each bit represents the overload status of a task ID (TID):
Bit 0 โ TID 0 (base rate - fastest task)
Bit 1 โ TID 1
Bit 2 โ TID 2
...
Bit 15 โ TID 15 and higher
Reading the output clears the overload status.
When configured, the GPIO pin is set high asynchronously when any overload occurs. The pin remains high until explicitly cleared using a Digital Output block writing 0 to the same pin.
The block uses a volatile union containing individual bit fields for each task:
union {
struct {
unsigned int task0 : 1;
unsigned int task1 : 1;
// ... up to task15
} b;
unsigned int val;
} volatile MCHP_MCU_Overload;
MultiTasking mode:
SingleTasking mode: