Expand description
Timers: the counter core shared by every TIMER peripheral.
A timer counts CK_TIMERx ticks divided by PSC + 1, and restarts from zero
once the count reaches CAR. Everything else a timer can do — PWM, input
capture, triggering other peripherals — is built on top of that core.
ⓘ
let timer = dp.timer5.constrain(&mut rcu);
let mut timer = timer.start_interval(500.millis());
timer.wait();Structs§
- Capture
- A free running timer whose channels timestamp edges on their pins.
- Capture
Channel - One capture input of a timer, configured and ready to be armed.
- Count
Down Timer - A running timer, counting down the interval
Timer::startwas given. - Delay
- A timer given over to blocking delays.
- Pwm
- A timer running as the period behind one or more PWM channels.
- PwmChannel
- One PWM output of a timer, configured and ready to take a duty value.
- Timer
- A stopped timer, holding the peripheral and the frequency feeding it.
Enums§
- Edge
- Which edge on the pin makes a channel take its snapshot.
- Error
- What can go wrong while reading a capture.
- Event
- A timer event that can raise an interrupt.
Traits§
- Capture
Ops - The input capture half of one channel, numbered by
ClikePwmOps. - Channel
Enable - The switch turning channel
Con, whichever direction it points. - Channel
Pin - Marks a pin the silicon routes to channel
CofTIMERX, in the right alternate function. - Instance
- A timer peripheral, tying it to the bus that clocks it.
- Primary
Output - The output switch shared by every channel of a timer that has one.
- PwmOps
- Register operations on compare channel
Cof a timer. - Timer
Ext - Entry point on the raw peripheral.