system.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. /**
  2. * \file
  3. *
  4. * \brief SAM System related functionality
  5. *
  6. * Copyright (C) 2012-2015 Atmel Corporation. All rights reserved.
  7. *
  8. * \asf_license_start
  9. *
  10. * \page License
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions are met:
  14. *
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. *
  18. * 2. Redistributions in binary form must reproduce the above copyright notice,
  19. * this list of conditions and the following disclaimer in the documentation
  20. * and/or other materials provided with the distribution.
  21. *
  22. * 3. The name of Atmel may not be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * 4. This software may only be redistributed and used in connection with an
  26. * Atmel microcontroller product.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
  29. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  30. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
  31. * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
  32. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  36. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  37. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  38. * POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. * \asf_license_stop
  41. *
  42. */
  43. /*
  44. * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
  45. */
  46. #ifndef SYSTEM_H_INCLUDED
  47. #define SYSTEM_H_INCLUDED
  48. #include <compiler.h>
  49. #include <clock.h>
  50. #include <gclk.h>
  51. #include <pinmux.h>
  52. #include <power.h>
  53. #include <reset.h>
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. /**
  58. * \defgroup asfdoc_sam0_system_group SAM System (SYSTEM) Driver
  59. *
  60. * This driver for Atmel&reg; | SMART ARM&reg;-based microcontrollers provides an interface for the configuration
  61. * and management of the device's system relation functionality, necessary for
  62. * the basic device operation. This is not limited to a single peripheral, but
  63. * extends across multiple hardware peripherals.
  64. *
  65. * The following peripherals are used by this module:
  66. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  67. * - PM (Power Manager)
  68. * - RSTC (Reset Controller)
  69. * - SUPC (Supply Controller)
  70. * \endif
  71. * \if DEVICE_SAMC21_SYSTEM_SUPPORT
  72. * - PM (Power Manager)
  73. * - RSTC (Reset Controller)
  74. * - SUPC (Supply Controller)
  75. * \endif
  76. * \if DEVICE_SAMD21_SYSTEM_SUPPORT
  77. * - SYSCTRL (System Control)
  78. * - PM (Power Manager)
  79. * \endif
  80. *
  81. * The following devices can use this module:
  82. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  83. * - Atmel | SMART SAM L21
  84. * \endif
  85. * \if DEVICE_SAMC21_SYSTEM_SUPPORT
  86. * - Atmel | SMART SAM C20/C21
  87. * \endif
  88. * \if DEVICE_SAMD21_SYSTEM_SUPPORT
  89. * - Atmel | SMART SAM D20/D21
  90. * - Atmel | SMART SAM R21
  91. * - Atmel | SMART SAM D09/D10/D11
  92. * - Atmel | SMART SAM DA1
  93. * \endif
  94. *
  95. * The outline of this documentation is as follows:
  96. * - \ref asfdoc_sam0_system_prerequisites
  97. * - \ref asfdoc_sam0_system_module_overview
  98. * - \ref asfdoc_sam0_system_special_considerations
  99. * - \ref asfdoc_sam0_system_extra_info
  100. * - \ref asfdoc_sam0_system_examples
  101. * - \ref asfdoc_sam0_system_api_overview
  102. *
  103. *
  104. * \section asfdoc_sam0_system_prerequisites Prerequisites
  105. *
  106. * There are no prerequisites for this module.
  107. *
  108. *
  109. * \section asfdoc_sam0_system_module_overview Module Overview
  110. *
  111. * The System driver provides a collection of interfaces between the user
  112. * application logic, and the core device functionality (such as clocks, reset
  113. * cause determination, etc.) that is required for all applications. It contains
  114. * a number of sub-modules that control one specific aspect of the device:
  115. *
  116. * - System Core (this module)
  117. * - \ref asfdoc_sam0_system_clock_group "System Clock Control" (sub-module)
  118. * - \ref asfdoc_sam0_system_interrupt_group "System Interrupt Control" (sub-module)
  119. * - \ref asfdoc_sam0_system_pinmux_group "System Pin Multiplexer Control" (sub-module)
  120. *
  121. *
  122. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  123. * \subsection asfdoc_sam0_system_module_overview_vreg_l21 Voltage Regulator
  124. * The SAM device controls the voltage regulators for the core (VDDCORE) and
  125. * backup (VDDBU) domains. It sets the voltage regulators according to the sleep
  126. * modes, the performance level, or the user configuration.
  127. *
  128. * In active mode, the voltage regulator can be chosen on the fly between a LDO
  129. * or a Buck converter. In standby mode, the low power voltage regulator is used
  130. * to supply VDDCORE.
  131. *
  132. * \subsection asfdoc_sam0_system_module_overview_bbps Battery Backup Power Switch
  133. * The SAM device supports connection of a battery backup to the VBAT power pin.
  134. * It includes functionality that enables automatic power switching between main
  135. * power and battery backup power. This will ensure power to the backup domain,
  136. * when the main battery or power source is unavailable.
  137. * \endif
  138. *
  139. * \if DEVICE_SAMC21_SYSTEM_SUPPORT
  140. * \subsection asfdoc_sam0_system_module_overview_vreg_c21 Voltage Regulator
  141. * The SAM device controls the voltage regulators for the core (VDDCORE). It sets
  142. * the voltage regulators according to the sleep modes.
  143. *
  144. * There are a selectable reference voltage and voltage dependent on the temperature
  145. * which can be used by analog modules like the ADC.
  146. * \endif
  147. *
  148. * \subsection asfdoc_sam0_system_module_overview_vref Voltage References
  149. * The various analog modules within the SAM devices (such as AC, ADC, and
  150. * DAC) require a voltage reference to be configured to act as a reference point
  151. * for comparisons and conversions.
  152. *
  153. * The SAM devices contain multiple references, including an internal
  154. * temperature sensor and a fixed band-gap voltage source. When enabled, the
  155. * associated voltage reference can be selected within the desired peripheral
  156. * where applicable.
  157. *
  158. * \subsection asfdoc_sam0_system_module_overview_reset_cause System Reset Cause
  159. * In some applications there may be a need to execute a different program
  160. * flow based on how the device was reset. For example, if the cause of reset
  161. * was the Watchdog timer (WDT), this might indicate an error in the application,
  162. * and a form of error handling or error logging might be needed.
  163. *
  164. * For this reason, an API is provided to retrieve the cause of the last system
  165. * reset, so that appropriate action can be taken.
  166. *
  167. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  168. * There are three groups of reset sources:
  169. * - Power supply reset: Resets caused by an electrical issue. It covers POR and BOD reset.
  170. * - User reset: Resets caused by the application. It covers external reset,
  171. * system reset, and watchdog reset.
  172. * - Backup reset: Resets caused by a backup mode exit condition.
  173. *
  174. * \subsection asfdoc_sam0_system_module_overview_performance_level Performance Level
  175. * Performance level allows the user to adjust the regulator output voltage to reduce
  176. * power consumption. The user can on the fly select the most suitable performance
  177. * level, depending on the application demands.
  178. *
  179. * The SAM device can operate at two different performance levels (PL0 and PL2).
  180. * When operating at PL0, the voltage applied on the full logic area is reduced
  181. * by voltage scaling. This voltage scaling technique allows to reduce the active
  182. * power consumption while decreasing the maximum frequency of the device. When
  183. * operating at PL2, the voltage regulator supplies the highest voltage, allowing
  184. * the device to run at higher clock speeds.
  185. *
  186. * Performance level transition is possible only when the device is in active
  187. * mode. After a reset, the device starts at the lowest performance level
  188. * (lowest power consumption and lowest max. frequency). The application can then
  189. * switch to another performance level at any time without any stop in the code
  190. * execution. As shown in \ref asfdoc_sam0_system_performance_level_transition_figure.
  191. *
  192. * \note When scaling down the performance level, the bus frequency should first be
  193. * scaled down in order to not exceed the maximum frequency allowed for the
  194. * low performance level.
  195. * When scaling up the performance level (e.g. from PL0 to PL2), check the performance
  196. * level status before increasing the bus frequency. It can be increased only
  197. * when the performance level transition is completed.
  198. *
  199. * \anchor asfdoc_sam0_system_performance_level_transition_figure
  200. * \image html performance_level_transition.svg "Performance Level Transition"
  201. *
  202. * \subsection asfdoc_sam0_system_module_overview_power_domain Power Domain Gating
  203. * Power domain gating allows power saving by reducing the voltage in logic
  204. * areas in the device to a low-power supply. The feature is available in
  205. * Standby sleep mode and will reduce the voltage in domains where all peripherals
  206. * are idle. Internal logic will maintain its content, meaning the corresponding
  207. * peripherals will not need to be reconfigured when normal operating voltage
  208. * is returned. Most power domains can be in the following three states:
  209. *
  210. * - Active state: The power domain is powered on.
  211. * - Retention state: The main voltage supply for the power domain is switched off,
  212. * while maintaining a secondary low-power supply for the sequential cells. The
  213. * logic context is restored when waking up.
  214. * - Off state: The power domain is entirely powered off. The logic context is lost.
  215. *
  216. * The SAM L21 device contains three power domains which can be controlled using
  217. * power domain gating, namely PD0, PD1, and PD2. These power domains can be
  218. * configured to the following cases:
  219. * - Default with no sleepwalking peripherals: A power domain is automatically set
  220. * to retention state in standby sleep mode if no activity require it. The application
  221. * can force all power domains to remain in active state during standby sleep mode
  222. * in order to accelerate wakeup time.
  223. * - Default with sleepwalking peripherals: If one or more peripherals are enabled
  224. * to perform sleepwalking tasks in standby sleep mode, the corresponding power
  225. * domain (PDn) remains in active state as well as all inferior power domains (<PDn).
  226. * - Sleepwalking with dynamic power domain gating: During standby sleep mode, a
  227. * power domain (PDn) in active can wake up a superior power domain (>PDn) in order
  228. * to perform a sleepwalking task. The superior power domain is then automatically
  229. * set to active state. At the end of the sleepwalking task, the device can either
  230. * be woken up or the superior power domain can return to retention state.
  231. *
  232. * Power domains can be linked to each other, it allows a power domain (PDn) to be kept
  233. * in active state if the inferior power domain (PDn-1) is in active state too.
  234. *
  235. * \ref asfdoc_sam0_system_power_domain_overview_table illustrates the
  236. * four cases to consider in standby mode.
  237. *
  238. * \anchor asfdoc_sam0_system_power_domain_overview_table
  239. * <table>
  240. * <caption>Sleep Mode versus Power Domain State Overview</caption>
  241. * <tr>
  242. * <th>Sleep mode</th>
  243. * <th>PD0</th>
  244. * <th>PD1</th>
  245. * <th>PD2</th>
  246. * <th>PDTOP</th>
  247. * <th>PDBACKUP</th>
  248. * </tr>
  249. * <tr>
  250. * <td>Idle</td>
  251. * <td>active</td>
  252. * <td>active</td>
  253. * <td>active</td>
  254. * <td>active</td>
  255. * <td>active</td>
  256. * </tr>
  257. * <tr>
  258. * <td>Standby - Case 1</td>
  259. * <td>active</td>
  260. * <td>active</td>
  261. * <td>active</td>
  262. * <td>active</td>
  263. * <td>active</td>
  264. * </tr>
  265. * <tr>
  266. * <td>Standby - Case 2</td>
  267. * <td>active</td>
  268. * <td>active</td>
  269. * <td>retention</td>
  270. * <td>active</td>
  271. * <td>active</td>
  272. * </tr>
  273. * <tr>
  274. * <td>Standby - Case 3</td>
  275. * <td>active</td>
  276. * <td>retention</td>
  277. * <td>retention</td>
  278. * <td>active</td>
  279. * <td>active</td>
  280. * </tr>
  281. * <tr>
  282. * <td>Standby - Case 4</td>
  283. * <td>retention</td>
  284. * <td>retention</td>
  285. * <td>retention</td>
  286. * <td>active</td>
  287. * <td>active</td>
  288. * </tr>
  289. * <tr>
  290. * <td>Backup</td>
  291. * <td>off</td>
  292. * <td>off</td>
  293. * <td>off</td>
  294. * <td>off</td>
  295. * <td>active</td>
  296. * </tr>
  297. * <tr>
  298. * <td>Off</td>
  299. * <td>off</td>
  300. * <td>off</td>
  301. * <td>off</td>
  302. * <td>off</td>
  303. * <td>off</td>
  304. * </tr>
  305. * </table>
  306. *
  307. * \subsection asfdoc_sam0_system_module_overview_ram_state RAMs Low Power Mode
  308. * By default, in standby sleep mode, RAM is in low power mode (back biased)
  309. * if its power domain is in retention state.
  310. * \ref asfdoc_sam0_system_power_ram_state_table lists RAMs low power mode.
  311. *
  312. * \anchor asfdoc_sam0_system_power_ram_state_table
  313. * <table>
  314. * <caption>RAM Back-biasing Mode</caption>
  315. * <tr>
  316. * <th>RAM mode</th>
  317. * <th>Description</th>
  318. * </tr>
  319. * <tr>
  320. * <td>Retention Back-biasing mode</td>
  321. * <td>RAM is back-biased if its power domain is in retention mode</td>
  322. * </tr>
  323. * <tr>
  324. * <td>Standby Back-biasing mode</td>
  325. * <td>RAM is back-biased if the device is in standby mode</td>
  326. * </tr>
  327. * <tr>
  328. * <td>Standby OFF mode</td>
  329. * <td>RAM is OFF if the device is in standby mode</td>
  330. * </tr>
  331. * <tr>
  332. * <td>Always OFF mode</td>
  333. * <td>RAM is OFF if the device is in RET mode</td>
  334. * </tr>
  335. * </table>
  336. *
  337. * \endif
  338. *
  339. * \subsection asfdoc_sam0_system_module_overview_sleep_mode Sleep Modes
  340. * The SAM devices have several sleep modes. The sleep mode controls
  341. * which clock systems on the device will remain enabled or disabled when the
  342. * device enters a low power sleep mode.
  343. * \ref asfdoc_sam0_system_module_sleep_mode_table "The table below" lists the
  344. * clock settings of the different sleep modes.
  345. *
  346. * \anchor asfdoc_sam0_system_module_sleep_mode_table
  347. * <table>
  348. * <caption>SAM Device Sleep Modes</caption>
  349. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  350. * <tr>
  351. * <th>Sleep mode</th>
  352. * <th>System clock</th>
  353. * <th>CPU clock</th>
  354. * <th>AHB/AHB clock</th>
  355. * <th>GCLK clocks</th>
  356. * <th>Oscillators (ONDEMAND = 0)</th>
  357. * <th>Oscillators (ONDEMAND = 1)</th>
  358. * <th>Regulator mode</th>
  359. * <th>RAM mode</th>
  360. * </tr>
  361. * <tr>
  362. * <td>Idle</td>
  363. * <td>Run</td>
  364. * <td>Stop</td>
  365. * <td>Run if requested</td>
  366. * <td>Run</td>
  367. * <td>Run</td>
  368. * <td>Run if requested</td>
  369. * <td>Normal</td>
  370. * <td>Normal</td>
  371. * </tr>
  372. * <tr>
  373. * <td>Standby</td>
  374. * <td>Stop</td>
  375. * <td>Stop</td>
  376. * <td>Run if requested</td>
  377. * <td>Run if requested</td>
  378. * <td>Run if requested or RUNSTDBY = 1</td>
  379. * <td>Run if requested</td>
  380. * <td>Low pwer</td>
  381. * <td>Low pwer</td>
  382. * </tr>
  383. * <tr>
  384. * <td>Backup</td>
  385. * <td>Stop</td>
  386. * <td>Stop</td>
  387. * <td>Stop</td>
  388. * <td>Stop</td>
  389. * <td>Stop</td>
  390. * <td>Stop</td>
  391. * <td>Backup</td>
  392. * <td>Off</td>
  393. * </tr>
  394. * <tr>
  395. * <td>Off</td>
  396. * <td>Off</td>
  397. * <td>Off</td>
  398. * <td>Off</td>
  399. * <td>Off</td>
  400. * <td>Off</td>
  401. * <td>Off</td>
  402. * <td>Off</td>
  403. * <td>Off</td>
  404. * </tr>
  405. * \else
  406. * <tr>
  407. * <th>Sleep mode</th>
  408. * <th>CPU clock</th>
  409. * <th>AHB clock</th>
  410. * <th>APB clocks</th>
  411. * <th>Clock sources</th>
  412. * <th>System clock</th>
  413. * <th>32KHz</th>
  414. * <th>Reg mode</th>
  415. * <th>RAM mode</th>
  416. * </tr>
  417. * <tr>
  418. * <td>Idle 0</td>
  419. * <td>Stop</td>
  420. * <td>Run</td>
  421. * <td>Run</td>
  422. * <td>Run</td>
  423. * <td>Run</td>
  424. * <td>Run</td>
  425. * <td>Normal</td>
  426. * <td>Normal</td>
  427. * </tr>
  428. * <tr>
  429. * <td>Idle 1</td>
  430. * <td>Stop</td>
  431. * <td>Stop</td>
  432. * <td>Run</td>
  433. * <td>Run</td>
  434. * <td>Run</td>
  435. * <td>Run</td>
  436. * <td>Normal</td>
  437. * <td>Normal</td>
  438. * </tr>
  439. * <tr>
  440. * <td>Idle 2</td>
  441. * <td>Stop</td>
  442. * <td>Stop</td>
  443. * <td>Stop</td>
  444. * <td>Run</td>
  445. * <td>Run</td>
  446. * <td>Run</td>
  447. * <td>Normal</td>
  448. * <td>Normal</td>
  449. * </tr>
  450. * <tr>
  451. * <td>Standby</td>
  452. * <td>Stop</td>
  453. * <td>Stop</td>
  454. * <td>Stop</td>
  455. * <td>Stop</td>
  456. * <td>Stop</td>
  457. * <td>Stop</td>
  458. * <td>Low Power</td>
  459. * <td>Source/Drain biasing</td>
  460. * </tr>
  461. * \endif
  462. * </table>
  463. *
  464. * Before entering device sleep, one of the available sleep modes must be set.
  465. * The device will automatically wake up in response to an interrupt being
  466. * generated or upon any other sleep mode exit condition.
  467. *
  468. * Some peripheral clocks will remain enabled during sleep, depending on their
  469. * configuration. If desired, the modules can remain clocked during sleep to allow
  470. * them continue to operate while other parts of the system are powered down
  471. * to save power.
  472. *
  473. *
  474. * \section asfdoc_sam0_system_special_considerations Special Considerations
  475. *
  476. * Most of the functions in this driver have device specific restrictions and
  477. * caveats; refer to your device datasheet.
  478. *
  479. *
  480. * \section asfdoc_sam0_system_extra_info Extra Information
  481. *
  482. * For extra information, see \ref asfdoc_sam0_system_extra. This includes:
  483. * - \ref asfdoc_sam0_system_extra_acronyms
  484. * - \ref asfdoc_sam0_system_extra_dependencies
  485. * - \ref asfdoc_sam0_system_extra_errata
  486. * - \ref asfdoc_sam0_system_extra_history
  487. *
  488. *
  489. * \section asfdoc_sam0_system_examples Examples
  490. *
  491. * For SYSTEM module related examples, refer to the sub-modules listed in
  492. * the \ref asfdoc_sam0_system_module_overview "Module Overview".
  493. *
  494. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  495. * For a list of examples related to this driver, see
  496. * \ref asfdoc_sam0_drivers_power_exqsg.
  497. * \endif
  498. *
  499. *
  500. * \section asfdoc_sam0_system_api_overview API Overview
  501. * @{
  502. */
  503. /**
  504. * \name System Debugger
  505. * @{
  506. */
  507. /**
  508. * \brief Check if debugger is present.
  509. *
  510. * Check if debugger is connected to the onboard debug system (DAP).
  511. *
  512. * \return A bool identifying if a debugger is present.
  513. *
  514. * \retval true Debugger is connected to the system
  515. * \retval false Debugger is not connected to the system
  516. *
  517. */
  518. static inline bool system_is_debugger_present(void)
  519. {
  520. return DSU->STATUSB.reg & DSU_STATUSB_DBGPRES;
  521. }
  522. /**
  523. * @}
  524. */
  525. /**
  526. * \name System Identification
  527. * @{
  528. */
  529. /**
  530. * \brief Retrieve the device identification signature.
  531. *
  532. * Retrieves the signature of the current device.
  533. *
  534. * \return Device ID signature as a 32-bit integer.
  535. */
  536. static inline uint32_t system_get_device_id(void)
  537. {
  538. return DSU->DID.reg;
  539. }
  540. /**
  541. * @}
  542. */
  543. /**
  544. * \name System Initialization
  545. * @{
  546. */
  547. void system_init(void);
  548. /**
  549. * @}
  550. */
  551. /**
  552. * @}
  553. */
  554. /**
  555. *
  556. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  557. * \page asfdoc_sam0_drivers_power_exqsg Examples for SYSTEM Driver
  558. *
  559. * This is a list of the available Quick Start Guides (QSGs) and example
  560. * applications for \ref asfdoc_sam0_system_group. QSGs are simple examples with step-by-step instructions to
  561. * configure and use this driver in a selection of
  562. * use cases. Note that a QSG can be compiled as a standalone application or be
  563. * added to the user application.
  564. *
  565. * - \subpage asfdoc_sam0_power_basic_use_case
  566. * \endif
  567. *
  568. * \page asfdoc_sam0_system_extra Extra Information for SYSTEM Driver
  569. *
  570. * \section asfdoc_sam0_system_extra_acronyms Acronyms
  571. * Below is a table listing the acronyms used in this module, along with their
  572. * intended meanings.
  573. *
  574. * <table>
  575. * <tr>
  576. * <th>Acronym</th>
  577. * <th>Definition</th>
  578. * </tr>
  579. * <tr>
  580. * <td>PM</td>
  581. * <td>Power Manager</td>
  582. * </tr>
  583. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  584. * <tr>
  585. * <td>SUPC</td>
  586. * <td>Supply Controller</td>
  587. * </tr>
  588. * <tr>
  589. * <td>RSTC</td>
  590. * <td>Reset Controller</td>
  591. * </tr>
  592. * \endif
  593. * \if DEVICE_SAMC21_SYSTEM_SUPPORT
  594. * <tr>
  595. * <td>SUPC</td>
  596. * <td>Supply Controller</td>
  597. * </tr>
  598. * <tr>
  599. * <td>RSTC</td>
  600. * <td>Reset Controller</td>
  601. * </tr>
  602. * \endif
  603. * \if DEVICE_SAMD21_SYSTEM_SUPPORT
  604. * <tr>
  605. * <td>SYSCTRL</td>
  606. * <td>System control interface</td>
  607. * </tr>
  608. * \endif
  609. * </table>
  610. *
  611. *
  612. * \section asfdoc_sam0_system_extra_dependencies Dependencies
  613. * This driver has the following dependencies:
  614. *
  615. * - None
  616. *
  617. *
  618. * \section asfdoc_sam0_system_extra_errata Errata
  619. * There are no errata related to this driver.
  620. *
  621. *
  622. * \section asfdoc_sam0_system_extra_history Module History
  623. * An overview of the module history is presented in the table below, with
  624. * details on the enhancements and fixes made to the module since its first
  625. * release. The current version of this corresponds to the newest version in
  626. * the table.
  627. *
  628. * <table>
  629. * <tr>
  630. * <th>Changelog</th>
  631. * </tr>
  632. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  633. * <tr>
  634. * <td>Initial Release</td>
  635. * </tr>
  636. * \endif
  637. * \if DEVICE_SAMC21_SYSTEM_SUPPORT
  638. * <tr>
  639. * <td>Initial Release</td>
  640. * </tr>
  641. * \endif
  642. * \if DEVICE_SAMD21_SYSTEM_SUPPORT
  643. * <tr>
  644. * <td>Added new \c system_reset() to reset the complete MCU with some exceptions</td>
  645. * </tr>
  646. * <tr>
  647. * <td>Added new \c system_get_device_id() function to retrieved the device
  648. * ID</td>
  649. * </tr>
  650. * <tr>
  651. * <td>Initial Release</td>
  652. * </tr>
  653. * \endif
  654. * </table>
  655. *
  656. * \page asfdoc_sam0_system_document_revision_history Document Revision History
  657. *
  658. * <table>
  659. * <tr>
  660. * <th>Doc. Rev.</th>
  661. * <th>Date</th>
  662. * <th>Comments</th>
  663. * </tr>
  664. * \if DEVICE_SAML21_SYSTEM_SUPPORT
  665. * <tr>
  666. * <td>42449A</td>
  667. * <td>07/2015</td>
  668. * <td>Initial document release</td>
  669. * </tr>
  670. * \endif
  671. * \if DEVICE_SAMC21_SYSTEM_SUPPORT
  672. * <tr>
  673. * <td>42484A</td>
  674. * <td>12/2015</td>
  675. * <td>Initial document release.</td>
  676. * </tr>
  677. * \endif
  678. * \if DEVICE_SAMD21_SYSTEM_SUPPORT
  679. * <tr>
  680. * <td>42120E</td>
  681. * <td>12/2015</td>
  682. * <td>Added support for SAM DA1 and SAM D09</td>
  683. * </tr>
  684. * <tr>
  685. * <td>42120D</td>
  686. * <td>12/2014</td>
  687. * <td>Added support for SAM R21 and SAM D10/D11</td>
  688. * </tr>
  689. * <tr>
  690. * <td>42120C</td>
  691. * <td>01/2014</td>
  692. * <td>Added support for SAM D21</td>
  693. * </tr>
  694. * <tr>
  695. * <td>42120B</td>
  696. * <td>06/2013</td>
  697. * <td>Corrected documentation typos</td>
  698. * </tr>
  699. * <tr>
  700. * <td>42120A</td>
  701. * <td>06/2013</td>
  702. * <td>Initial document release</td>
  703. * </tr>
  704. * \endif
  705. * </table>
  706. */
  707. #ifdef __cplusplus
  708. }
  709. #endif
  710. #endif /* SYSTEM_H_INCLUDED */