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

Peripheral MCU configuration for SAM4S Xplained pro. More...

Detailed Description

Peripheral MCU configuration for SAM4S Xplained pro.

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

Definition in file periph_conf.h.

#include "periph_cpu.h"
+ Include dependency graph for periph_conf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CLOCK_SCLK_XTAL   (1)
 Enable external oscillator for driving the slow clock.
 

Clock configuration

#define CLOCK_CORECLOCK   MHZ(120)
 
#define CLOCK_EXT_OSC   MHZ(12)
 
#define CLOCK_PLL_MUL   (9)
 
#define CLOCK_PLL_DIV   (1)
 
#define CLOCK_FWS   (5) /* 5 is safe for 120 MHz */
 

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 []
 

UART configuration

#define UART_0_ISR   isr_uart1
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

Macro Definition Documentation

◆ CLOCK_CORECLOCK

#define CLOCK_CORECLOCK   MHZ(120)

Definition at line 33 of file periph_conf.h.

◆ CLOCK_EXT_OSC

#define CLOCK_EXT_OSC   MHZ(12)

Definition at line 35 of file periph_conf.h.

◆ CLOCK_FWS

#define CLOCK_FWS   (5) /* 5 is safe for 120 MHz */

Definition at line 45 of file periph_conf.h.

◆ CLOCK_PLL_DIV

#define CLOCK_PLL_DIV   (1)

Definition at line 42 of file periph_conf.h.

◆ CLOCK_PLL_MUL

#define CLOCK_PLL_MUL   (9)

Definition at line 41 of file periph_conf.h.

◆ CLOCK_SCLK_XTAL

#define CLOCK_SCLK_XTAL   (1)

Enable external oscillator for driving the slow clock.

Definition at line 51 of file periph_conf.h.

◆ TIMER_0_ISR

#define TIMER_0_ISR   isr_tc0

Definition at line 62 of file periph_conf.h.

◆ TIMER_1_ISR

#define TIMER_1_ISR   isr_tc3

Definition at line 63 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   ARRAY_SIZE(timer_config)

Definition at line 65 of file periph_conf.h.

◆ UART_0_ISR

#define UART_0_ISR   isr_uart1

Definition at line 84 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 86 of file periph_conf.h.

Variable Documentation

◆ 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 57 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = (Uart *)UART1,
.rx_pin = GPIO_PIN(PB, 2),
.tx_pin = GPIO_PIN(PB, 3),
.mux = GPIO_MUX_A,
.pmc_id = ID_UART1,
.irqn = UART1_IRQn
}
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ UART1_IRQn
UART1
Definition cc2538.h:54
#define UART1
UART1 register bank.
@ PB
port B
@ GPIO_MUX_A
select peripheral function A

Definition at line 72 of file periph_conf.h.