25#include "periph_cpu_common.h"
35#define PM_NUM_MODES (4)
42#ifndef PM_BLOCKER_INITIAL
43#define PM_BLOCKER_INITIAL { 1, 0, 0, 0 }
50#define SAMD21_PM_STANDBY (0U)
51#define SAMD21_PM_IDLE_2 (1U)
52#define SAMD21_PM_IDLE_1 (2U)
53#define SAMD21_PM_IDLE_0 (3U)
60#define SAM0_SPI_PM_BLOCK SAMD21_PM_IDLE_1
67#define SAM0_USB_ACTIVE_PM_BLOCK SAMD21_PM_IDLE_1
88#define SPI_HWCS(x) (UINT_MAX - 1)
99 return ((((uint32_t)sercom) >> 10) & 0x7) - 2;
119#define ADC_INPUTCTRL_MUXPOS_PA02 ADC_INPUTCTRL_MUXPOS_PIN0
120#define ADC_INPUTCTRL_MUXPOS_PA03 ADC_INPUTCTRL_MUXPOS_PIN1
121#define ADC_INPUTCTRL_MUXPOS_PB08 ADC_INPUTCTRL_MUXPOS_PIN2
122#define ADC_INPUTCTRL_MUXPOS_PB09 ADC_INPUTCTRL_MUXPOS_PIN3
123#define ADC_INPUTCTRL_MUXPOS_PA04 ADC_INPUTCTRL_MUXPOS_PIN4
124#define ADC_INPUTCTRL_MUXPOS_PA05 ADC_INPUTCTRL_MUXPOS_PIN5
125#define ADC_INPUTCTRL_MUXPOS_PA06 ADC_INPUTCTRL_MUXPOS_PIN6
126#define ADC_INPUTCTRL_MUXPOS_PA07 ADC_INPUTCTRL_MUXPOS_PIN7
127#define ADC_INPUTCTRL_MUXPOS_PB00 ADC_INPUTCTRL_MUXPOS_PIN8
128#define ADC_INPUTCTRL_MUXPOS_PB01 ADC_INPUTCTRL_MUXPOS_PIN9
129#define ADC_INPUTCTRL_MUXPOS_PB02 ADC_INPUTCTRL_MUXPOS_PIN10
130#define ADC_INPUTCTRL_MUXPOS_PB03 ADC_INPUTCTRL_MUXPOS_PIN11
131#define ADC_INPUTCTRL_MUXPOS_PB04 ADC_INPUTCTRL_MUXPOS_PIN12
132#define ADC_INPUTCTRL_MUXPOS_PB05 ADC_INPUTCTRL_MUXPOS_PIN13
133#define ADC_INPUTCTRL_MUXPOS_PB06 ADC_INPUTCTRL_MUXPOS_PIN14
134#define ADC_INPUTCTRL_MUXPOS_PB07 ADC_INPUTCTRL_MUXPOS_PIN15
135#define ADC_INPUTCTRL_MUXPOS_PA08 ADC_INPUTCTRL_MUXPOS_PIN16
136#define ADC_INPUTCTRL_MUXPOS_PA09 ADC_INPUTCTRL_MUXPOS_PIN17
137#define ADC_INPUTCTRL_MUXPOS_PA10 ADC_INPUTCTRL_MUXPOS_PIN18
138#define ADC_INPUTCTRL_MUXPOS_PA11 ADC_INPUTCTRL_MUXPOS_PIN19
140#define ADC_INPUTCTRL_MUXNEG_PA02 ADC_INPUTCTRL_MUXPOS_PIN0
141#define ADC_INPUTCTRL_MUXNEG_PA03 ADC_INPUTCTRL_MUXPOS_PIN1
142#define ADC_INPUTCTRL_MUXNEG_PB08 ADC_INPUTCTRL_MUXPOS_PIN2
143#define ADC_INPUTCTRL_MUXNEG_PB09 ADC_INPUTCTRL_MUXPOS_PIN3
144#define ADC_INPUTCTRL_MUXNEG_PA04 ADC_INPUTCTRL_MUXPOS_PIN4
145#define ADC_INPUTCTRL_MUXNEG_PA05 ADC_INPUTCTRL_MUXPOS_PIN5
146#define ADC_INPUTCTRL_MUXNEG_PA06 ADC_INPUTCTRL_MUXPOS_PIN6
147#define ADC_INPUTCTRL_MUXNEG_PA07 ADC_INPUTCTRL_MUXPOS_PIN7
153#define DAC_RES_BITS (10)
164#define RTT_RUNSTDBY (1)
166#define RTT_MAX_VALUE (0xffffffff)
167#define RTT_CLOCK_FREQUENCY (32768U)
168#define RTT_MIN_FREQUENCY (RTT_CLOCK_FREQUENCY / 1024U)
169#define RTT_MAX_FREQUENCY (RTT_CLOCK_FREQUENCY)
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
@ SAM0_GCLK_MAIN
48 MHz main clock
@ SAM0_GCLK_DISABLED
disabled GCLK
@ SAM0_GCLK_1KHZ
1 kHz clock
@ SAM0_GCLK_32KHZ
32 kHz clock
@ SAM0_GCLK_1MHZ
1 MHz clock for xTimer
static const gpio_t sam0_adc_pins[1][20]
Pins that can be used for ADC input.
static int _sercom_id(SercomUsart *sercom)
Return the numeric id of a SERCOM device derived from its address.
NVM User Row Mapping - Dedicated Entries Config values will be applied at power-on.
uint64_t bod33_level
BOD33 threshold level at power-on.
uint64_t wdt_window
WDT Window at power-on.
uint64_t wdt_window_enable
WDT Window mode enabled on power-on
uint64_t nvm_locks
NVM Region Lock Bits.
uint64_t bod33_hysteresis
BOD33 Hysteresis configuration
uint64_t bod33_action
BOD33 Action at power-on.
uint64_t bod33_enable
BOD33 Enable at power-on.
uint64_t wdt_period
WDT Period at power-on.
uint64_t reserved_2
Factory settings - do not change.
uint64_t bootloader_size
BOOTPROT: Bootloader Size
uint64_t wdt_ewoffset
WDT Early Warning Interrupt Offset
uint64_t eeprom_size
one of eight different EEPROM sizes
uint64_t reserved_0
Factory settings - do not change.
uint64_t reserved_1
Factory settings - do not change.
uint64_t wdt_always_on
WDT Always-On at power-on.
const uint64_t bod12_calibration
Factory settings - do not change.
uint64_t reserved_3
Factory settings - do not change.
uint64_t wdt_enable
WDT Enable at power-on.