libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
pmc_common_all.h
Go to the documentation of this file.
1/*
2 * This file is part of the libopencm3 project.
3 *
4 * Copyright (C) 2012 Gareth McMullin <gareth@blacksphere.co.nz>
5 * Copyright (C) 2015 Felix Held <felix-libopencm3@felixheld.de>
6 *
7 * This library is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#if defined(LIBOPENCM3_PMC_H)
22
23#ifndef LIBOPENCM3_PMC_COMMON_ALL_H
24#define LIBOPENCM3_PMC_COMMON_ALL_H
25
27
28/* --- Power Management Controller (PMC) registers ----------------------- */
29
30/* System Clock Enable Register */
31#define PMC_SCER MMIO32(PMC_BASE + 0x0000)
32
33/* System Clock Disable Register */
34#define PMC_SCDR MMIO32(PMC_BASE + 0x0004)
35
36/* System Clock Status Register */
37#define PMC_SCSR MMIO32(PMC_BASE + 0x0008)
38
39/* Main Oscillator Register */
40#define CKGR_MOR MMIO32(PMC_BASE + 0x0020)
41
42/* Main Clock Frequency Register */
43#define CKGR_MCFR MMIO32(PMC_BASE + 0x0024)
44
45/* PLLA Register */
46#define CKGR_PLLAR MMIO32(PMC_BASE + 0x0028)
47
48/* Master Clock Register */
49#define PMC_MCKR MMIO32(PMC_BASE + 0x0030)
50
51/* Programmable Clock 0 Register */
52#define PMC_PCK0 MMIO32(PMC_BASE + 0x0040)
53
54/* Programmable Clock 1 Register */
55#define PMC_PCK1 MMIO32(PMC_BASE + 0x0044)
56
57/* Programmable Clock 2 Register */
58#define PMC_PCK2 MMIO32(PMC_BASE + 0x0048)
59
60/* Interrupt Enable Register */
61#define PMC_IER MMIO32(PMC_BASE + 0x0060)
62
63/* Interrupt Disable Register */
64#define PMC_IDR MMIO32(PMC_BASE + 0x0064)
65
66/* Status Register */
67#define PMC_SR MMIO32(PMC_BASE + 0x0068)
68
69/* Interrupt Mask Register */
70#define PMC_IMR MMIO32(PMC_BASE + 0x006C)
71
72/* Fast Startup Mode Register */
73#define PMC_FSMR MMIO32(PMC_BASE + 0x0070)
74
75/* Fast Startup Polarity Register */
76#define PMC_FSPR MMIO32(PMC_BASE + 0x0074)
77
78/* Fault Output Clear Register */
79#define PMC_FOCR MMIO32(PMC_BASE + 0x0078)
80
81/* Write Protect Mode Register */
82#define PMC_WPMR MMIO32(PMC_BASE + 0x00E4)
83
84/* Write Protect Status Register */
85#define PMC_WPSR MMIO32(PMC_BASE + 0x00E8)
86
87
88/* --- Register contents --------------------------------------------------- */
89
90
91/* --- PMC System Clock Enable Register (PMC_SCER) ------------------------- */
92
93/* Programmable Clock Output Enable */
94#define PMC_SCER_PCK0 (0x01 << 8)
95#define PMC_SCER_PCK1 (0x01 << 9)
96#define PMC_SCER_PCK2 (0x01 << 10)
97
98
99/* --- PMC System Clock Disable Register (PMC_SCDR) ------------------------ */
100
101/* Programmable Clock Output Disable */
102#define PMC_SCDR_PCK0 (0x01 << 8)
103#define PMC_SCDR_PCK1 (0x01 << 9)
104#define PMC_SCDR_PCK2 (0x01 << 10)
105
106
107/* --- PMC System Clock Status Register (PMC_SCSR) ------------------------- */
108
109/* Programmable Clock Output Status */
110#define PMC_SCSR_PCK0 (0x01 << 8)
111#define PMC_SCSR_PCK1 (0x01 << 9)
112#define PMC_SCSR_PCK2 (0x01 << 10)
113
114
115/* for bit definitions for PMC System Clock Enable/Disable/Status Register see
116 * periph.h */
117
118
119/* --- PMC Clock Generator Main Oscillator Register (CKGR_MOR) ------------- */
120
121/* Clock Failure Detector Enable */
122#define CKGR_MOR_CFDEN (0x01 << 25)
123
124/* Main Oscillator Selection */
125#define CKGR_MOR_MOSCSEL (0x01 << 24)
126
127/* Password for changing settings */
128#define CKGR_MOR_KEY (0x37 << 16)
129
130/* Main Crystal Oscillator Start-up Time */
131#define CKGR_MOR_MOSCXTST_SHIFT 8
132#define CKGR_MOR_MOSCXTST_MASK (0xFF << 8)
133
134/* Main On-Chip RC Oscillator Frequency Selection */
135#define CKGR_MOR_MOSCRCF_SHIFT 4
136#define CKGR_MOR_MOSCRCF_MASK (0x07 << CKGR_MOR_MOSCRCF_SHIFT)
137
138/* Main On-Chip RC Oscillator selectable frequencies */
139#define CKGR_MOR_MOSCRCF_4MHZ (0 << CKGR_MOR_MOSCRCF_SHIFT)
140#define CKGR_MOR_MOSCRCF_8MHZ (1 << CKGR_MOR_MOSCRCF_SHIFT)
141#define CKGR_MOR_MOSCRCF_12MHZ (2 << CKGR_MOR_MOSCRCF_SHIFT)
142
143/* Main On-Chip RC Oscillator Enable */
144#define CKGR_MOR_MOSCRCEN (0x01 << 3)
145
146/* Main Crystal Oscillator Bypass */
147#define CKGR_MOR_MOSCXTBY (0x01 << 1)
148
149/* Main Crystal Oscillator Enable */
150#define CKGR_MOR_MOSCXTEN (0x01 << 0)
151
152
153/* --- PMC Clock Generator Main Clock Frequency Register (CKGR_MCFR) ------- */
154
155/* Main Clock Ready */
156#define CKGR_MCFR_MAINFRDY (0x01 << 16)
157
158/* Main Clock Frequency */
159#define CKGR_MCFR_MAINF_SHIFT 0
160#define CKGR_MCFR_MAINF_MASK (0xFFFF << CKGR_MCFR_MAINF_SHIFT)
161
162
163/* --- PMC Clock Generator PLLA Register (CKGR_PLLAR) ---------------------- */
164
165/* must be set to program CKGR_PLLAR */
166#define CKGR_PLLAR_ONE (0x01 << 29)
167
168/* PLLA Multiplier */
169#define CKGR_PLLAR_MULA_SHIFT 16
170#define CKGR_PLLAR_MULA_MASK (0x7FF << CKGR_PLLAR_MULA_SHIFT)
171
172/* PLLA Counter */
173#define CKGR_PLLAR_PLLACOUNT_SHIFT 8
174#define CKGR_PLLAR_PLLACOUNT_MASK (0x3F << CKGR_PLLAR_PLLACOUNT_SHIFT)
175
176/* Divider */
177#define CKGR_PLLAR_DIVA_SHIFT 0
178#define CKGR_PLLAR_DIVA_MASK (0xFF << CKGR_PLLAR_DIVA_SHIFT)
179
180
181/* --- PMC Master Clock Register (PMC_MCKR) -------------------------------- */
182
183/* Processor Clock Prescaler */
184#define PMC_MCKR_PRES_SHIFT 4
185#define PMC_MCKR_PRES_MASK (0x07 << PMC_MCKR_PRES_SHIFT)
186#define PMC_MCKR_PRES_CLK_1 (0 << PMC_MCKR_PRES_SHIFT)
187#define PMC_MCKR_PRES_CLK_2 (1 << PMC_MCKR_PRES_SHIFT)
188#define PMC_MCKR_PRES_CLK_4 (2 << PMC_MCKR_PRES_SHIFT)
189#define PMC_MCKR_PRES_CLK_8 (3 << PMC_MCKR_PRES_SHIFT)
190#define PMC_MCKR_PRES_CLK_16 (4 << PMC_MCKR_PRES_SHIFT)
191#define PMC_MCKR_PRES_CLK_32 (5 << PMC_MCKR_PRES_SHIFT)
192#define PMC_MCKR_PRES_CLK_64 (6 << PMC_MCKR_PRES_SHIFT)
193#define PMC_MCKR_PRES_CLK_3 (7 << PMC_MCKR_PRES_SHIFT)
194
195/* Master Clock Source Selection */
196#define PMC_MCKR_CSS_SHIFT 0
197#define PMC_MCKR_CSS_MASK (0x03 << PMC_MCKR_CSS_SHIFT)
198#define PMC_MCKR_CSS_SLOW_CLK (0 << PMC_MCKR_CSS_SHIFT)
199#define PMC_MCKR_CSS_MAIN_CLK (1 << PMC_MCKR_CSS_SHIFT)
200#define PMC_MCKR_CSS_PLLA_CLK (2 << PMC_MCKR_CSS_SHIFT)
201
202
203/* --- PMC Programmable Clock Register 0 (PMC_PCK0) ------------------------ */
204
205/* Programmable Clock Prescaler */
206#define PMC_PCK0_PRES_SHIFT 4
207#define PMC_PCK0_PRES_MASK (0x07 << PMC_PCK0_PRES_SHIFT)
208#define PMC_PCK0_PRES_CLK_1 (0 << PMC_PCK0_PRES_SHIFT)
209#define PMC_PCK0_PRES_CLK_2 (1 << PMC_PCK0_PRES_SHIFT)
210#define PMC_PCK0_PRES_CLK_4 (2 << PMC_PCK0_PRES_SHIFT)
211#define PMC_PCK0_PRES_CLK_8 (3 << PMC_PCK0_PRES_SHIFT)
212#define PMC_PCK0_PRES_CLK_16 (4 << PMC_PCK0_PRES_SHIFT)
213#define PMC_PCK0_PRES_CLK_32 (5 << PMC_PCK0_PRES_SHIFT)
214#define PMC_PCK0_PRES_CLK_64 (6 << PMC_PCK0_PRES_SHIFT)
215
216/* Master Clock Source Selection */
217#define PMC_PCK0_CSS_SHIFT 0
218#define PMC_PCK0_CSS_MASK (0x07 << PMC_PCK0_CSS_SHIFT)
219#define PMC_PCK0_CSS_SLOW_CLK (0 << PMC_PCK0_CSS_SHIFT)
220#define PMC_PCK0_CSS_MAIN_CLK (1 << PMC_PCK0_CSS_SHIFT)
221#define PMC_PCK0_CSS_PLLA_CLK (2 << PMC_PCK0_CSS_SHIFT)
222#define PMC_PCK0_CSS_MCK (4 << PMC_PCK0_CSS_SHIFT)
223
224
225/* --- PMC Programmable Clock Register 1 (PMC_PCK1) ------------------------ */
226
227/* Programmable Clock Prescaler */
228#define PMC_PCK1_PRES_SHIFT 4
229#define PMC_PCK1_PRES_MASK (0x07 << PMC_PCK1_PRES_SHIFT)
230#define PMC_PCK1_PRES_CLK_1 (0 << PMC_PCK1_PRES_SHIFT)
231#define PMC_PCK1_PRES_CLK_2 (1 << PMC_PCK1_PRES_SHIFT)
232#define PMC_PCK1_PRES_CLK_4 (2 << PMC_PCK1_PRES_SHIFT)
233#define PMC_PCK1_PRES_CLK_8 (3 << PMC_PCK1_PRES_SHIFT)
234#define PMC_PCK1_PRES_CLK_16 (4 << PMC_PCK1_PRES_SHIFT)
235#define PMC_PCK1_PRES_CLK_32 (5 << PMC_PCK1_PRES_SHIFT)
236#define PMC_PCK1_PRES_CLK_64 (6 << PMC_PCK1_PRES_SHIFT)
237
238/* Master Clock Source Selection */
239#define PMC_PCK1_CSS_SHIFT 0
240#define PMC_PCK1_CSS_MASK (0x07 << PMC_PCK1_CSS_SHIFT)
241#define PMC_PCK1_CSS_SLOW_CLK (0 << PMC_PCK1_CSS_SHIFT)
242#define PMC_PCK1_CSS_MAIN_CLK (1 << PMC_PCK1_CSS_SHIFT)
243#define PMC_PCK1_CSS_PLLA_CLK (2 << PMC_PCK1_CSS_SHIFT)
244#define PMC_PCK1_CSS_MCK (4 << PMC_PCK1_CSS_SHIFT)
245
246
247/* --- PMC Programmable Clock Register 2 (PMC_PCK2) ------------------------ */
248
249/* Programmable Clock Prescaler */
250#define PMC_PCK2_PRES_SHIFT 4
251#define PMC_PCK2_PRES_MASK (0x07 << PMC_PCK2_PRES_SHIFT)
252#define PMC_PCK2_PRES_CLK_1 (0 << PMC_PCK2_PRES_SHIFT)
253#define PMC_PCK2_PRES_CLK_2 (1 << PMC_PCK2_PRES_SHIFT)
254#define PMC_PCK2_PRES_CLK_4 (2 << PMC_PCK2_PRES_SHIFT)
255#define PMC_PCK2_PRES_CLK_8 (3 << PMC_PCK2_PRES_SHIFT)
256#define PMC_PCK2_PRES_CLK_16 (4 << PMC_PCK2_PRES_SHIFT)
257#define PMC_PCK2_PRES_CLK_32 (5 << PMC_PCK2_PRES_SHIFT)
258#define PMC_PCK2_PRES_CLK_64 (6 << PMC_PCK2_PRES_SHIFT)
259
260/* Master Clock Source Selection */
261#define PMC_PCK2_CSS_SHIFT 0
262#define PMC_PCK2_CSS_MASK (0x07 << PMC_PCK2_CSS_SHIFT)
263#define PMC_PCK2_CSS_SLOW_CLK (0 << PMC_PCK2_CSS_SHIFT)
264#define PMC_PCK2_CSS_MAIN_CLK (1 << PMC_PCK2_CSS_SHIFT)
265#define PMC_PCK2_CSS_PLLA_CLK (2 << PMC_PCK2_CSS_SHIFT)
266#define PMC_PCK2_CSS_MCK (4 << PMC_PCK2_CSS_SHIFT)
267
268
269/* --- PMC Interrupt Enable Register (PMC_IER) ----------------------------- */
270
271/* Clock Failure Detector Event Interrupt Enable */
272#define PMC_IER_CFDEV (0x01 << 18)
273
274/* Main On-Chip RC Status Interrupt Enable */
275#define PMC_IER_MOSCRCS (0x01 << 17)
276
277/* Main Oscillator Selection Status Interrupt Enable */
278#define PMC_IER_MOSCSELS (0x01 << 16)
279
280/* Programmable Clock Ready 2 Interrupt Enable */
281#define PMC_IER_PCKRDY2 (0x01 << 10)
282
283/* Programmable Clock Ready 1 Interrupt Enable */
284#define PMC_IER_PCKRDY1 (0x01 << 9)
285
286/* Programmable Clock Ready 0 Interrupt Enable */
287#define PMC_IER_PCKRDY0 (0x01 << 8)
288
289/* Master Clock Ready Interrupt Enable */
290#define PMC_IER_MCKRDY (0x01 << 3)
291
292/* PLLA Lock Interrupt Enable */
293#define PMC_IER_LOCKA (0x01 << 1)
294
295/* Main Crystal Oscillator Status Interrupt Enable */
296#define PMC_IER_MOSCXTS (0x01 << 0)
297
298
299/* --- PMC Interrupt Disable Register (PMC_IDR) ----------------------------- */
300
301/* Clock Failure Detector Event Interrupt Disable */
302#define PMC_IDR_CFDEV (0x01 << 18)
303
304/* Main On-Chip RC Status Interrupt Disable */
305#define PMC_IDR_MOSCRCS (0x01 << 17)
306
307/* Main Oscillator Selection Status Interrupt Disable */
308#define PMC_IDR_MOSCSELS (0x01 << 16)
309
310/* Programmable Clock Ready 2 Interrupt Disable */
311#define PMC_IDR_PCKRDY2 (0x01 << 10)
312
313/* Programmable Clock Ready 1 Interrupt Disable */
314#define PMC_IDR_PCKRDY1 (0x01 << 9)
315
316/* Programmable Clock Ready 0 Interrupt Disable */
317#define PMC_IDR_PCKRDY0 (0x01 << 8)
318
319/* Master Clock Ready Interrupt Disable */
320#define PMC_IDR_MCKRDY (0x01 << 3)
321
322/* PLLA Lock Interrupt Disable */
323#define PMC_IDR_LOCKA (0x01 << 1)
324
325/* Main Crystal Oscillator Status Interrupt Disable */
326#define PMC_IDR_MOSCXTS (0x01 << 0)
327
328
329/* --- PMC Status Register (PMC_SR) ---------------------------------------- */
330
331/* Clock Failure Detector Fault Output Status */
332#define PMC_SR_FOS (0x01 << 20)
333
334/* Clock Failure Detector Status */
335#define PMC_SR_CFDS (0x01 << 19)
336
337/* Clock Failure Detector Event */
338#define PMC_SR_CFDEV (0x01 << 18)
339
340/* Main On-Chip RC Oscillator Status */
341#define PMC_SR_MOSCRCS (0x01 << 17)
342
343/* Main Oscillator Selection Status */
344#define PMC_SR_MOSCSELS (0x01 << 16)
345
346/* Programmable Clock 2 Ready Status */
347#define PMC_SR_PCKRDY2 (0x01 << 10)
348
349/* Programmable Clock 1 Ready Status */
350#define PMC_SR_PCKRDY1 (0x01 << 9)
351
352/* Programmable Clock 0 Ready Status */
353#define PMC_SR_PCKRDY0 (0x01 << 8)
354
355/* Slow Clock Oscillator Selection */
356#define PMC_SR_OSCSELS (0x01 << 7)
357
358/* Master Clock Status */
359#define PMC_SR_MCKRDY (0x01 << 3)
360
361/* PLLA Lock Status */
362#define PMC_SR_LOCKA (0x01 << 1)
363
364/* Main XTAL Oscillator Status */
365#define PMC_SR_MOSCXTS (0x01 << 0)
366
367
368/* --- PMC Interrupt Mask Register (PMC_IMR) ------------------------------- */
369
370/* Clock Failure Detector Event Interrupt Mask */
371#define PMC_IMR_CFDEV (0x01 << 18)
372
373/* Main On-Chip RC Status Interrupt Mask */
374#define PMC_IMR_MOSCRCS (0x01 << 17)
375
376/* Main Oscillator Selection Status Interrupt Mask */
377#define PMC_IMR_MOSCSELS (0x01 << 16)
378
379/* Programmable Clock Ready 2 Interrupt Mask */
380#define PMC_IMR_PCKRDY2 (0x01 << 10)
381
382/* Programmable Clock Ready 1 Interrupt Mask */
383#define PMC_IMR_PCKRDY1 (0x01 << 9)
384
385/* Programmable Clock Ready 0 Interrupt Mask */
386#define PMC_IMR_PCKRDY0 (0x01 << 8)
387
388/* Master Clock Ready Interrupt Mask */
389#define PMC_IMR_MCKRDY (0x01 << 3)
390
391/* PLLA Lock Interrupt Mask */
392#define PMC_IMR_LOCKA (0x01 << 1)
393
394/* Main Crystal Oscillator Status Interrupt Mask */
395#define PMC_IMR_MOSCXTS (0x01 << 0)
396
397
398/* --- PMC Fast Startup Mode Register (PMC_FSMR) --------------------------- */
399
400/* Low Power Mode */
401#define PMC_FSMR_LPM (0x01 << 20)
402
403/* USB Alarm Enable */
404#define PMC_FSMR_USBAL (0x01 << 18)
405
406/* RTC Alarm Enable */
407#define PMC_FSMR_RTCAL (0x01 << 17)
408
409/* RTC Alarm Enable */
410#define PMC_FSMR_RTTAL (0x01 << 16)
411
412/* Fast Startup Input Enable 0 to 15 */
413#define PMC_FSMR_FSTT15 (0x01 << 15)
414#define PMC_FSMR_FSTT14 (0x01 << 14)
415#define PMC_FSMR_FSTT13 (0x01 << 13)
416#define PMC_FSMR_FSTT12 (0x01 << 12)
417#define PMC_FSMR_FSTT11 (0x01 << 11)
418#define PMC_FSMR_FSTT10 (0x01 << 10)
419#define PMC_FSMR_FSTT9 (0x01 << 9)
420#define PMC_FSMR_FSTT8 (0x01 << 8)
421#define PMC_FSMR_FSTT7 (0x01 << 7)
422#define PMC_FSMR_FSTT6 (0x01 << 6)
423#define PMC_FSMR_FSTT5 (0x01 << 5)
424#define PMC_FSMR_FSTT4 (0x01 << 4)
425#define PMC_FSMR_FSTT3 (0x01 << 3)
426#define PMC_FSMR_FSTT2 (0x01 << 2)
427#define PMC_FSMR_FSTT1 (0x01 << 1)
428#define PMC_FSMR_FSTT0 (0x01 << 0)
429
430
431/* --- PMC Fast Startup Polarity Register (PMC_FSPR) ----------------------- */
432
433/* Fast Startup Input Polarity x */
434#define PMC_FSPR_FSTP15 (0x01 << 15)
435#define PMC_FSPR_FSTP14 (0x01 << 14)
436#define PMC_FSPR_FSTP13 (0x01 << 13)
437#define PMC_FSPR_FSTP12 (0x01 << 12)
438#define PMC_FSPR_FSTP11 (0x01 << 11)
439#define PMC_FSPR_FSTP10 (0x01 << 10)
440#define PMC_FSPR_FSTP9 (0x01 << 9)
441#define PMC_FSPR_FSTP8 (0x01 << 8)
442#define PMC_FSPR_FSTP7 (0x01 << 7)
443#define PMC_FSPR_FSTP6 (0x01 << 6)
444#define PMC_FSPR_FSTP5 (0x01 << 5)
445#define PMC_FSPR_FSTP4 (0x01 << 4)
446#define PMC_FSPR_FSTP3 (0x01 << 3)
447#define PMC_FSPR_FSTP2 (0x01 << 2)
448#define PMC_FSPR_FSTP1 (0x01 << 1)
449#define PMC_FSPR_FSTP0 (0x01 << 0)
450
451
452/* --- PMC Fault Output Clear Register (PMC_FOCR) -------------------------- */
453
454/* Fault Output Clear */
455#define PMC_FOCR_FOCLR (0x01 << 0)
456
457
458/* --- PMC Write Protect Mode Register (PMC_WPMR) -------------------------- */
459
460/* Write Protect Key */
461#define PMC_WPMR_WPKEY_SHIFT 8
462#define PMC_WPMR_WPKEY (0x504D43 << PMC_WPMR_WPKEY_SHIFT)
463
464/* Write Protect Enable */
465#define PMC_WPMR_WPEN (0x01 << 0)
466
467
468/* --- PMC Write Protect Status Register (PMC_WPSR) ------------------------ */
469
470/* Write Protect Violation Source */
471#define PMC_WPSR_WPVSRC_SHIFT 8
472#define PMC_WPSR_WPVSRC_MASK (0xFFFF << PMC_WPSR_WPVSRC_SHIFT)
473
474/* Write Protect Violation Status */
475#define PMC_WPSR_WPVS (0x01 << 0)
476
477
478
479
480extern uint32_t pmc_mck_frequency;
481
482enum mck_src {
483 MCK_SRC_SLOW = 0,
484 MCK_SRC_MAIN = 1,
485 MCK_SRC_PLLA = 2,
486 MCK_SRC_UPLL = 3,
487};
488
489void pmc_mck_set_source(enum mck_src src);
490void pmc_xtal_enable(bool en, uint8_t startup_time);
491void pmc_plla_config(uint8_t mul, uint8_t div);
492void pmc_peripheral_clock_enable(uint8_t pid);
493void pmc_peripheral_clock_disable(uint8_t pid);
496
497#endif
498
499#else
500#warning "pmc_common_all.h should not be included explicitly, only via pmc.h"
501#endif
void pmc_clock_setup_in_rc_4mhz_out_84mhz(void)
Definition: pmc.c:93
void pmc_xtal_enable(bool en, uint8_t startup_time)
Definition: pmc.c:26
void pmc_peripheral_clock_enable(uint8_t pid)
Definition: pmc.c:45
uint32_t pmc_mck_frequency
Default peripheral clock frequency after reset.
Definition: pmc.c:24
void pmc_clock_setup_in_xtal_12mhz_out_84mhz(void)
Definition: pmc.c:78
void pmc_peripheral_clock_disable(uint8_t pid)
Definition: pmc.c:59
void pmc_plla_config(uint8_t mul, uint8_t div)
Definition: pmc.c:38
void pmc_mck_set_source(enum mck_src src)
Definition: pmc.c:72