Energy-aware Incremental OTA Update for Flash-based Batteryless IoT Devices

Wei Wei, Jishnu Banerjee, Sahidul Islam, Chen Pan, Mimi Xie

Abstract

As the Internet of Things (IoT) transitions toward batteryless operation, maintaining device security and functionality through Over-the-Air (OTA) firmware updates becomes increasingly difficult. Batteryless devices, powered by intermittent energy harvesting, struggle with the high energy demands of flash memory and the severe constraints of on-chip SRAM. This paper proposes an Energy-Aware (EA) incremental update strategy designed to minimize expensive flash operations. By utilizing segment-aligned packet design, deferred flash writes, and distributor-side state tracking, the proposed method significantly reduces energy consumption and update latency. Experimental results across various benchmarks demonstrate that the EA approach outperforms traditional full-image and standard incremental update methods in both reliability and efficiency.

Introduction

The deployment of "set-and-forget" IoT devices for smart cities and environmental monitoring has led to a shift away from batteries in favor of energy harvesting from solar, thermal, or RF sources. While this improves sustainability, it complicates essential maintenance tasks like OTA firmware updates. In batteryless systems, the update process faces two primary hurdles: the "Flash Penalty" and extreme memory constraints.

Flash memory, the standard for non-volatile storage, requires an energy-intensive "erase-then-write" cycle. A single flash operation can often exceed the total energy stored in a device's small capacitor, leading to power failure mid-update. Furthermore, these devices typically possess very little SRAM (e.g., 8KB), making it impossible to buffer full update images. Existing solutions often fail by either wasting energy on unchanged code or triggering too many frequent, energy-intensive flash writes through small, unoptimized patches.

Proposed Energy-Aware (EA) Update Strategy

To address these challenges, this research introduces an Energy-Aware (EA) incremental update approach built on three core pillars designed to align software updates with the physical realities of flash memory and intermittent power.

1. Segment-Based Update Packet Design

Rather than treating an update as a continuous stream of arbitrary data, the EA approach aligns update packets with the physical segments of the device’s flash memory. This alignment ensures that each packet corresponds to a specific memory region, allowing the device to process and acknowledge data in units that are meaningful to the hardware architecture.

2. Deferred Flash Segment Writes

To mitigate the energy cost of frequent flash operations, the device utilizes its limited SRAM as a temporary buffer. Instead of writing to flash every time a packet arrives, the device collects multiple packets until it has a complete set for a specific flash segment. It then performs the erase and write operations in a single batch, maximizing the utility of the energy consumed and reducing the risk of "death by a thousand cuts" caused by excessive erase cycles.

3. Checkpoint-Free Update Resumption

Traditional intermittent computing relies on "checkpoints"—saving progress to non-volatile memory so the device can resume after a power failure. However, the act of checkpointing itself consumes precious energy. The EA strategy shifts the burden of state-tracking to the Update Distributor (the server). The server tracks which packets the device has successfully acknowledged. If a power failure occurs, the device simply requests the missing data upon reboot, treating power loss as a soft reset rather than a loss of progress.

Experimental Evaluation

The researchers evaluated the EA approach using five benchmarks from the MiBench suite and common IoT tasks, including mathematical operations (MTH), string searching (STR), quick sort (SRT), AES encryption (AES), and neural network weight updates (OKG). These benchmarks ranged from 3KB to 57KB, tested on an MSP430 microcontroller with 8KB of SRAM.

The EA approach was compared against two baselines:

  • Light Flash Write (LW): A method that sends the full firmware image.
  • Incremental Updates (IN): A standard patching method that sends only changed data but does not optimize for flash segments.

Key Results and Insights

Energy Efficiency and Reliability

The EA approach achieved the lowest energy consumption in four out of five benchmarks. While the standard incremental (IN) approach often resulted in smaller total data transfers, its high frequency of flash writes made it significantly more energy-expensive than the EA method. Furthermore, the LW approach failed in 80% of the benchmarks because the update images exceeded the device's 8KB SRAM capacity. The EA approach successfully completed all updates by managing data in segment-sized chunks.

Update Speed

In simulations using real-world WiFi energy traces, the EA approach consistently demonstrated lower average update times. By reducing the number of expensive flash operations, the device spent less time in "low power mode" waiting for its energy harvester to recover, leading to a more streamlined update process even in unpredictable power environments.

The Communication vs. Storage Trade-off

A critical insight from this study is that communication energy (receiving data) is often less costly than storage energy (writing to flash) in batteryless systems. By slightly increasing packet size to include necessary metadata and headers for segment alignment, the EA approach achieves a net energy gain by drastically reducing the number of flash writes required.

Conclusion

The Energy-Aware incremental update strategy provides a robust framework for maintaining batteryless IoT devices. By treating the update distributor as a state machine and strategically buffering data in SRAM to batch flash operations, the EA method overcomes the physical limitations of flash-based intermittent systems. Future work may involve integrating these software-level optimizations with hardware-level intermittent computing frameworks and exploring performance in highly lossy network environments.

Summary updated

BibTeX
@inproceedings{wei2024energy,
  author = {Wei Wei and Jishnu Banerjee and Sahidul Islam and Chen Pan and Mimi Xie},
  title = {{Energy-aware Incremental OTA Update for Flash-based Batteryless IoT Devices}},
  booktitle = {ISVLSI},
  year = {2024},
  doi = {10.1109/isvlsi61997.2024.00021},
}
Figure