TL;DR
This paper introduces RESTOP, a novel middleware for transiently-powered sensor systems that enables the retention of external peripheral states across power interruptions. This is crucial for energy harvesting devices that operate intermittently, allowing them to resume operation without re-initializing all external components, significantly reducing overhead.
What Problem Does This Paper Address?
Energy harvesting (EH) systems offer the promise of long-term, battery-free operation for sensor networks. However, EH sources are inherently intermittent, leading to power supply fluctuations. Traditional approaches use energy storage (batteries, supercapacitors) to smooth these fluctuations, but this adds size and cost. A newer paradigm, "transient computing," aims to operate directly from the EH source, spanning power cycles. While existing transient computing solutions effectively retain the state of the microcontroller (MCU) itself (e.g., processor registers, main memory), they often fail to address the state of external peripherals like sensors, transceivers, and actuators. These peripherals require re-configuration after each power interruption, leading to significant time and energy overheads, negating some of the benefits of transient computing. This paper tackles the challenge of generically retaining the state of these external peripherals.
Methods
The core contribution is RESTOP, a middleware designed to manage the state of external peripherals connected via serial protocols like SPI and I²C. RESTOP acts as an intermediary between the application and the peripherals. Its key functionalities include:
- Saving Peripheral Instructions: When an application issues a command to an external peripheral, RESTOP intercepts it. Based on user-defined criteria (e.g., whether the instruction is for configuration, whether it should be saved, or if it should replace a previous similar instruction), RESTOP saves the instruction and its associated parameters into an instruction history table. This table acts as a log of how the peripheral was configured and operated.
- Executing Peripheral Instructions: After saving the instruction (if required), RESTOP forwards it to the actual peripheral.
- Restoring Peripheral State: When a power interruption occurs and the system state is restored (by the underlying transient computing framework), RESTOP is invoked. It then iterates through the instruction history table and re-issues each saved instruction to the peripheral, effectively restoring its configuration and state to what it was before the power failure.
RESTOP is designed to be generic, requiring users to provide a configuration file that maps peripheral IDs to their communication protocols, addresses, and specific reset/command values.
Datasets
Not discussed in the paper. The paper focuses on a custom experimental setup.
Key Insights and Ideas
- The "External Peripheral State" Gap: The paper highlights a critical overlooked aspect in transient computing: the state of peripherals outside the MCU. Simply restoring the MCU's state isn't enough if external components need re-configuration.
- Generic Middleware is Key: Existing solutions for external peripheral state retention are often protocol-specific (e.g., SPI-only) or require extensive user intervention for each peripheral. RESTOP's strength lies in its generic nature, supporting multiple protocols and simplifying the developer's task.
- Instruction History as State: The concept of using an instruction history table as a proxy for peripheral state is elegant. By replaying these instructions, the peripheral can be brought back to its operational configuration without needing to store the peripheral's internal registers directly.
- Overhead Trade-off: While RESTOP introduces a configuration overhead, it's significantly lower than re-initializing from scratch, especially for complex peripherals. The paper demonstrates that this overhead becomes negligible during the overall application execution.
Key Results
- Successful Validation: RESTOP was successfully implemented and validated with three distinct external peripherals: an ADXL362 accelerometer (SPI), a TSL2560 luminosity sensor (I²C), and a CC1101 radio transceiver (SPI).
- Peripheral State Restoration: Experiments showed that RESTOP correctly restored the configuration of each peripheral after simulated power failures, as evidenced by returning to the pre-failure operational parameters (e.g., accelerometer ODR, luminosity sensor integration time, transceiver channel).
- Time Overhead:
- RESTOP introduces a maximum configuration time overhead of 15% per peripheral.
- However, during the complete execution of a typical sensing application, the overall time overhead is only 0.82%. This is substantially lower than existing approaches like Sytare, which can incur up to 137% overhead.
- Capacitance Requirements: The study also analyzed the energy required for peripheral restoration and determined that the existing decoupling capacitance on the test board was sufficient, meaning no additional hardware was needed for these specific peripherals.
Limitations and Future Work
- Energy Cost Modeling: The paper models the energy cost of restoring the MCU state but acknowledges that the energy consumed by the external peripherals themselves during restoration (e.g., a transceiver making an energy-intensive transmission) is not fully accounted for.
- Future Work:
- Comprehensive Energy Modeling: The authors propose implementing a calibration routine to accurately measure the energy consumed by each peripheral instruction, enabling a more complete system energy cost analysis.
- Integration with Operating Systems: Integrating RESTOP with existing operating systems like ARM mbed OS is suggested to further enhance accessibility and standardization for transient computing systems.
- Standardization: The goal is to promote standardization of peripheral state retention in transient computing.
Summary updated