Loading...
Searching...
No Matches
periph_cpu.h File Reference

CPU specific definitions for internal peripheral handling. More...

Detailed Description

CPU specific definitions for internal peripheral handling.

CPU specific definitions for internal peripheral handling

Author
Dylan Laduranty dylan.nosp@m..lad.nosp@m.urant.nosp@m.y@me.nosp@m.sotic.nosp@m..com

Definition in file periph_cpu.h.

#include "periph_cpu_common.h"
+ Include dependency graph for periph_cpu.h:

Go to the source code of this file.

Data Structures

struct  sam0_aux_cfg_mapping
 NVM User Row Mapping - Dedicated Entries Config values will be applied at power-on. More...
 

Macros

#define DAC_RES_BITS   (10)
 The MCU has a 10 bit DAC.
 
#define DAC_NUMOF   (1)
 The MCU has one DAC Output.
 

Variables

static const gpio_t sam0_adc_pins [1][10]
 Pins that can be used for ADC input.
 
static const gpio_t rtc_tamper_pins [RTC_NUM_OF_TAMPERS]
 RTC input pins that can be used for tamper detection and wake from Deep Sleep.
 

Power mode configuration

#define PM_NUM_MODES   (2)
 
#define ADC_INPUTCTRL_MUXPOS_PA02   ADC_INPUTCTRL_MUXPOS_AIN0
 ADC pin aliases.
 
#define ADC_INPUTCTRL_MUXPOS_PA03   ADC_INPUTCTRL_MUXPOS_AIN1
 Alias for AIN1.
 
#define ADC_INPUTCTRL_MUXPOS_PA04   ADC_INPUTCTRL_MUXPOS_AIN2
 Alias for AIN2.
 
#define ADC_INPUTCTRL_MUXPOS_PA05   ADC_INPUTCTRL_MUXPOS_AIN3
 Alias for AIN3.
 
#define ADC_INPUTCTRL_MUXPOS_PA06   ADC_INPUTCTRL_MUXPOS_AIN4
 Alias for AIN4.
 
#define ADC_INPUTCTRL_MUXPOS_PA07   ADC_INPUTCTRL_MUXPOS_AIN5
 Alias for AIN5.
 
#define ADC_INPUTCTRL_MUXPOS_PA08   ADC_INPUTCTRL_MUXPOS_AIN6
 Alias for AIN6.
 
#define ADC_INPUTCTRL_MUXPOS_PA09   ADC_INPUTCTRL_MUXPOS_AIN7
 Alias for AIN7.
 
#define ADC_INPUTCTRL_MUXPOS_PA10   ADC_INPUTCTRL_MUXPOS_AIN8
 Alias for AIN8.
 
#define ADC_INPUTCTRL_MUXPOS_PA11   ADC_INPUTCTRL_MUXPOS_AIN9
 Alias for AIN9.
 
#define ADC_INPUTCTRL_MUXNEG_PA02   ADC_INPUTCTRL_MUXPOS_AIN0
 Alias for AIN0.
 
#define ADC_INPUTCTRL_MUXNEG_PA03   ADC_INPUTCTRL_MUXPOS_AIN1
 Alias for AIN1.
 
#define ADC_INPUTCTRL_MUXNEG_PA04   ADC_INPUTCTRL_MUXPOS_AIN2
 Alias for AIN2.
 
#define ADC_INPUTCTRL_MUXNEG_PA05   ADC_INPUTCTRL_MUXPOS_AIN3
 Alias for AIN3.
 
#define ADC_INPUTCTRL_MUXNEG_PA06   ADC_INPUTCTRL_MUXPOS_AIN4
 Alias for AIN4.
 
#define ADC_INPUTCTRL_MUXNEG_PA07   ADC_INPUTCTRL_MUXPOS_AIN5
 Alias for AIN5.
 
#define ADC_INPUTCTRL_MUXNEG_PA08   ADC_INPUTCTRL_MUXPOS_AIN6
 Alias for AIN6.
 
#define ADC_INPUTCTRL_MUXNEG_PA09   ADC_INPUTCTRL_MUXPOS_AIN7
 Alias for AIN7.
 

Real time counter configuration

#define RTT_MAX_VALUE   (0xffffffff)
 
#define RTT_CLOCK_FREQUENCY   (32768U) /* in Hz */
 
#define RTT_MIN_FREQUENCY   (RTT_CLOCK_FREQUENCY / 1024U) /* in Hz */
 
#define RTT_MAX_FREQUENCY   (RTT_CLOCK_FREQUENCY) /* in Hz */
 

SAML1x GCLK definitions

enum  { SAM0_GCLK_MAIN = 0 , SAM0_GCLK_32KHZ }
 

Macro Definition Documentation

◆ ADC_INPUTCTRL_MUXNEG_PA02

#define ADC_INPUTCTRL_MUXNEG_PA02   ADC_INPUTCTRL_MUXPOS_AIN0

Alias for AIN0.

Definition at line 72 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXNEG_PA03

#define ADC_INPUTCTRL_MUXNEG_PA03   ADC_INPUTCTRL_MUXPOS_AIN1

Alias for AIN1.

Definition at line 73 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXNEG_PA04

#define ADC_INPUTCTRL_MUXNEG_PA04   ADC_INPUTCTRL_MUXPOS_AIN2

Alias for AIN2.

Definition at line 74 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXNEG_PA05

#define ADC_INPUTCTRL_MUXNEG_PA05   ADC_INPUTCTRL_MUXPOS_AIN3

Alias for AIN3.

Definition at line 75 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXNEG_PA06

#define ADC_INPUTCTRL_MUXNEG_PA06   ADC_INPUTCTRL_MUXPOS_AIN4

Alias for AIN4.

Definition at line 76 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXNEG_PA07

#define ADC_INPUTCTRL_MUXNEG_PA07   ADC_INPUTCTRL_MUXPOS_AIN5

Alias for AIN5.

Definition at line 77 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXNEG_PA08

#define ADC_INPUTCTRL_MUXNEG_PA08   ADC_INPUTCTRL_MUXPOS_AIN6

Alias for AIN6.

Definition at line 78 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXNEG_PA09

#define ADC_INPUTCTRL_MUXNEG_PA09   ADC_INPUTCTRL_MUXPOS_AIN7

Alias for AIN7.

Definition at line 79 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA02

#define ADC_INPUTCTRL_MUXPOS_PA02   ADC_INPUTCTRL_MUXPOS_AIN0

ADC pin aliases.

Alias for AIN0

Definition at line 61 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA03

#define ADC_INPUTCTRL_MUXPOS_PA03   ADC_INPUTCTRL_MUXPOS_AIN1

Alias for AIN1.

Definition at line 62 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA04

#define ADC_INPUTCTRL_MUXPOS_PA04   ADC_INPUTCTRL_MUXPOS_AIN2

Alias for AIN2.

Definition at line 63 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA05

#define ADC_INPUTCTRL_MUXPOS_PA05   ADC_INPUTCTRL_MUXPOS_AIN3

Alias for AIN3.

Definition at line 64 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA06

#define ADC_INPUTCTRL_MUXPOS_PA06   ADC_INPUTCTRL_MUXPOS_AIN4

Alias for AIN4.

Definition at line 65 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA07

#define ADC_INPUTCTRL_MUXPOS_PA07   ADC_INPUTCTRL_MUXPOS_AIN5

Alias for AIN5.

Definition at line 66 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA08

#define ADC_INPUTCTRL_MUXPOS_PA08   ADC_INPUTCTRL_MUXPOS_AIN6

Alias for AIN6.

Definition at line 67 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA09

#define ADC_INPUTCTRL_MUXPOS_PA09   ADC_INPUTCTRL_MUXPOS_AIN7

Alias for AIN7.

Definition at line 68 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA10

#define ADC_INPUTCTRL_MUXPOS_PA10   ADC_INPUTCTRL_MUXPOS_AIN8

Alias for AIN8.

Definition at line 69 of file periph_cpu.h.

◆ ADC_INPUTCTRL_MUXPOS_PA11

#define ADC_INPUTCTRL_MUXPOS_PA11   ADC_INPUTCTRL_MUXPOS_AIN9

Alias for AIN9.

Definition at line 70 of file periph_cpu.h.

◆ DAC_NUMOF

#define DAC_NUMOF   (1)

The MCU has one DAC Output.

Definition at line 90 of file periph_cpu.h.

◆ DAC_RES_BITS

#define DAC_RES_BITS   (10)

The MCU has a 10 bit DAC.

Definition at line 85 of file periph_cpu.h.

◆ PM_NUM_MODES

#define PM_NUM_MODES   (2)

Definition at line 33 of file periph_cpu.h.

◆ RTT_CLOCK_FREQUENCY

#define RTT_CLOCK_FREQUENCY   (32768U) /* in Hz */

Definition at line 97 of file periph_cpu.h.

◆ RTT_MAX_FREQUENCY

#define RTT_MAX_FREQUENCY   (RTT_CLOCK_FREQUENCY) /* in Hz */

Definition at line 99 of file periph_cpu.h.

◆ RTT_MAX_VALUE

#define RTT_MAX_VALUE   (0xffffffff)

Definition at line 96 of file periph_cpu.h.

◆ RTT_MIN_FREQUENCY

#define RTT_MIN_FREQUENCY   (RTT_CLOCK_FREQUENCY / 1024U) /* in Hz */

Definition at line 98 of file periph_cpu.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SAM0_GCLK_MAIN 

16 MHz main clock

SAM0_GCLK_32KHZ 

32 kHz clock

Definition at line 40 of file periph_cpu.h.

Variable Documentation

◆ rtc_tamper_pins

const gpio_t rtc_tamper_pins[RTC_NUM_OF_TAMPERS]
static
Initial value:
= {
GPIO_PIN(PA, 8), GPIO_PIN(PA, 9), GPIO_PIN(PA, 16),
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ PA
port A

RTC input pins that can be used for tamper detection and wake from Deep Sleep.

Definition at line 106 of file periph_cpu.h.

◆ sam0_adc_pins

const gpio_t sam0_adc_pins[1][10]
static
Initial value:
= {
{
GPIO_PIN(PA, 2), GPIO_PIN(PA, 3), GPIO_PIN(PA, 4), GPIO_PIN(PA, 5),
GPIO_PIN(PA, 6), GPIO_PIN(PA, 7), GPIO_PIN(PA, 8), GPIO_PIN(PA, 9),
GPIO_PIN(PA, 10), GPIO_PIN(PA, 11)
}
}

Pins that can be used for ADC input.

Definition at line 49 of file periph_cpu.h.