Mateusz Kowalik / Application_danix

Fork of Application by Daniel Sygut

Committer:
Zaitsev
Date:
Tue Jan 10 20:42:26 2017 +0000
Revision:
10:41552d038a69
USB Serial bi-directional bridge

Who changed what in which revision?

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