← Back to the chapter · Previous detail · Next detail →

Technical detail · MCU vs MPU: Workload Fit

Calculate energy for a complete task cycle

The energy choice is similarly measured over time rather than read from the peak-current column:

Ecycle=∫0TP(t) dt=∑iViIiti,Pavg=EcycleT.E_{cycle}=\int_0^T P(t)\,dt =\sum_i V_i I_i t_i, \qquad P_{avg}=\frac{E_{cycle}}{T}.

Suppose two processors repeat a task once per second at a common supply. Design A draws 20 mA for 5 ms and then 5 microamps for 995 ms, giving an average of

IA=20(0.005)+0.005(0.995)1≈0.105 mA.I_{A}=\frac{20(0.005)+0.005(0.995)}{1}\approx0.105\ \text{mA}.

Design B draws only 8 mA while active but needs 30 ms before it can sleep:

IB=8(0.030)+0.005(0.970)1≈0.245 mA.I_{B}=\frac{8(0.030)+0.005(0.970)}{1}\approx0.245\ \text{mA}.

Flash wait states are extra processor cycles spent waiting for flash memory to return an instruction or data. More wait states can change active time and energy.

The higher-power processor uses less energy per completed cycle because it finishes sooner. That is the race-to-sleep result, not a universal instruction to choose the fastest core. Startup time, flash wait states, regulator efficiency, sensor warm-up, radio acknowledgements, and the deepest sleep state may reverse it. Capture the whole cycle at the battery rail and integrate the trace; peak current and benchmark time alone cannot decide.

← Back to the chapter · Previous detail · Next detail →