~ruther/avr-device

ref: 77a1d54401d70044b977a991ebf44feb731d9709 avr-device/patch/timer/dev/10bit.yaml -rw-r--r-- 1.9 KiB
77a1d544 — Rahix atmega32u4: Add patch for 10-bit timer/counter 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
TCCR?A,TCCR?C:
  _modify:
    FOC??:
      access: write-only
    COM??:
      _write_constraint: enum
  COM??:
    _replace_enum:
        DISCONNECTED:  [0, "Normal port operation, OCix disconnected"]
        MATCH_TOGGLE:  [1, "Toggle OCix on Compare Match (Might depend on WGM)"]
        MATCH_CLEAR:   [2, "Clear OCix on Compare Match (If PWM is enabled, OCix is set at TOP)"]
        MATCH_SET:     [3, "Set OCix on Compare Match (If PWM is enabled, OCix is cleared at TOP)"]

TCCR?B:
  _modify:
    CS?:
      _write_constraint: enum
  CS?:
    _replace_enum:
      NO_CLOCK:       [0,  "No clock source (Timer/Counter stopped)"]
      DIRECT:         [1,  "Running, No Prescaling"]
      PRESCALE_2:     [2,  "Running, CLK/2"]
      PRESCALE_4:     [3,  "Running, CLK/4"]
      PRESCALE_8:     [4,  "Running, CLK/8"]
      PRESCALE_16:    [5,  "Running, CLK/16"]
      PRESCALE_32:    [6,  "Running, CLK/32"]
      PRESCALE_64:    [7,  "Running, CLK/64"]
      PRESCALE_128:   [8,  "Running, CLK/128"]
      PRESCALE_256:   [9,  "Running, CLK/256"]
      PRESCALE_512:   [10, "Running, CLK/512"]
      PRESCALE_1024:  [11, "Running, CLK/1024"]
      PRESCALE_2048:  [12, "Running, CLK/2048"]
      PRESCALE_4096:  [13, "Running, CLK/4096"]
      PRESCALE_8192:  [14, "Running, CLK/8192"]
      PRESCALE_16384: [15, "Running, CLK/16384"]
  DTPS?:
    _replace_enum:
      X1: [0, "1x (no division)"]
      X2: [1, "2x"]
      X4: [2, "4x"]
      X8: [3, "8x"]

TCCR?D:
  _modify:
    WGM?:
      _write_constraint: enum
  WGM?:
    _replace_enum:
      PWM_FAST:         [0, "Fast PWM, Update: *TOP*, Flag: *TOP*"]
      PWM_CORRECT:      [1, "Phase and Frequency Correct PWM, Update: *BOTTOM*, Flag: *BOTTOM*"]
      PWM_SINGLE_SLOPE: [2, "PWM6 / Single-slope, Update: *TOP*, Flag: *TOP*"]
      PWM_DUAL_SLOPE:   [3, "PWM6 / Dual-slope, Update: *BOTTOM*, Flag: *BOTTOM*"]

_modify:
  TC?H:
    description: Timer/Counter High Bits
Do not follow this link