Expand description
In-tree implementations of the rtic_time::Monotonic
(reexported) trait for
timers & clocks found on commonly used microcontrollers.
If you are using a microcontroller where CAS operations are not available natively, you might
have to enable the critical-section
or unsafe-assume-single-core
feature of the
portable-atomic
dependency
yourself for this dependency to compile.
To enable the implementations, you must enable a feature for the specific MCU you’re targeting.
§Cortex-M Systick
The systick
monotonic works on all cortex-M parts, and requires that the feature cortex-m-systick
is enabled.
§RP2040
The RP2040 monotonics require that the rp2040
feature is enabled.
§i.MX RT
The i.MX RT monotonics require that the feature imxrt_gpt1
or imxrt_gpt2
is enabled.
§nRF
nRF monotonics require that one of the available nrf52*
features is enabled.
All implementations of timers for the nRF52 family are documented here. Monotonics that
are not available on all parts in this family will have an Available on crate features X only
tag, describing what parts do support that monotonic. Monotonics without an
Available on crate features X only
tag are available on any nrf52*
feature.
§ATSAMD
Monotonics for the ATSAMD family of parts using the real time clock (RTC) are provided in the
atsamd-hal
crate with the rtic
feature enabled.
§Priority of interrupt handlers
The priority of timer interrupts are based on RTIC_ASYNC_MAX_LOGICAL_PRIO
generated by RTIC.
It is calculated to be 1 less than the maximum hardware task priority (to not have impact on
hardware tasks), or, if no hardware task is available, is set to the maximum priority in the
system.
Re-exports§
Modules§
- imxrt
Monotonic
implementations for i.MX RT’s GPT peripherals.- nrf
Monotonic
implementations for the nRF series of MCUs.- rp2040
Monotonic
implementation for RP2040’s Timer peripheral.- stm32
Monotonic
implementations for STM32 chips.- systick
Monotonic
based on Cortex-M SysTick. Note: this implementation is inefficient as it ticks and generates interrupts at a constant rate.
Macros§
- imxrt_
gpt1_ monotonic - Create a GPT1 based monotonic and register the GPT1 interrupt for it.
- imxrt_
gpt2_ monotonic - Create a GPT2 based monotonic and register the GPT2 interrupt for it.
- nrf_
rtc0_ monotonic - Create an RTC0 based monotonic and register the RTC0 interrupt for it.
- nrf_
rtc1_ monotonic - Create an RTC1 based monotonic and register the RTC1 interrupt for it.
- nrf_
rtc2_ monotonic - Create an RTC2 based monotonic and register the RTC2 interrupt for it.
- nrf_
timer0_ monotonic - Create an Timer0 based monotonic and register the TIMER0 interrupt for it.
- nrf_
timer1_ monotonic - Create an Timer1 based monotonic and register the TIMER1 interrupt for it.
- nrf_
timer2_ monotonic - Create an Timer2 based monotonic and register the TIMER2 interrupt for it.
- nrf_
timer3_ monotonic - Create an Timer3 based monotonic and register the TIMER3 interrupt for it.
- nrf_
timer4_ monotonic - Create an Timer4 based monotonic and register the TIMER4 interrupt for it.
- rp2040_
timer_ monotonic - Create an RP2040 timer based monotonic and register the necessary interrupt for it.
- stm32_
tim2_ monotonic - Create a TIM2 based monotonic and register the TIM2 interrupt for it.
- stm32_
tim3_ monotonic - Create a TIM3 based monotonic and register the TIM3 interrupt for it.
- stm32_
tim4_ monotonic - Create a TIM4 based monotonic and register the TIM4 interrupt for it.
- stm32_
tim5_ monotonic - Create a TIM5 based monotonic and register the TIM5 interrupt for it.
- stm32_
tim15_ monotonic - Create a TIM15 based monotonic and register the TIM15 interrupt for it.
- systick_
monotonic - Create a Systick based monotonic and register the Systick interrupt for it.
Structs§
- Timeout
Error - This indicates that there was a timeout.
Traits§
- Monotonic
- A monotonic clock / counter definition.
- Timer
Queue Backend - A backend definition for a monotonic clock/counter.
- Timer
Queue Based Monotonic - A
Monotonic
that is backed by theTimerQueue
.