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

Peripheral MCU configuration for Arduino Due based boards. More...

Detailed Description

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

Go to the source code of this file.

Clock configuration

#define CLOCK_CORECLOCK   (84000000UL)
 
#define CLOCK_EXT_OSC   (12000000UL)
 
#define CLOCK_PLL_MUL   (83)
 
#define CLOCK_PLL_DIV   (12)
 
#define CLOCK_FWS   (4) /* 4 is save for 84MHz */
 

Enable external oscillator for driving the slow clock

Warning
Many (older?) arduino-due boards do not have the external 32khz oscillator soldered on, so only enable this after you make sure its equipped on your specific board
#define CLOCK_SCLK_XTAL   (0)
 

Timer peripheral configuration

#define TIMER_0_ISR   isr_tc0
 
#define TIMER_1_ISR   isr_tc3
 
#define TIMER_NUMOF   ARRAY_SIZE(timer_config)
 
static const timer_conf_t timer_config []
 

RTT configuration

#define RTT_FREQUENCY   (1U) /* 1Hz */
 

UART configuration

#define UART_0_ISR   isr_uart
 
#define UART_1_ISR   isr_usart0
 
#define UART_2_ISR   isr_usart1
 
#define UART_3_ISR   isr_usart3
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

SPI configuration

#define SPI_NUMOF   ARRAY_SIZE(spi_config)
 
static const spi_conf_t spi_config []
 

PWM configuration

#define PWM_NUMOF   (1U)
 
#define PWM_CHAN_NUMOF   ARRAY_SIZE(pwm_chan)
 
static const pwm_chan_conf_t pwm_chan []
 

Macro Definition Documentation

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   (84000000UL)

Definition at line 35 of file periph_conf.h.

◆ CLOCK_EXT_OSC

#define CLOCK_EXT_OSC   (12000000UL)

Definition at line 37 of file periph_conf.h.

◆ CLOCK_FWS

#define CLOCK_FWS   (4) /* 4 is save for 84MHz */

Definition at line 47 of file periph_conf.h.

◆ CLOCK_PLL_DIV

#define CLOCK_PLL_DIV   (12)

Definition at line 44 of file periph_conf.h.

◆ CLOCK_PLL_MUL

#define CLOCK_PLL_MUL   (83)

Definition at line 43 of file periph_conf.h.

◆ CLOCK_SCLK_XTAL

#define CLOCK_SCLK_XTAL   (0)

Definition at line 57 of file periph_conf.h.

◆ PWM_CHAN_NUMOF

#define PWM_CHAN_NUMOF   ARRAY_SIZE(pwm_chan)

Definition at line 162 of file periph_conf.h.

◆ PWM_NUMOF

#define PWM_NUMOF   (1U)

Definition at line 161 of file periph_conf.h.

◆ RTT_FREQUENCY

#define RTT_FREQUENCY   (1U) /* 1Hz */

Definition at line 80 of file periph_conf.h.

◆ SPI_NUMOF

#define SPI_NUMOF   ARRAY_SIZE(spi_config)

Definition at line 147 of file periph_conf.h.

◆ TIMER_0_ISR

#define TIMER_0_ISR   isr_tc0

Definition at line 69 of file periph_conf.h.

◆ TIMER_1_ISR

#define TIMER_1_ISR   isr_tc3

Definition at line 70 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   ARRAY_SIZE(timer_config)

Definition at line 72 of file periph_conf.h.

◆ UART_0_ISR

#define UART_0_ISR   isr_uart

Definition at line 124 of file periph_conf.h.

◆ UART_1_ISR

#define UART_1_ISR   isr_usart0

Definition at line 125 of file periph_conf.h.

◆ UART_2_ISR

#define UART_2_ISR   isr_usart1

Definition at line 126 of file periph_conf.h.

◆ UART_3_ISR

#define UART_3_ISR   isr_usart3

Definition at line 127 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 129 of file periph_conf.h.

Variable Documentation

◆ pwm_chan

const pwm_chan_conf_t pwm_chan[]
static
Initial value:
= {
{ .pin = GPIO_PIN(PC, 21), .hwchan = 4 },
{ .pin = GPIO_PIN(PC, 22), .hwchan = 5 },
{ .pin = GPIO_PIN(PC, 23), .hwchan = 6 },
{ .pin = GPIO_PIN(PC, 24), .hwchan = 7 }
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ PC
port C

Definition at line 154 of file periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
{
.dev = SPI0,
.id = ID_SPI0,
.clk = GPIO_PIN(PA, 27),
.mosi = GPIO_PIN(PA, 26),
.miso = GPIO_PIN(PA, 25),
.mux = GPIO_MUX_A
}
}
@ PA
port A
@ GPIO_MUX_A
select peripheral function A

Definition at line 136 of file periph_conf.h.

◆ timer_config

const timer_conf_t timer_config[]
static
Initial value:
= {
{ .dev = TC0, .id_ch0 = ID_TC0 },
{ .dev = TC1, .id_ch0 = ID_TC3 }
}

Definition at line 64 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static

Definition at line 88 of file periph_conf.h.