Module rp2040_hal::timer
source · Expand description
Timer Peripheral
The Timer peripheral on RP2040 consists of a 64-bit counter and 4 alarms.
The Counter is incremented once per microsecond. It obtains its clock source from the watchdog peripheral, you must enable the watchdog before using this peripheral.
Since it would take thousands of years for this counter to overflow you do not need to write logic for dealing with this if using get_counter.
Each of the 4 alarms can match on the lower 32 bits of Counter and trigger an interrupt.
See Chapter 4 Section 6 of the datasheet for more details.
Modules§
- Support for RTIC monotonic trait.
Structs§
- An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
- An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
- An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
- An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
- Implementation of the
embedded_hal_0_2::timer
traits usingrp2040_hal::timer
counter. - Timer peripheral
Enums§
- Errors that can be returned from any of the
AlarmX::schedule
methods.
Traits§
- Alarm abstraction.
Type Aliases§
- Instant type used by the Timer & Alarm methods.