~ruther/avr-device

ref: f0ea250acb7690c18f366133af3437c6e7d15a19 avr-device/patch/atmega8.yaml -rw-r--r-- 2.7 KiB
f0ea250a — František Boháček Patch TCCR0 CS correctly 2 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
_svd: ../svd/atmega8.svd

_include:
  - "common/ac.yaml"
  - "common/adc.yaml"
  - "common/spi.yaml"

  - "timer/atmega8.yaml"

TWI:
  TWCR:
    _modify:
      TWWC:
        access: read-only
  TWSR:
    _modify:
      TWS:
        access: read-only
    TWPS:
      _replace_enum:
        PRESCALER_1: [0, "Prescaler Value 1"]
        PRESCALER_4: [1, "Prescaler Value 4"]
        PRESCALER_16: [2, "Prescaler Value 16"]
        PRESCALER_64: [3, "Prescaler Value 64"]

ADC:
  ADMUX:
    MUX:
      _replace_enum:
        ADC0: [0, "ADC Single Ended Input pin 0"]
        ADC1: [1, "ADC Single Ended Input pin 1"]
        ADC2: [2, "ADC Single Ended Input pin 2"]
        ADC3: [3, "ADC Single Ended Input pin 3"]
        ADC4: [4, "ADC Single Ended Input pin 4"]
        ADC5: [5, "ADC Single Ended Input pin 5"]
        ADC6: [6, "ADC Single Ended Input pin 6"]
        ADC7: [7, "ADC Single Ended Input pin 7"]
        ADC_VBG: [14, "Internal Reference (VBG)"]
        ADC_GND: [15, "0V (GND)"]

USART:
  UCSRA:
    _modify:
      PE:
        access: read-only
      DOR:
        access: read-only
      FE:
        access: read-only
      UDRE:
        access: read-only
      TXC:
        description: "USART Transmit Complete"
      RXC:
        access: read-only
  UCSRB:
    _modify:
      RXB8:
        access: read-only
  UCSRC:
    UMSEL:
      _replace_enum:
        USART_ASYNC: [0, "Asynchronous USART"]
        USART_SYNC:  [1, "Synchronous USART"]
    UPM:
      _replace_enum:
        DISABLED:    [0, "Disabled"]
        PARITY_EVEN: [2, "Enabled, Even Parity"]
        PARITY_ODD:  [3, "Enabled, Odd Parity"]
    USBS:
      _replace_enum:
        STOP1: [0, "1-bit"]
        STOP2: [1, "2-bit"]
    UCSZ:
      _replace_enum:
        CHR5: [0, "Character Size: 5 bit"]
        CHR6: [1, "Character Size: 6 bit"]
        CHR7: [2, "Character Size: 7 bit"]
        CHR8: [3, "Character Size: 8 bit"]
    UCPOL:
      _replace_enum:
        RISING_EDGE:  [0, "Transmit on Rising XCK Edge, Receive on Falling XCK Edge"]
        FALLING_EDGE: [1, "Transmit on Falling XCK Edge, Receive on Rising XCK Edge"]

WDT:
  WDTCR:
    _delete:
      - WDP
    _add:
      WDPL:
        description: "Watchdog Timer Prescaler - Low Bits"
        bitRange: "[2:0]"
    WDPL:
      CYCLES_16K:      [0, "- 16K (16384) cycles, ~16ms"]
      CYCLES_32K:      [1, "- 32K (32768) cycles, ~32ms"]
      CYCLES_64K:      [2, "- 64K (65536) cycles, ~65ms"]
      CYCLES_128K:     [3, "- 128K (131072) cycles, ~0.13s"]
      CYCLES_256K:     [4, "- 256K (262144) cycles, ~0.26s"]
      CYCLES_512K:     [5, "- 512K (524288) cycles, ~0.52s"]
      CYCLES_1024K:     [6, "- 1024K (1048576) cycles, ~1.0s"]
      CYCLES_2048K:     [7, "- 2048K (2097152) cycles, ~2.1s"]