]> git.sur5r.net Git - freertos/blob - Demo/AVR32_UC3A_GCC/Atmel_SW_Framework/DRIVERS/PM/pm.h
b244332d80c962fd4e4b2ea3b6659b0fcb90580a
[freertos] / Demo / AVR32_UC3A_GCC / Atmel_SW_Framework / DRIVERS / PM / pm.h
1 /* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */\r
2
3 /*This file has been prepared for Doxygen automatic documentation generation.*/\r
4 /*! \file *********************************************************************\r
5  *\r
6  * \brief Power Manager driver.\r
7  *\r
8  *\r
9  * - Compiler:           IAR EWAVR32 and GNU GCC for AVR32\r
10  * - Supported devices:  All AVR32 devices.\r
11  * - AppNote:\r
12  *\r
13  * \author               Atmel Corporation: http://www.atmel.com \n\r
14  *                       Support and FAQ: http://support.atmel.no/\r
15  *\r
16  *****************************************************************************/\r
17 \r
18 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.\r
19  *\r
20  * Redistribution and use in source and binary forms, with or without\r
21  * modification, are permitted provided that the following conditions are met:\r
22  *\r
23  * 1. Redistributions of source code must retain the above copyright notice, this\r
24  * list of conditions and the following disclaimer.\r
25  *\r
26  * 2. Redistributions in binary form must reproduce the above copyright notice,\r
27  * this list of conditions and the following disclaimer in the documentation\r
28  * and/or other materials provided with the distribution.\r
29  *\r
30  * 3. The name of Atmel may not be used to endorse or promote products derived\r
31  * from this software without specific prior written permission.\r
32  *\r
33  * 4. This software may only be redistributed and used in connection with an Atmel\r
34  * AVR product.\r
35  *\r
36  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED\r
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
38  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE\r
39  * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR\r
40  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
41  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
42  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
43  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
44  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
45  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE\r
46  *\r
47  */\r
48 \r
49 #ifndef _PM_H_\r
50 #define _PM_H_\r
51 \r
52 #include <avr32/io.h>\r
53 #include "compiler.h"\r
54 #include "preprocessor.h"\r
55 \r
56 \r
57 /*! \brief Sets the MCU in the specified sleep mode.\r
58  *\r
59  * \param mode Sleep mode:\r
60  *   \arg \c AVR32_PM_SMODE_IDLE: Idle;\r
61  *   \arg \c AVR32_PM_SMODE_FROZEN: Frozen;\r
62  *   \arg \c AVR32_PM_SMODE_STANDBY: Standby;\r
63  *   \arg \c AVR32_PM_SMODE_STOP: Stop;\r
64  *   \arg \c AVR32_PM_SMODE_DEEP_STOP: DeepStop;\r
65  *   \arg \c AVR32_PM_SMODE_STATIC: Static.\r
66  */\r
67 #define SLEEP(mode)   {__asm__ __volatile__ ("sleep "STRINGZ(mode));}\r
68 \r
69 \r
70 //! Input and output parameters when initializing PM clocks using pm_configure_clocks().\r
71 typedef struct\r
72 {\r
73   //! CPU frequency (input/output argument).\r
74   unsigned long cpu_f;\r
75 \r
76   //! PBA frequency (input/output argument).\r
77   unsigned long pba_f;\r
78 \r
79   //! Oscillator 0's external crystal(or external clock) frequency (board dependant) (input argument).\r
80   unsigned long osc0_f;\r
81 \r
82   //! Oscillator 0's external crystal(or external clock) startup time: AVR32_PM_OSCCTRL0_STARTUP_x_RCOSC (input argument).\r
83   unsigned long osc0_startup;\r
84 } pm_freq_param_t;\r
85 \r
86 #define PM_FREQ_STATUS_FAIL   (-1)\r
87 #define PM_FREQ_STATUS_OK     (0)\r
88 \r
89 \r
90 /*! \brief Gets the MCU reset cause.\r
91  *\r
92  * \param pm Base address of the Power Manager instance (i.e. &AVR32_PM).\r
93  *\r
94  * \return The MCU reset cause which can be masked with the\r
95  *         \c AVR32_PM_RCAUSE_x_MASK bit-masks to isolate specific causes.\r
96  */\r
97 #if (defined __GNUC__)\r
98 __attribute__((__always_inline__))\r
99 #endif\r
100 extern __inline__ unsigned int pm_get_reset_cause(volatile avr32_pm_t *pm)\r
101 {\r
102   return pm->rcause;\r
103 }\r
104 \r
105 \r
106 /*!\r
107  * \brief This function will enable the external clock mode of the oscillator 0.\r
108  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
109  */\r
110 extern void pm_enable_osc0_ext_clock(volatile avr32_pm_t *pm);\r
111 \r
112 \r
113 /*!\r
114  * \brief This function will enable the crystal mode of the oscillator 0.\r
115  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
116  * \param fosc0 Oscillator 0 crystal frequency (Hz)\r
117  */\r
118 extern void pm_enable_osc0_crystal(volatile avr32_pm_t *pm, unsigned int fosc0);\r
119 \r
120 \r
121 /*!\r
122  * \brief This function will enable the oscillator 0 to be used with a startup time.\r
123  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
124  * \param startup Clock 0 startup time. AVR32_PM_OSCCTRL0_STARTUP_x_RCOSC.\r
125  */\r
126 extern void pm_enable_clk0(volatile avr32_pm_t *pm, unsigned int startup);\r
127 \r
128 \r
129 /*!\r
130  * \brief This function will disable the oscillator 0.\r
131  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
132  */\r
133 extern void pm_disable_clk0(volatile avr32_pm_t *pm);\r
134 \r
135 \r
136 /*!\r
137  * \brief This function will enable the oscillator 0 to be used with no startup time.\r
138  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
139  * \param startup Clock 0 startup time, for which the function does not wait. AVR32_PM_OSCCTRL0_STARTUP_x_RCOSC.\r
140  */\r
141 extern void pm_enable_clk0_no_wait(volatile avr32_pm_t *pm, unsigned int startup);\r
142 \r
143 \r
144 /*!\r
145  * \brief This function will wait until the Osc0 clock is ready.\r
146  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
147  */\r
148 extern void pm_wait_for_clk0_ready(volatile avr32_pm_t *pm);\r
149 \r
150 \r
151 /*!\r
152  * \brief This function will enable the external clock mode of the oscillator 1.\r
153  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
154  */\r
155 extern void pm_enable_osc1_ext_clock(volatile avr32_pm_t *pm);\r
156 \r
157 \r
158 /*!\r
159  * \brief This function will enable the crystal mode of the oscillator 1.\r
160  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
161  * \param fosc1 Oscillator 1 crystal frequency (Hz)\r
162  */\r
163 extern void pm_enable_osc1_crystal(volatile avr32_pm_t *pm, unsigned int fosc1);\r
164 \r
165 \r
166 /*!\r
167  * \brief This function will enable the oscillator 1 to be used with a startup time.\r
168  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
169  * \param startup Clock 1 startup time. AVR32_PM_OSCCTRL1_STARTUP_x_RCOSC.\r
170  */\r
171 extern void pm_enable_clk1(volatile avr32_pm_t *pm, unsigned int startup);\r
172 \r
173 \r
174 /*!\r
175  * \brief This function will disable the oscillator 1.\r
176  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
177  */\r
178 extern void pm_disable_clk1(volatile avr32_pm_t *pm);\r
179 \r
180 \r
181 /*!\r
182  * \brief This function will enable the oscillator 1 to be used with no startup time.\r
183  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
184  * \param startup Clock 1 startup time, for which the function does not wait. AVR32_PM_OSCCTRL1_STARTUP_x_RCOSC.\r
185  */\r
186 extern void pm_enable_clk1_no_wait(volatile avr32_pm_t *pm, unsigned int startup);\r
187 \r
188 \r
189 /*!\r
190  * \brief This function will wait until the Osc1 clock is ready.\r
191  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
192  */\r
193 extern void pm_wait_for_clk1_ready(volatile avr32_pm_t *pm);\r
194 \r
195 \r
196 /*!\r
197  * \brief This function will enable the external clock mode of the 32-kHz oscillator.\r
198  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
199  */\r
200 extern void pm_enable_osc32_ext_clock(volatile avr32_pm_t *pm);\r
201 \r
202 \r
203 /*!\r
204  * \brief This function will enable the crystal mode of the 32-kHz oscillator.\r
205  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
206  */\r
207 extern void pm_enable_osc32_crystal(volatile avr32_pm_t *pm);\r
208 \r
209 \r
210 /*!\r
211  * \brief This function will enable the oscillator 32 to be used with a startup time.\r
212  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
213  * \param startup Clock 32 kHz startup time. AVR32_PM_OSCCTRL32_STARTUP_x_RCOSC.\r
214  */\r
215 extern void pm_enable_clk32(volatile avr32_pm_t *pm, unsigned int startup);\r
216 \r
217 \r
218 /*!\r
219  * \brief This function will disable the oscillator 32.\r
220  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
221  */\r
222 extern void pm_disable_clk32(volatile avr32_pm_t *pm);\r
223 \r
224 \r
225 /*!\r
226  * \brief This function will enable the oscillator 32 to be used with no startup time.\r
227  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
228  * \param startup Clock 32 kHz startup time, for which the function does not wait. AVR32_PM_OSCCTRL32_STARTUP_x_RCOSC.\r
229  */\r
230 extern void pm_enable_clk32_no_wait(volatile avr32_pm_t *pm, unsigned int startup);\r
231 \r
232 \r
233 /*!\r
234  * \brief This function will wait until the osc32 clock is ready.\r
235  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
236  */\r
237 extern void pm_wait_for_clk32_ready(volatile avr32_pm_t *pm);\r
238 \r
239 \r
240 /*!\r
241  * \brief This function will select all the power manager clocks.\r
242  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
243  * \param pbadiv Peripheral Bus A clock divisor enable\r
244  * \param pbasel Peripheral Bus A select\r
245  * \param pbbdiv Peripheral Bus B clock divisor enable\r
246  * \param pbbsel Peripheral Bus B select\r
247  * \param hsbdiv High Speed Bus clock divisor enable (CPU clock = HSB clock)\r
248  * \param hsbsel High Speed Bus select (CPU clock = HSB clock )\r
249  */\r
250 extern void pm_cksel(volatile avr32_pm_t *pm, unsigned int pbadiv, unsigned int pbasel, unsigned int pbbdiv, unsigned int pbbsel, unsigned int hsbdiv, unsigned int hsbsel);\r
251 \r
252 \r
253 /*!\r
254  * \brief This function will setup a generic clock.\r
255  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
256  * \param gc generic clock number (0 for gc0...)\r
257  * \param osc_or_pll Use OSC (=0) or PLL (=1)\r
258  * \param pll_osc Select Osc0/PLL0 or Osc1/PLL1\r
259  * \param diven Generic clock divisor enable\r
260  * \param div Generic clock divisor\r
261  */\r
262 extern void pm_gc_setup(volatile avr32_pm_t *pm, unsigned int gc, unsigned int osc_or_pll, unsigned int pll_osc, unsigned int diven, unsigned int div);\r
263 \r
264 \r
265 /*!\r
266  * \brief This function will enable a generic clock.\r
267  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
268  * \param gc generic clock number (0 for gc0...)\r
269  */\r
270 extern void pm_gc_enable(volatile avr32_pm_t *pm, unsigned int gc);\r
271 \r
272 \r
273 /*!\r
274  * \brief This function will disable a generic clock.\r
275  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
276  * \param gc generic clock number (0 for gc0...)\r
277  */\r
278 extern void pm_gc_disable(volatile avr32_pm_t *pm, unsigned int gc);\r
279 \r
280 \r
281 /*!\r
282  * \brief This function will setup a PLL.\r
283  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
284  * \param pll PLL number(0 for PLL0, 1 for PLL1)\r
285  * \param mul PLL MUL in the PLL formula\r
286  * \param div PLL DIV in the PLL formula\r
287  * \param osc OSC number (0 for osc0, 1 for osc1)\r
288  * \param lockcount PLL lockount\r
289  */\r
290 extern void pm_pll_setup(volatile avr32_pm_t *pm, unsigned int pll, unsigned int mul, unsigned int div, unsigned int osc, unsigned int lockcount);\r
291 \r
292 \r
293 /*!\r
294  * \brief This function will set a PLL option.\r
295  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
296  * \param pll PLL number(0 for PLL0, 1 for PLL1)\r
297  * \param pll_freq Set to 1 for VCO frequency range 80-180MHz, set to 0 for VCO frequency range 160-240Mhz.\r
298  * \param pll_div2 Divide the PLL output frequency by 2 (this settings does not change the FVCO value)\r
299  * \param pll_wbwdisable 1 Disable the Wide-Bandith Mode (Wide-Bandwith mode allow a faster startup time and out-of-lock time). 0 to enable the Wide-Bandith Mode.\r
300  */\r
301 extern void pm_pll_set_option(volatile avr32_pm_t *pm, unsigned int pll, unsigned int  pll_freq, unsigned int  pll_div2, unsigned int  pll_wbwdisable);\r
302 \r
303 \r
304 /*!\r
305  * \brief This function will get a PLL option.\r
306  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
307  * \param pll PLL number(0 for PLL0, 1 for PLL1)\r
308  * \return       Option\r
309  */\r
310 extern unsigned int pm_pll_get_option(volatile avr32_pm_t *pm, unsigned int pll);\r
311 \r
312 \r
313 /*!\r
314  * \brief This function will enable a PLL.\r
315  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
316  * \param pll PLL number(0 for PLL0, 1 for PLL1)\r
317  */\r
318 extern void pm_pll_enable(volatile avr32_pm_t *pm, unsigned int pll);\r
319 \r
320 \r
321 /*!\r
322  * \brief This function will disable a PLL.\r
323  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
324  * \param pll PLL number(0 for PLL0, 1 for PLL1)\r
325  */\r
326 extern void pm_pll_disable(volatile avr32_pm_t *pm, unsigned int pll);\r
327 \r
328 \r
329 /*!\r
330  * \brief This function will wait for PLL0 locked\r
331  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
332  */\r
333 extern void pm_wait_for_pll0_locked(volatile avr32_pm_t *pm);\r
334 \r
335 \r
336 /*!\r
337  * \brief This function will wait for PLL1 locked\r
338  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
339  */\r
340 extern void pm_wait_for_pll1_locked(volatile avr32_pm_t *pm);\r
341 \r
342 \r
343 /*!\r
344  * \brief This function will switch the power manager main clock.\r
345  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
346  * \param clock Clock to be switched on. AVR32_PM_MCSEL_SLOW for RCOsc, AVR32_PM_MCSEL_OSC0 for Osc0, AVR32_PM_MCSEL_PLL0 for PLL0.\r
347  */\r
348 extern void pm_switch_to_clock(volatile avr32_pm_t *pm, unsigned long clock);\r
349 \r
350 \r
351 /*!\r
352  * \brief Switch main clock to clock Osc0 (crystal mode)\r
353  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
354  * \param fosc0 Oscillator 0 crystal frequency (Hz)\r
355  * \param startup Crystal 0 startup time. AVR32_PM_OSCCTRL0_STARTUP_x_RCOSC.\r
356  */\r
357 extern void pm_switch_to_osc0(volatile avr32_pm_t *pm, unsigned int fosc0, unsigned int startup);\r
358 \r
359 \r
360 /*! \brief Enables the Brown-Out Detector interrupt.\r
361  *\r
362  * \param pm Base address of the Power Manager (i.e. &AVR32_PM).\r
363  */\r
364 extern void pm_bod_enable_irq(volatile avr32_pm_t *pm);\r
365 \r
366 \r
367 /*! \brief Disables the Brown-Out Detector interrupt.\r
368  *\r
369  * \param pm Base address of the Power Manager (i.e. &AVR32_PM).\r
370  */\r
371 extern void pm_bod_disable_irq(volatile avr32_pm_t *pm);\r
372 \r
373 \r
374 /*! \brief Clears the Brown-Out Detector interrupt flag.\r
375  *\r
376  * \param pm Base address of the Power Manager (i.e. &AVR32_PM).\r
377  */\r
378 extern void pm_bod_clear_irq(volatile avr32_pm_t *pm);\r
379 \r
380 \r
381 /*! \brief Gets the Brown-Out Detector interrupt flag.\r
382  *\r
383  * \param pm Base address of the Power Manager (i.e. &AVR32_PM).\r
384  *\r
385  * \retval 0 No BOD interrupt.\r
386  * \retval 1 BOD interrupt pending.\r
387  */\r
388 extern unsigned long pm_bod_get_irq_status(volatile avr32_pm_t *pm);\r
389 \r
390 \r
391 /*! \brief Gets the Brown-Out Detector interrupt enable status.\r
392  *\r
393  * \param pm Base address of the Power Manager (i.e. &AVR32_PM).\r
394  *\r
395  * \retval 0 BOD interrupt disabled.\r
396  * \retval 1 BOD interrupt enabled.\r
397  */\r
398 extern unsigned long pm_bod_get_irq_enable_bit(volatile avr32_pm_t *pm);\r
399 \r
400 \r
401 /*! \brief Gets the triggering threshold of the Brown-Out Detector.\r
402  *\r
403  * \param pm Base address of the Power Manager (i.e. &AVR32_PM).\r
404  *\r
405  * \return Triggering threshold of the BOD. See the electrical characteristics\r
406  *         in the part datasheet for actual voltage levels.\r
407  */\r
408 extern unsigned long pm_bod_get_level(volatile avr32_pm_t *pm);\r
409 \r
410 \r
411 /*!\r
412  * \brief Read the content of the PM GPLP registers\r
413  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
414  * \param gplp GPLP register index (0,1,... depending on the number of GPLP registers for a given part)\r
415  *\r
416  * \return The content of the chosen GPLP register.\r
417  */\r
418 extern unsigned long pm_read_gplp(volatile avr32_pm_t *pm, unsigned long gplp);\r
419 \r
420 \r
421 /*!\r
422  * \brief Write into the PM GPLP registers\r
423  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
424  * \param gplp GPLP register index (0,1,... depending on the number of GPLP registers for a given part)\r
425  * \param value Value to write\r
426  */\r
427 extern void pm_write_gplp(volatile avr32_pm_t *pm, unsigned long gplp, unsigned long value);\r
428 \r
429 \r
430 /*! \brief Enable the clock of a module.\r
431  *\r
432  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
433  * \param module The module to clock (use one of the defines in the part-specific\r
434  * header file under "toolchain folder"/avr32/inc(lude)/avr32/; depending on the\r
435  * clock domain, look for the sections "CPU clocks", "HSB clocks", "PBx clocks")\r
436  *\r
437  * \return Status.\r
438  *   \retval 0  Success.\r
439  *   \retval <0 An error occured.\r
440  */\r
441 extern long pm_enable_module(volatile avr32_pm_t *pm, unsigned long module);\r
442 \r
443 /*! \brief Disable the clock of a module.\r
444  *\r
445  * \param pm Base address of the Power Manager (i.e. &AVR32_PM)\r
446  * \param module The module to shut down (use one of the defines in the part-specific\r
447  * header file under "toolchain folder"/avr32/inc(lude)/avr32/; depending on the\r
448  * clock domain, look for the sections "CPU clocks", "HSB clocks", "PBx clocks")\r
449  *\r
450  * \return Status.\r
451  *   \retval 0  Success.\r
452  *   \retval <0 An error occured.\r
453  */\r
454 extern long pm_disable_module(volatile avr32_pm_t *pm, unsigned long module);\r
455 \r
456 \r
457 \r
458 /*! \brief Automatically configure the CPU, PBA, PBB, and HSB clocks\r
459  *         according to the user wishes.\r
460  *\r
461  * This function needs some parameters stored in a pm_freq_param_t structure:\r
462  *  - cpu_f and pba_f are the wanted frequencies,\r
463  *  - osc0_f is the oscillator 0 on-board frequency (e.g. FOSC0),\r
464  *  - osc0_startup is the oscillator 0 startup time (e.g. OSC0_STARTUP).\r
465  *\r
466  * The function will then configure the clocks using the following rules:\r
467  *  - It first try to find a valid PLL frequency (the highest possible value to avoid jitter) in order\r
468  *    to satisfy the CPU frequency,\r
469  *  - It optimizes the configuration depending the various divide stages,\r
470  *  - Then, the PBA frequency is configured from the CPU freq.\r
471  *  - Note that HSB and PBB are configured with the same frequency as CPU.\r
472  *  - Note also that the number of wait states of the flash read accesses is automatically set-up depending\r
473  *    the CPU frequency. As a consequence, the application needs the FLASHC driver to compile.\r
474  *\r
475  * The CPU, HSB and PBA frequencies programmed after configuration are stored back into cpu_f and pba_f.\r
476  *\r
477  * \param param    pointer on the configuration structure.\r
478  *\r
479  * \retval PM_FREQ_STATUS_OK    Mode successfully initialized.\r
480  * \retval PM_FREQ_STATUS_FAIL  The configuration can not be done.\r
481  */\r
482 extern int pm_configure_clocks(pm_freq_param_t *param);\r
483 \r
484 \r
485 /*! \brief Automatically configure the USB clock.\r
486  *\r
487  * USB clock is configured to 48MHz, using the PLL1 from the Oscillator0, assuming\r
488  * a 12 MHz crystal is connected to it.\r
489  */\r
490 extern void pm_configure_usb_clock(void);\r
491 \r
492 \r
493 #endif  // _PM_H_\r