General Purpose Timers

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/27

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing general purpose timers in microcontrollers.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

28 Terms

1
New cards

Timers

In embedded systems, timers provide an accurate time base to trigger actions and measure timing.

2
New cards

Capture Mode

Measures time between start and stop events, like a stopwatch.

3
New cards

Compare Mode

Signals that a new action should be started after a set time, like an egg timer.

4
New cards

Drawbacks of SW Timers

Execution time depends on optimization level; smallest timer increment is inaccurate. Use on-chip hardware timer instead.

5
New cards

Prescaler

Derives timer clock from CPU clock in General Timer Compare Principle.

6
New cards

Match Flag

When the current count value equals the match value, this flag is raised.

7
New cards

Time-Out Flag

Raised when the current count value reaches 0x0000.

8
New cards

General Purpose Timer Module (TM4C1294)

8 identical timer modules (0-7) with two 16-bit sub timers A/B each.

9
New cards

TIMERxCTLR

Used to start or stop timer x in 16-bit periodic timer compare mode.

10
New cards

TIMERxCFGR

Configures timer x for 2 times16-bit in 16-bit periodic timer compare mode.

11
New cards

TIMERxTAMRR TIMERxTBMRR

Configures sub-timers A/B for periodic mode, timer compare mode, count direction, and enable match flag.

12
New cards

TIMERxTAILRR TIMERxTBILRR

Defines timer (re)load value for subtimers A/B

13
New cards

TIMERxTAMATCHRR TIMERxTBMATCHRR

Defines timer match value for subtimers A/B

14
New cards

TIMERxTAPRR TIMERxTBPRR

Defines the divider factor for subtimers A/B, where timer clock = CPU clock / (prescaler+1).

15
New cards

TIMERxTARR TIMERxTBRR

Shows current count value of subtimers A/B.

16
New cards

TIMERxRISR

Must be cleared by SW after every event.

17
New cards

GPTM Interrupt Clear

After every event, the status bit in register TIMERxRISR must be cleared by SW. This is done the separate register TIMERxICRR in which the bit has to set to 1 to clear the corresponding bit in register TIMERxRISR.

18
New cards

SYSCTLRCGCTIMERR

Activates GPTM Timer modules individually, using control bits for timers 0 to 7.

19
New cards

One-shot Timer

A mode where a timer stops after a time-out without automatic output.

20
New cards

Periodic Timer

A mode where the timer rolls over after timing out, then restarts with the interval load value without automatic output..

21
New cards

PWM

A mode where a pulse width modulation is generated, with automoatic output signal generation at a µC pin connected to the timer.

22
New cards

RTC

A mode where the 32 bit timer is incremented every second and requires a special clock input (32.768 kHz).

23
New cards

Edge-time

Measures the time between two edges (rising and/or falling) of an input signal at a µC pin connected to the timer

24
New cards

Edge count

Measures the number of edges (rising and/or falling) of an input signal at a µC pin connected to the timer.

25
New cards

GPIO Port Configuration for Alternate Function

PWM and capture modes require connection to µC pins. Standard GPIO function deactivated if bit set in GPIOPORTxAFSELR, alternate function (e.g., Timer) module is selected in GPIOPORTxPCTLR

26
New cards

GPIOPORTxPCTL_R

Selects to which alternate function a certain pin gets.

27
New cards

Edge-time Mode

Measures the time between events at a port pin connected to a timer module (event=rising/falling/both edge(s) of an input signal).

28
New cards

Capture Register

When an event (falling/rising/both edges) at the GPIO input pin occurs, this register copies the current count value and sets an event status flag.