3 This file is part of the ARM-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 0x04UL
26 #define SYS_FREQ_66MHZ667 0x05UL
27 #define SYS_FREQ_57MHZ143 0x06UL
28 #define SYS_FREQ_50MHZ000 0x07UL
29 #define SYS_FREQ_44MHZ444 0x08UL
30 #define SYS_FREQ_40MHZ000 0x09UL
31 #define SYS_FREQ_36MHZ364 0x0AUL
32 #define SYS_FREQ_33MHZ333 0x0BUL
33 #define SYS_FREQ_30MHZ769 0x0CUL
34 #define SYS_FREQ_28MHZ571 0x0DUL
35 #define SYS_FREQ_26MHZ667 0x0EUL
36 #define SYS_FREQ_25MHZ000 0x0FUL
37 #define SYS_FREQ_23MHZ529 0x10UL
38 #define SYS_FREQ_22MHZ222 0x11UL
39 #define SYS_FREQ_21MHZ053 0x12UL
40 #define SYS_FREQ_20MHZ000 0x13UL
41 #define SYS_FREQ_19MHZ048 0x14UL
42 #define SYS_FREQ_18MHZ182 0x15UL
43 #define SYS_FREQ_17MHZ391 0x16UL
44 #define SYS_FREQ_16MHZ667 0x17UL
45 #define SYS_FREQ_16MHZ000 0x18UL
46 #define SYS_FREQ_15MHZ385 0x19UL
47 #define SYS_FREQ_14MHZ815 0x1AUL
48 #define SYS_FREQ_14MHZ286 0x1BUL
49 #define SYS_FREQ_13MHZ793 0x1CUL
50 #define SYS_FREQ_13MHZ333 0x1DUL
51 #define SYS_FREQ_12MHZ903 0x1EUL
52 #define SYS_FREQ_12MHZ500 0x1FUL
53 #define SYS_FREQ_12MHZ121 0x20UL
54 #define SYS_FREQ_11MHZ765 0x21UL
55 #define SYS_FREQ_11MHZ429 0x22UL
56 #define SYS_FREQ_11MHZ111 0x23UL
57 #define SYS_FREQ_10MHZ811 0x24UL
58 #define SYS_FREQ_10MHZ526 0x25UL
59 #define SYS_FREQ_10MHZ256 0x26UL
60 #define SYS_FREQ_10MHZ000 0x27UL
61 #define SYS_FREQ_9MHZ756 0x28UL
62 #define SYS_FREQ_9MHZ524 0x29UL
63 #define SYS_FREQ_9MHZ302 0x2AUL
64 #define SYS_FREQ_9MHZ091 0x2BUL
65 #define SYS_FREQ_8MHZ889 0x2CUL
66 #define SYS_FREQ_8MHZ696 0x2DUL
67 #define SYS_FREQ_8MHZ511 0x2EUL
68 #define SYS_FREQ_8MHZ333 0x2FUL
69 #define SYS_FREQ_8MHZ163 0x30UL
70 #define SYS_FREQ_8MHZ000 0x31UL
71 #define SYS_FREQ_7MHZ843 0x32UL
72 #define SYS_FREQ_7MHZ692 0x33UL
73 #define SYS_FREQ_7MHZ547 0x34UL
74 #define SYS_FREQ_7MHZ407 0x35UL
75 #define SYS_FREQ_7MHZ273 0x36UL
76 #define SYS_FREQ_7MHZ143 0x37UL
77 #define SYS_FREQ_7MHZ018 0x38UL
78 #define SYS_FREQ_6MHZ897 0x39UL
79 #define SYS_FREQ_6MHZ780 0x3AUL
80 #define SYS_FREQ_6MHZ667 0x3BUL
81 #define SYS_FREQ_6MHZ557 0x3CUL
82 #define SYS_FREQ_6MHZ452 0x3DUL
83 #define SYS_FREQ_6MHZ349 0x3EUL
84 #define SYS_FREQ_6MHZ250 0x3FUL
85 #define SYS_FREQ_6MHZ154 0x40UL
86 #define SYS_FREQ_6MHZ061 0x41UL
87 #define SYS_FREQ_5MHZ970 0x42UL
88 #define SYS_FREQ_5MHZ882 0x43UL
89 #define SYS_FREQ_5MHZ797 0x44UL
90 #define SYS_FREQ_5MHZ714 0x45UL
91 #define SYS_FREQ_5MHZ634 0x46UL
92 #define SYS_FREQ_5MHZ556 0x47UL
93 #define SYS_FREQ_5MHZ479 0x48UL
94 #define SYS_FREQ_5MHZ405 0x49UL
95 #define SYS_FREQ_5MHZ333 0x4AUL
96 #define SYS_FREQ_5MHZ263 0x4BUL
97 #define SYS_FREQ_5MHZ195 0x4CUL
98 #define SYS_FREQ_5MHZ128 0x4DUL
99 #define SYS_FREQ_5MHZ063 0x4EUL
100 #define SYS_FREQ_5MHZ000 0x4FUL
101 #define SYS_FREQ_4MHZ938 0x50UL
102 #define SYS_FREQ_4MHZ878 0x51UL
103 #define SYS_FREQ_4MHZ819 0x52UL
104 #define SYS_FREQ_4MHZ762 0x53UL
105 #define SYS_FREQ_4MHZ706 0x54UL
106 #define SYS_FREQ_4MHZ651 0x55UL
107 #define SYS_FREQ_4MHZ598 0x56UL
108 #define SYS_FREQ_4MHZ545 0x57UL
109 #define SYS_FREQ_4MHZ494 0x58UL
110 #define SYS_FREQ_4MHZ444 0x59UL
111 #define SYS_FREQ_4MHZ396 0x5AUL
112 #define SYS_FREQ_4MHZ348 0x5BUL
113 #define SYS_FREQ_4MHZ301 0x5CUL
114 #define SYS_FREQ_4MHZ255 0x5DUL
115 #define SYS_FREQ_4MHZ211 0x5EUL
116 #define SYS_FREQ_4MHZ167 0x5FUL
117 #define SYS_FREQ_4MHZ124 0x60UL
118 #define SYS_FREQ_4MHZ082 0x61UL
119 #define SYS_FREQ_4MHZ040 0x62UL
120 #define SYS_FREQ_4MHZ000 0x63UL
121 #define SYS_FREQ_3MHZ960 0x64UL
122 #define SYS_FREQ_3MHZ922 0x65UL
123 #define SYS_FREQ_3MHZ883 0x66UL
124 #define SYS_FREQ_3MHZ846 0x67UL
125 #define SYS_FREQ_3MHZ810 0x68UL
126 #define SYS_FREQ_3MHZ774 0x69UL
127 #define SYS_FREQ_3MHZ738 0x6AUL
128 #define SYS_FREQ_3MHZ704 0x6BUL
129 #define SYS_FREQ_3MHZ670 0x6CUL
130 #define SYS_FREQ_3MHZ636 0x6DUL
131 #define SYS_FREQ_3MHZ604 0x6EUL
132 #define SYS_FREQ_3MHZ571 0x6FUL
133 #define SYS_FREQ_3MHZ540 0x70UL
134 #define SYS_FREQ_3MHZ509 0x71UL
135 #define SYS_FREQ_3MHZ478 0x72UL
136 #define SYS_FREQ_3MHZ448 0x73UL
137 #define SYS_FREQ_3MHZ419 0x74UL
138 #define SYS_FREQ_3MHZ390 0x75UL
139 #define SYS_FREQ_3MHZ361 0x76UL
140 #define SYS_FREQ_3MHZ333 0x77UL
141 #define SYS_FREQ_3MHZ306 0x78UL
142 #define SYS_FREQ_3MHZ279 0x79UL
143 #define SYS_FREQ_3MHZ252 0x7AUL
144 #define SYS_FREQ_3MHZ226 0x7BUL
145 #define SYS_FREQ_3MHZ200 0x7CUL
146 #define SYS_FREQ_3MHZ175 0x7DUL
147 #define SYS_FREQ_3MHZ150 0x7EUL
148 #define SYS_FREQ_3MHZ125 0x7FUL
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_ */