diff --git a/boards/platypus-demo/Makefile b/boards/platypus-demo/Makefile new file mode 100644 index 0000000000000..f8fcbb53a0659 --- /dev/null +++ b/boards/platypus-demo/Makefile @@ -0,0 +1,3 @@ +MODULE = board + +include $(RIOTBASE)/Makefile.base diff --git a/boards/platypus-demo/Makefile.features b/boards/platypus-demo/Makefile.features new file mode 100644 index 0000000000000..c5fce98a77f9e --- /dev/null +++ b/boards/platypus-demo/Makefile.features @@ -0,0 +1,13 @@ +# Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_adc +FEATURES_PROVIDED += periph_cpuid +FEATURES_PROVIDED += periph_gpio +FEATURES_PROVIDED += periph_spi +FEATURES_PROVIDED += periph_timer +FEATURES_PROVIDED += periph_uart + +# Various other features (if any) +FEATURES_PROVIDED += cpp + +# The board MPU family (used for grouping by the CI system) +FEATURES_MCU_GROUP = cortex_m0_1 diff --git a/boards/platypus-demo/Makefile.include b/boards/platypus-demo/Makefile.include new file mode 100644 index 0000000000000..537663a961815 --- /dev/null +++ b/boards/platypus-demo/Makefile.include @@ -0,0 +1,16 @@ +# define the cpu used by the stm32f0-discovery board +export CPU = stm32f0 +export CPU_MODEL = stm32f042c6 + +# define the default port depending on the host OS +# PORT_LINUX ?= /dev/ttyUSB0 +# PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) + +export FLASHER = sudo dfu-util +export FFLAGS = -d 0483:df11 -a 0 -s 0x08000000 -D "$(HEXFILE)" + +# setup serial terminal +# include $(RIOTBOARD)/Makefile.include.serial + +# this board uses openocd +# include $(RIOTBOARD)/Makefile.include.openocd diff --git a/boards/platypus-demo/board.c b/boards/platypus-demo/board.c new file mode 100644 index 0000000000000..0114751a515d2 --- /dev/null +++ b/boards/platypus-demo/board.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2016 Theobroma Systems Design & Consulting GmbH + * + * 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_platypusdemo + * @{ + * + * @file + * @brief Board specific implementations for the Platypus Breakout board + * + * @author Martin Elshuber + * + * @} + */ + +#include "board.h" + +void board_init(void) +{ +/* initialize the CPU */ + cpu_init(); +} diff --git a/boards/platypus-demo/include/board.h b/boards/platypus-demo/include/board.h new file mode 100644 index 0000000000000..913fcd1f3862e --- /dev/null +++ b/boards/platypus-demo/include/board.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2014 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. + */ + +/** + * @defgroup boards_stm32f0discovery STM32F0Discovery + * @ingroup boards + * @brief Support for the STM32F0Discovery board + * @{ + * + * @file + * @brief Board specific definitions for the STM32F0Discovery evaluation board. + * + * @author Hauke Petersen + */ + +#ifndef BOARD_H_ +#define BOARD_H_ + +#include +#include "cpu.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @name Macros for controlling the on-board LEDs. + * @{ + */ +/** @} */ + +/** + * @brief User button + */ + +/** + * @brief Initialize board specific hardware, including clock, LEDs and std-IO + */ +void board_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* BOARD_H_ */ +/** @} */ diff --git a/boards/platypus-demo/include/periph_conf.h b/boards/platypus-demo/include/periph_conf.h new file mode 100644 index 0000000000000..61f08f48912ce --- /dev/null +++ b/boards/platypus-demo/include/periph_conf.h @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2014 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_stm32f0discovery + * @{ + * + * @file + * @brief Peripheral MCU configuration for the STM32F0discovery board + * + * @author Hauke Petersen + */ + +#ifndef PERIPH_CONF_H_ +#define PERIPH_CONF_H_ + +#include "periph_cpu.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @name Clock system configuration + * @{ + */ +#define CLOCK_HSI (8000000U) /* external oscillator */ +#define CLOCK_CORECLOCK (48000000U) /* desired core clock frequency */ + +/* the actual PLL values are automatically generated */ +#define CLOCK_PLL_MUL (CLOCK_CORECLOCK / CLOCK_HSI) +/** @} */ + +/** + * @name Timer configuration + * @{ + */ +#define TIMER_NUMOF (1U) +#define TIMER_0_EN 1 +#define TIMER_IRQ_PRIO 1 + +/* Timer 0 configuration */ +#define TIMER_0_DEV TIM2 +#define TIMER_0_CHANNELS 4 +#define TIMER_0_FREQ (CLOCK_CORECLOCK) +#define TIMER_0_MAX_VALUE (0xffffffff) +#define TIMER_0_CLKEN() (RCC->APB1ENR |= RCC_APB1ENR_TIM2EN) +#define TIMER_0_ISR isr_tim2 +#define TIMER_0_IRQ_CHAN TIM2_IRQn +/** @} */ + +/** + * @name UART configuration + * @{ + */ +#define UART_NUMOF (0U) +/** @} */ + +/** + * @brief ADC configuration + * + * We need to configure the following values: + * [ pin, channel ] + * @{ + */ +#define ADC_NUMOF (0) +/** @} */ + +/** + * @brief DAC configuration + * @{ + */ +#define DAC_NUMOF (0) +/** @} */ + +/** + * @name SPI configuration + * @{ + */ +#define SPI_NUMOF (0U) +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* PERIPH_CONF_H_ */