Struct nrf52832_hal::wdt::Watchdog[][src]

pub struct Watchdog<T> where
    T: WdMode, 
{ /* fields omitted */ }
Expand description

An interface to the Watchdog.

Implementations

Try to create a new watchdog instance from the peripheral.

This function will return an error if the watchdog has already been activated, which may happen on a (non-watchdog) soft reset. In this case, it may be possible to still obtain the handles with the Watchdog::try_recover() method.

If the watchdog has already started, configuration is no longer possible.

Release the peripheral.

Note: The peripheral cannot be released after activation.

Activate the watchdog with the given number of handles.

The watchdog cannot be deactivated after starting.

NOTE: All activated handles must be pet within the configured time interval to prevent a reset from occurring.

Enable the watchdog interrupt.

NOTE: Although the interrupt will occur, there is no way to prevent the reset from occurring. From the time the event was fired, the system will reset two LFCLK ticks later (61 microseconds) if the interrupt has been enabled.

Disable the watchdog interrupt.

NOTE: This has no effect on the reset caused by the Watchdog.

Set the number of 32.768kHz ticks in each watchdog period.

This value defaults to 0xFFFF_FFFF (1.5 days) on reset.

Note: there is a minimum of 15 ticks (458 microseconds). If a lower number is provided, 15 ticks will be used as the configured value.

Should the watchdog continue to count during sleep modes?

This value defaults to ENABLED on reset.

Should the watchdog continue to count when the CPU is halted for debug?

This value defaults to DISABLED on reset.

Is the watchdog still awaiting pets from any handle?

This reports whether sufficient pets have been received from all handles to prevent a reset this time period.

Try to recover a handle to an already running watchdog. If the number of requested handles matches the activated number of handles, an activated handle will be returned. Otherwise the peripheral will be returned.

NOTE: Since the watchdog is already counting, you want to pet these dogs as soon as possible!

Is the watchdog active?

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Casts the value.

Should always be Self

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.