Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • To assess Flash and static RAM usage at compile time, by analysing memory map files.

  • To measure Heap and Stack usage at runtime using the technique of memory painting.

  • To measure execution time using internal and external tools (hardware timers and logic analysers).

  • To measure energy consumption using osciloscopes and power profilers.

  • To correlate execution time and energy consumption data in a granular and step-by-step way, allowing the identification of performance bottlenecks.

  • To measure message sizes of IoT protocols deployed in embedded systems, using techniques such as logging and packet sniffing.

Overview of the setup and workflow:

...

Measuring Memory Usage

Flash and RAM (Compile Time)

...

A more sophisticated and accurate way of measuring energy consumption consists in using a power profiler, such as the nRF Power Profiler Kit and or the Otii Arc Pro. One advantage of For this tutorial we selected the latter is that , since it is designed to be board-agnostic , so we will select it as the instrument for this tutorialand also allow interacting with GPIO pins.

Correlating Execution Time and Energy Consumption

Syncing execution time and energy consumption: power profiler (otii arc) with gpio

Advanced Measurements for Energy and Time

Step-by-step Granular Time and Energy Consumption

Obtaining step-by-step time and energy consumption: merging results from power profiler and logic analyser

PPI (Programmable Peripheral Interconnect) / EXTI (External Interrupt) Mapping

Often it is necessary to link an input GPIO directly to an output GPIO at the hardware level, bypassing software delays. This type of operation is available on certain microcontrollers and systems to reduce latency. In some scenarios peripheral devices are attached to a MCU and we want to measure the energy consumption during the peripheral interaction. Instead of raising a GPIO in SW that is connected to the measurement kit (e.g. PPK), one can use the PPI/ EXTI functionality of the MCU.

Examples:

  • A button press connected to an input GPIO immediately toggles an LED on an output GPIO.

  • A sensor’s input signal on GPIO triggers another peripheral or an output pin change via an interrupt.

HW-Platforms:

  • Nordic Semiconductor (nRF Series) – PPI (Programmable Peripheral Interconnect): PPI allows one hardware event (e.g., a GPIO input change) to directly trigger another (e.g., GPIO output) without CPU intervention.

  • STM32 Microcontrollers – EXTI (External Interrupt) with Direct GPIO Mapping: GPIOs can be mapped to trigger interrupts or interact with timers, enabling fast response without CPU control.

  • Texas Instruments (TI) – PRU (Programmable Real-Time Unit): On TI microcontrollers, real-time units handle direct GPIO linking and control, ensuring minimal latency between input and output operations.

Measuring Message Sizes

logging, hardware packet sniffing, packet analysis tools (wireshark)

...