periph_conf.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2014 INRIA
3  * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
20 #include "periph_cpu.h"
21 #include "macros/units.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #define CLOCK_CORECLOCK msp430_dco_freq
29 
35  .lfxt1_frequency = 32768,
36  .main_clock_source = MAIN_CLOCK_SOURCE_DCOCLK,
37  .submain_clock_source = SUBMAIN_CLOCK_SOURCE_DCOCLK,
38  .main_clock_divier = MAIN_CLOCK_DIVIDE_BY_1,
39  .submain_clock_divier = SUBMAIN_CLOCK_DIVIDE_BY_1,
40  .auxiliary_clock_divier = AUXILIARY_CLOCK_DIVIDE_BY_1,
41  .has_r_osc = true,
42 };
43 
48 static const uart_conf_t uart_config[] = {
49  {
50  .uart = &usart1_as_uart,
51  },
52 };
53 
54 #define UART0_RX_ISR (USART1RX_VECTOR)
55 #define UART0_TX_ISR (USART1TX_VECTOR)
57 #define UART_NUMOF ARRAY_SIZE(uart_config)
64 static const spi_conf_t spi_config[] = {
65  {
66  /* beware of resource conflict with UART */
67  .spi = &usart1_as_spi,
68  },
69 };
70 
71 #define SPI_NUMOF ARRAY_SIZE(spi_config)
74 #ifdef __cplusplus
75 }
76 #endif
77 
static const uart_conf_t uart_config[]
UART configuration.
Definition: periph_conf.h:35
static const spi_conf_t spi_config[]
SPI configuration.
Definition: periph_conf.h:93
static const msp430_clock_params_t clock_params
Clock configuration.
Definition: periph_conf.h:33
Common timer configuration for TIMER_A clocked by SMCLK and TIMER_B clocked by ACLK.
@ 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.
const msp430_usart_spi_params_t usart1_as_spi
MSP430 x1xx USART1 in SPI configuration.
const msp430_usart_uart_params_t usart1_as_uart
MSP430 x1xx USART1 in UART configuration.
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:333
const msp430_usci_spi_params_t * spi
The SPI configuration to use.
Definition: periph_cpu.h:182
UART device configuration.
Definition: periph_cpu.h:214
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