periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 INRIA
3  * 2015 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
10 #pragma once
11 
22 #include "periph_cpu.h"
23 #include "macros/units.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #define CLOCK_CORECLOCK msp430_dco_freq
31 
37  .lfxt1_frequency = 32768,
38  .main_clock_source = MAIN_CLOCK_SOURCE_DCOCLK,
39  .submain_clock_source = SUBMAIN_CLOCK_SOURCE_DCOCLK,
40  .main_clock_divier = MAIN_CLOCK_DIVIDE_BY_1,
41  .submain_clock_divier = SUBMAIN_CLOCK_DIVIDE_BY_1,
42  .auxiliary_clock_divier = AUXILIARY_CLOCK_DIVIDE_BY_1,
43 };
44 
49 static const uart_conf_t uart_config[] = {
50  {
52  },
53 };
54 
55 #define UART0_RX_ISR USCIAB1RX_VECTOR
57 #define UART_NUMOF ARRAY_SIZE(uart_config)
64 static const spi_conf_t spi_config[] = {
65  {
66  .spi = &usci_b0_as_spi,
67  },
68  {
69  .spi = &usci_b1_as_spi,
70  },
71 };
72 
73 #define SPI_NUMOF ARRAY_SIZE(spi_config)
76 #ifdef __cplusplus
77 }
78 #endif
79 
static const uart_conf_t uart_config[]
UART configuration.
Definition: periph_conf.h:38
static const spi_conf_t spi_config[]
SPI configuration.
Definition: periph_conf.h:96
static const msp430_clock_params_t clock_params
Clock configuration.
Definition: periph_conf.h:35
Common timer configuration for TIMER_A clocked by SMCLK and TIMER_B clocked by ACLK.
const msp430_usci_spi_params_t usci_b1_as_spi
MSP430 F2xx/G2xx USCI B1 in SPI configuration.
const msp430_usci_spi_params_t usci_b0_as_spi
MSP430 F2xx/G2xx USCI B0 in SPI configuration.
const msp430_usci_uart_params_t usci_a1_as_uart
MSP430 F2xx/G2xx USCI A1 in UART configuration.
@ MAIN_CLOCK_SOURCE_DCOCLK
Internal digitally controlled oscillator (DCO) with RC-type characteristics.
@ SUBMAIN_CLOCK_SOURCE_DCOCLK
Internal digitally controlled oscillator (DCO) with RC-type characteristics.
@ SUBMAIN_CLOCK_DIVIDE_BY_1
Divide the main clock by 1.
@ AUXILIARY_CLOCK_DIVIDE_BY_1
Divide the main clock by 1.
@ MAIN_CLOCK_DIVIDE_BY_1
Divide the main clock by 1.
MSP430Fxzy Basic Clock System Parameters.
uint32_t target_dco_frequency
The target frequency to run the DCO at in Hz.
SPI device configuration.
Definition: periph_cpu.h:336
const msp430_usci_spi_params_t * spi
The SPI configuration to use.
Definition: periph_cpu.h:182
UART device configuration.
Definition: periph_cpu.h:217
const msp430_usci_uart_params_t * uart
The UART configuration to use.
Definition: periph_cpu.h:158
Unit helper macros.
#define MHZ(x)
A macro to return the Hz in x MHz.
Definition: units.h:48