MCU Load Block Icon
The MCU LOAD block measures and outputs the real-time CPU utilization percentage, providing essential feedback for performance optimization and schedulability verification.

Output Signal

OutputData TypeRangeDescription
CPU_Loadsingle (float)0.0 to 100.0Percentage of CPU time used by scheduled tasks

Output Interpretation

The output is a ready-to-use percentage (0-100%). No scaling is required:

  • 0% = CPU is completely idle
  • 100% = CPU has no idle time remaining

The block internally measures idle time ratio and converts it to percentage.

Measurement Method

// CPU load calculation:
CPU_Load = (1 - (IdleTime / TotalTime)) × 100%

Where:
  IdleTime = Time spent in idle task
  TotalTime = Total elapsed time

Measurement window: Configurable averaging period

Usage Guidelines

CPU Load RangeStatusRecommendation
0-60%✓ HealthyGood margin for additional features
60-80%⚠ ModerateMonitor closely, optimize if growing
80-95%⚠ HighOptimize code, reduce sample rates
>95%❌ CriticalSystem unstable, immediate action required

Example Application

% Monitor CPU load and trigger optimization

CPU_Load → Display (live monitoring)
CPU_Load → Compare (threshold 80%)
         → LED warning if exceeded

% External mode:
% - Tune parameters while monitoring load
% - Find maximum achievable performance

See Also

  • [MCHP_MCU_OVERLOAD] - Overload detection and recovery
  • [MCHP_Tasks_State] - Task execution monitoring
  • [MCHP_Scheduler_Options] - Scheduler configuration