Skip to main content

Crate arm_sp805

Crate arm_sp805 

Source
Expand description

§Arm Watchdog Module (SP805) driver

Driver implementation for the SP805 watchdog module.

§Implemented features

  • Enable/disable watchdog timer
  • Update timer value

§License

The project is MIT and Apache-2.0 dual licensed, see LICENSE-APACHE and LICENSE-MIT.

§Maintainers

arm-sp805 is a trustedfirmware.org maintained project. All contributions are ultimately merged by the maintainers listed below.

§Contributing

Please follow the directions of the Trusted Firmware Processes

Contributions are handled through review.trustedfirmware.org.

§Reporting Security Issues

Please follow the directions of the Trusted Firmware Security Center


Copyright 2025 Arm Limited and/or its affiliates open-source-office@arm.com

Arm is a registered trademark of Arm Limited (or its subsidiaries or affiliates).

§Example

use arm_sp805::{SP805Registers, Watchdog, UniqueMmioPointer};
use core::ptr::NonNull;

// SAFETY: `WATCHDOG_ADDRESS` is the base address of a SP805 watchdog register block. It remains
// valid for the lifetime of the application and nothing else references this address range.
let watchdog_pointer = unsafe { UniqueMmioPointer::new(NonNull::new(WATCHDOG_ADDRESS).unwrap()) };

let mut watchdog = Watchdog::new(watchdog_pointer, 0x0001_0000);
watchdog.enable();

loop {
  handler();
  watchdog.update();
}

Structs§

SP805Registers
SP805 Watchdog register map.
UniqueMmioPointer
A unique owned pointer to the registers of some MMIO device.
Watchdog
SP805 Watchdog driver implementation.