2014-11-20 17:54:02 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 INRIA
|
2015-08-26 18:45:07 +02:00
|
|
|
* 2015 Freie Universität Berlin
|
2014-11-20 17:54:02 +01:00
|
|
|
*
|
|
|
|
* 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_msb430h
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief MSB-430h peripheral configuration
|
|
|
|
*
|
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
2015-08-26 18:45:07 +02:00
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2014-11-20 17:54:02 +01:00
|
|
|
*/
|
|
|
|
|
2015-08-26 18:45:07 +02:00
|
|
|
#ifndef PERIPH_CONF_H
|
|
|
|
#define PERIPH_CONF_H
|
2014-11-20 17:54:02 +01:00
|
|
|
|
2015-09-02 12:43:37 +02:00
|
|
|
#include "periph_cpu.h"
|
|
|
|
|
2015-08-26 18:45:07 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2014-11-25 15:37:21 +01:00
|
|
|
|
2015-08-27 14:20:20 +02:00
|
|
|
#define CLOCK_CORECLOCK (7372800U)
|
|
|
|
|
2023-05-06 23:27:19 +02:00
|
|
|
/**
|
|
|
|
* @brief Clock configuration
|
|
|
|
*/
|
2023-06-13 15:56:24 +02:00
|
|
|
static const msp430_clock_params_t clock_params = {
|
2023-05-06 23:27:19 +02:00
|
|
|
.xt2_frequency = CLOCK_CORECLOCK,
|
|
|
|
.lfxt1_frequency = 32768,
|
|
|
|
.main_clock_source = MAIN_CLOCK_SOURCE_XT2CLK,
|
|
|
|
.submain_clock_source = SUBMAIN_CLOCK_SOURCE_XT2CLK,
|
|
|
|
.main_clock_divier = MAIN_CLOCK_DIVIDE_BY_1,
|
|
|
|
.submain_clock_divier = SUBMAIN_CLOCK_DIVIDE_BY_1,
|
|
|
|
.auxiliary_clock_divier = AUXILIARY_CLOCK_DIVIDE_BY_1,
|
|
|
|
.has_r_osc = true,
|
|
|
|
};
|
2015-08-27 14:20:20 +02:00
|
|
|
|
2015-08-26 18:45:07 +02:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name Timer configuration
|
2015-08-26 18:45:07 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2015-09-04 14:39:35 +02:00
|
|
|
#define TIMER_NUMOF (1U)
|
2023-06-14 16:18:15 +02:00
|
|
|
#define TIMER_BASE (&TIMER_A)
|
2015-08-26 18:45:07 +02:00
|
|
|
#define TIMER_CHAN (3)
|
|
|
|
#define TIMER_ISR_CC0 (TIMERA0_VECTOR)
|
|
|
|
#define TIMER_ISR_CCX (TIMERA1_VECTOR)
|
|
|
|
/** @} */
|
|
|
|
|
2015-08-27 14:20:20 +02:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name UART configuration
|
2015-08-27 14:20:20 +02:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define UART_NUMOF (1U)
|
|
|
|
|
2023-06-14 16:18:15 +02:00
|
|
|
#define UART_BASE (&USART_1)
|
|
|
|
#define UART_SFR (&USART_1_SFR)
|
2015-08-27 14:20:20 +02:00
|
|
|
#define UART_IE_RX_BIT (1 << 4)
|
|
|
|
#define UART_IE_TX_BIT (1 << 5)
|
|
|
|
#define UART_ME_BITS (0x30)
|
2023-06-14 16:18:15 +02:00
|
|
|
#define UART_PORT (&PORT_3)
|
2015-08-27 14:20:20 +02:00
|
|
|
#define UART_RX_PIN (1 << 6)
|
|
|
|
#define UART_TX_PIN (1 << 7)
|
|
|
|
#define UART_RX_ISR (USART1RX_VECTOR)
|
|
|
|
#define UART_TX_ISR (USART1TX_VECTOR)
|
|
|
|
/** @} */
|
|
|
|
|
2015-09-02 12:43:37 +02:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name SPI configuration
|
2015-09-02 12:43:37 +02:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define SPI_NUMOF (1U)
|
|
|
|
|
|
|
|
/* SPI configuration */
|
2023-06-14 16:18:15 +02:00
|
|
|
#define SPI_BASE (&USART_0)
|
|
|
|
#define SPI_SFR (&USART_0_SFR)
|
2015-09-02 12:43:37 +02:00
|
|
|
#define SPI_IE_RX_BIT (1 << 6)
|
|
|
|
#define SPI_IE_TX_BIT (1 << 7)
|
|
|
|
#define SPI_ME_BIT (1 << 6)
|
2020-08-31 16:51:02 +02:00
|
|
|
#define SPI_PIN_MISO GPIO_PIN(P3, 2)
|
|
|
|
#define SPI_PIN_MOSI GPIO_PIN(P3, 1)
|
|
|
|
#define SPI_PIN_CLK GPIO_PIN(P3, 3)
|
2015-09-02 12:43:37 +02:00
|
|
|
/** @} */
|
|
|
|
|
2015-08-26 18:45:07 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* PERIPH_CONF_H */
|
2022-08-11 16:24:37 +02:00
|
|
|
/** @} */
|