Timers and PWM Flashcards
What 8 aspects of the timer peripheral can be set up using registers
- Which signal source it counts
- When it starts and stops running
- Whether it counts rising or falling edges
- Which direction it counts
- What happens when it overflows
- If and how it is reloaded
- Whether its value is captured by another register
- Whether it generates a signal or interrupt
What is a watchdog timer and how does it work?
A hardware peripheral used to reset out-of-control programs.
It counts elapsed time. If it is not serviced (signaled) by the program before a defined time then it resets the CPU.
Define PWM
A method of encoding information onto a single digital signal based on duty cycle.
Some devices can be driven by a PWM signal such as a motor or LED.
SysTick Timer.
Does the SysTick Timer count up or down?
Down
SysTick Timer.
What register does the timer store its current value in?
VAL or SYST_CVR
(Current value register)
SysTick Timer.
What register does the timer load/relaod from?
LOAD or SYST_RVR
(Reload Value Register)
SysTick Timer.
What register is used to display the timers status aswell as change its behaviour?
CTRL or SYST_CSR
(Control Status Register)
SysTick Timer.
How is the timer frequency determined?
input frequency/LOAD+1