3 This file is part of the AVR-Crypto-Lib.
4 Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #define SYS_FREQ_80MHZ000 0x4
26 #define SYS_FREQ_66MHZ667 0x5
27 #define SYS_FREQ_57MHZ143 0x6
28 #define SYS_FREQ_50MHZ000 0x7
29 #define SYS_FREQ_44MHZ444 0x8
30 #define SYS_FREQ_40MHZ000 0x9
31 #define SYS_FREQ_36MHZ364 0xA
32 #define SYS_FREQ_33MHZ333 0xB
33 #define SYS_FREQ_30MHZ769 0xC
34 #define SYS_FREQ_28MHZ571 0xD
35 #define SYS_FREQ_26MHZ667 0xE
36 #define SYS_FREQ_25MHZ000 0xF
37 #define SYS_FREQ_23MHZ529 0x10
38 #define SYS_FREQ_22MHZ222 0x11
39 #define SYS_FREQ_21MHZ053 0x12
40 #define SYS_FREQ_20MHZ000 0x13
41 #define SYS_FREQ_19MHZ048 0x14
42 #define SYS_FREQ_18MHZ182 0x15
43 #define SYS_FREQ_17MHZ391 0x16
44 #define SYS_FREQ_16MHZ667 0x17
45 #define SYS_FREQ_16MHZ000 0x18
46 #define SYS_FREQ_15MHZ385 0x19
47 #define SYS_FREQ_14MHZ815 0x1A
48 #define SYS_FREQ_14MHZ286 0x1B
49 #define SYS_FREQ_13MHZ793 0x1C
50 #define SYS_FREQ_13MHZ333 0x1D
51 #define SYS_FREQ_12MHZ903 0x1E
52 #define SYS_FREQ_12MHZ500 0x1F
53 #define SYS_FREQ_12MHZ121 0x20
54 #define SYS_FREQ_11MHZ765 0x21
55 #define SYS_FREQ_11MHZ429 0x22
56 #define SYS_FREQ_11MHZ111 0x23
57 #define SYS_FREQ_10MHZ811 0x24
58 #define SYS_FREQ_10MHZ526 0x25
59 #define SYS_FREQ_10MHZ256 0x26
60 #define SYS_FREQ_10MHZ000 0x27
61 #define SYS_FREQ_9MHZ756 0x28
62 #define SYS_FREQ_9MHZ524 0x29
63 #define SYS_FREQ_9MHZ302 0x2A
64 #define SYS_FREQ_9MHZ091 0x2B
65 #define SYS_FREQ_8MHZ889 0x2C
66 #define SYS_FREQ_8MHZ696 0x2D
67 #define SYS_FREQ_8MHZ511 0x2E
68 #define SYS_FREQ_8MHZ333 0x2F
69 #define SYS_FREQ_8MHZ163 0x30
70 #define SYS_FREQ_8MHZ000 0x31
71 #define SYS_FREQ_7MHZ843 0x32
72 #define SYS_FREQ_7MHZ692 0x33
73 #define SYS_FREQ_7MHZ547 0x34
74 #define SYS_FREQ_7MHZ407 0x35
75 #define SYS_FREQ_7MHZ273 0x36
76 #define SYS_FREQ_7MHZ143 0x37
77 #define SYS_FREQ_7MHZ018 0x38
78 #define SYS_FREQ_6MHZ897 0x39
79 #define SYS_FREQ_6MHZ780 0x3A
80 #define SYS_FREQ_6MHZ667 0x3B
81 #define SYS_FREQ_6MHZ557 0x3C
82 #define SYS_FREQ_6MHZ452 0x3D
83 #define SYS_FREQ_6MHZ349 0x3E
84 #define SYS_FREQ_6MHZ250 0x3F
85 #define SYS_FREQ_6MHZ154 0x40
86 #define SYS_FREQ_6MHZ061 0x41
87 #define SYS_FREQ_5MHZ970 0x42
88 #define SYS_FREQ_5MHZ882 0x43
89 #define SYS_FREQ_5MHZ797 0x44
90 #define SYS_FREQ_5MHZ714 0x45
91 #define SYS_FREQ_5MHZ634 0x46
92 #define SYS_FREQ_5MHZ556 0x47
93 #define SYS_FREQ_5MHZ479 0x48
94 #define SYS_FREQ_5MHZ405 0x49
95 #define SYS_FREQ_5MHZ333 0x4A
96 #define SYS_FREQ_5MHZ263 0x4B
97 #define SYS_FREQ_5MHZ195 0x4C
98 #define SYS_FREQ_5MHZ128 0x4D
99 #define SYS_FREQ_5MHZ063 0x4E
100 #define SYS_FREQ_5MHZ000 0x4F
101 #define SYS_FREQ_4MHZ938 0x50
102 #define SYS_FREQ_4MHZ878 0x51
103 #define SYS_FREQ_4MHZ819 0x52
104 #define SYS_FREQ_4MHZ762 0x53
105 #define SYS_FREQ_4MHZ706 0x54
106 #define SYS_FREQ_4MHZ651 0x55
107 #define SYS_FREQ_4MHZ598 0x56
108 #define SYS_FREQ_4MHZ545 0x57
109 #define SYS_FREQ_4MHZ494 0x58
110 #define SYS_FREQ_4MHZ444 0x59
111 #define SYS_FREQ_4MHZ396 0x5A
112 #define SYS_FREQ_4MHZ348 0x5B
113 #define SYS_FREQ_4MHZ301 0x5C
114 #define SYS_FREQ_4MHZ255 0x5D
115 #define SYS_FREQ_4MHZ211 0x5E
116 #define SYS_FREQ_4MHZ167 0x5F
117 #define SYS_FREQ_4MHZ124 0x60
118 #define SYS_FREQ_4MHZ082 0x61
119 #define SYS_FREQ_4MHZ040 0x62
120 #define SYS_FREQ_4MHZ000 0x63
121 #define SYS_FREQ_3MHZ960 0x64
122 #define SYS_FREQ_3MHZ922 0x65
123 #define SYS_FREQ_3MHZ883 0x66
124 #define SYS_FREQ_3MHZ846 0x67
125 #define SYS_FREQ_3MHZ810 0x68
126 #define SYS_FREQ_3MHZ774 0x69
127 #define SYS_FREQ_3MHZ738 0x6A
128 #define SYS_FREQ_3MHZ704 0x6B
129 #define SYS_FREQ_3MHZ670 0x6C
130 #define SYS_FREQ_3MHZ636 0x6D
131 #define SYS_FREQ_3MHZ604 0x6E
132 #define SYS_FREQ_3MHZ571 0x6F
133 #define SYS_FREQ_3MHZ540 0x70
134 #define SYS_FREQ_3MHZ509 0x71
135 #define SYS_FREQ_3MHZ478 0x72
136 #define SYS_FREQ_3MHZ448 0x73
137 #define SYS_FREQ_3MHZ419 0x74
138 #define SYS_FREQ_3MHZ390 0x75
139 #define SYS_FREQ_3MHZ361 0x76
140 #define SYS_FREQ_3MHZ333 0x77
141 #define SYS_FREQ_3MHZ306 0x78
142 #define SYS_FREQ_3MHZ279 0x79
143 #define SYS_FREQ_3MHZ252 0x7A
144 #define SYS_FREQ_3MHZ226 0x7B
145 #define SYS_FREQ_3MHZ200 0x7C
146 #define SYS_FREQ_3MHZ175 0x7D
147 #define SYS_FREQ_3MHZ150 0x7E
148 #define SYS_FREQ_3MHZ125 0x7F
151 void sysclk_set_rawclock(void);
152 void sysclk_mosc_verify_enable(void);
153 void sysclk_mosc_verify_disable(void);
154 void sysclk_set_80MHz(void);
155 void sysclk_set_freq(uint8_t freq_id);
156 uint32_t sysclk_get_freq(void);
158 #endif /* SYSCLOCK_H_ */