2023-06-03 21:47:24 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 INRIA
|
|
|
|
* 2015 Freie Universität Berlin
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
|
|
* Public License v2.1. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup boards_olimex_msp430_h2618
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Olimex-MSP430-H2618 peripheral configuration
|
|
|
|
*
|
|
|
|
* @author Marian Buschsieweke <marian.buschsieweke@posteo.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PERIPH_CONF_H
|
|
|
|
#define PERIPH_CONF_H
|
|
|
|
|
|
|
|
#include "periph_cpu.h"
|
|
|
|
#include "macros/units.h"
|
2023-12-07 10:29:40 +01:00
|
|
|
#include "cfg_timer_a_smclk_b_aclk.h"
|
2023-06-03 21:47:24 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2023-06-13 15:56:24 +02:00
|
|
|
#define CLOCK_CORECLOCK msp430_dco_freq
|
2023-06-03 21:47:24 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Clock configuration
|
|
|
|
*/
|
2023-06-13 15:56:24 +02:00
|
|
|
static const msp430_clock_params_t clock_params = {
|
2023-06-03 21:47:24 +02:00
|
|
|
.target_dco_frequency = MHZ(16),
|
|
|
|
.lfxt1_frequency = 32768,
|
|
|
|
.main_clock_source = MAIN_CLOCK_SOURCE_DCOCLK,
|
|
|
|
.submain_clock_source = SUBMAIN_CLOCK_SOURCE_DCOCLK,
|
|
|
|
.main_clock_divier = MAIN_CLOCK_DIVIDE_BY_1,
|
|
|
|
.submain_clock_divier = SUBMAIN_CLOCK_DIVIDE_BY_1,
|
|
|
|
.auxiliary_clock_divier = AUXILIARY_CLOCK_DIVIDE_BY_1,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name UART configuration
|
|
|
|
* @{
|
|
|
|
*/
|
2024-02-06 21:07:09 +01:00
|
|
|
static const uart_conf_t uart_config[] = {
|
|
|
|
{
|
|
|
|
.uart = &usci_a1_as_uart,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
#define UART0_RX_ISR USCIAB1RX_VECTOR /**< RX IRQ vector of UART 0 */
|
2023-06-03 21:47:24 +02:00
|
|
|
|
2024-02-06 21:07:09 +01:00
|
|
|
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
2023-06-03 21:47:24 +02:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name SPI configuration
|
|
|
|
* @{
|
|
|
|
*/
|
2024-02-06 21:07:09 +01:00
|
|
|
static const spi_conf_t spi_config[] = {
|
|
|
|
{
|
|
|
|
.spi = &usci_b0_as_spi,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.spi = &usci_b1_as_spi,
|
|
|
|
},
|
|
|
|
};
|
2023-06-03 21:47:24 +02:00
|
|
|
|
2024-02-06 21:07:09 +01:00
|
|
|
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
2023-06-03 21:47:24 +02:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* PERIPH_CONF_H */
|
|
|
|
/** @} */
|