-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6534ae
commit 34b40cc
Showing
6 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MODULE = board | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <martin.elshuber@theobroma-systems.com> | ||
* | ||
* @} | ||
*/ | ||
|
||
#include "board.h" | ||
|
||
void board_init(void) | ||
{ | ||
/* initialize the CPU */ | ||
cpu_init(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <hauke.petersen@fu-berlin.de> | ||
*/ | ||
|
||
#ifndef BOARD_H_ | ||
#define BOARD_H_ | ||
|
||
#include <stdint.h> | ||
#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_ */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <hauke.petersen@fu-berlin.de> | ||
*/ | ||
|
||
#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_ */ |