Loading...
Searching...
No Matches
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
18
19#include "periph_cpu.h"
20#include "macros/units.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#define CLOCK_CORECLOCK msp430_dco_freq
28
33 .target_dco_frequency = MHZ(16),
34 .lfxt1_frequency = 32768,
35 .main_clock_source = MAIN_CLOCK_SOURCE_DCOCLK,
36 .submain_clock_source = SUBMAIN_CLOCK_SOURCE_DCOCLK,
37 .main_clock_divier = MAIN_CLOCK_DIVIDE_BY_1,
38 .submain_clock_divier = SUBMAIN_CLOCK_DIVIDE_BY_1,
39 .auxiliary_clock_divier = AUXILIARY_CLOCK_DIVIDE_BY_1,
40};
41
46static const uart_conf_t uart_config[] = {
47 {
48 .uart = &usci_a1_as_uart,
49 },
50};
51
52#define UART0_RX_ISR USCIAB1RX_VECTOR
53
54#define UART_NUMOF ARRAY_SIZE(uart_config)
56
61static const spi_conf_t spi_config[] = {
62 {
63 .spi = &usci_b0_as_spi,
64 },
65 {
66 .spi = &usci_b1_as_spi,
67 },
68};
69
70#define SPI_NUMOF ARRAY_SIZE(spi_config)
72
73#ifdef __cplusplus
74}
75#endif
76
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.
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.
SPI device configuration.
Definition periph_cpu.h:333
UART device configuration.
Definition periph_cpu.h:214
Unit helper macros.
#define MHZ(x)
A macro to return the Hz in x MHz.
Definition units.h:48