-
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.
boards: add nucleo144-f413 initial support
- Loading branch information
Vincent Dupont
committed
Feb 8, 2017
1 parent
8b48686
commit cdfb528
Showing
8 changed files
with
406 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 @@ | ||
include $(RIOTBOARD)/nucleo-common/Makefile.dep |
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,15 @@ | ||
# Put defined MCU peripherals here (in alphabetical order) | ||
FEATURES_PROVIDED += periph_cpuid | ||
FEATURES_PROVIDED += periph_i2c | ||
FEATURES_PROVIDED += periph_gpio | ||
FEATURES_PROVIDED += periph_rtc | ||
FEATURES_PROVIDED += periph_spi | ||
FEATURES_PROVIDED += periph_timer | ||
FEATURES_PROVIDED += periph_uart | ||
FEATURES_PROVIDED += periph_pwm | ||
|
||
# load the common Makefile.features for Nucleo boards | ||
include $(RIOTBOARD)/nucleo-common/Makefile.features | ||
|
||
# The board MPU family (used for grouping by the CI system) | ||
FEATURES_MCU_GROUP = cortex_m4_3 |
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,6 @@ | ||
# define the cpu used by the nucleo-f446 board | ||
export CPU = stm32f4 | ||
export CPU_MODEL = stm32f413zh | ||
|
||
# load the common Makefile.include for Nucleo boards | ||
include $(RIOTBOARD)/nucleo-common/Makefile.include |
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,33 @@ | ||
/* | ||
* Copyright (C) 2016 Inria | ||
* | ||
* 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_nucleo144-f413 | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific implementations for the nucleo144-f413 board | ||
* | ||
* @author Alexandre Abadie <alexandre.abadie@inria.fr> | ||
* | ||
* @} | ||
*/ | ||
|
||
#include "board.h" | ||
#include "periph/gpio.h" | ||
|
||
void board_init(void) | ||
{ | ||
/* initialize the CPU */ | ||
cpu_init(); | ||
|
||
/* initialize the boards LEDs */ | ||
gpio_init(LED0_PIN, GPIO_OUT); | ||
gpio_init(LED1_PIN, GPIO_OUT); | ||
gpio_init(LED2_PIN, GPIO_OUT); | ||
} |
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 @@ | ||
source [find board/st_nucleo_f4.cfg] |
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,79 @@ | ||
/* | ||
* Copyright (C) 2016 Inria | ||
* | ||
* 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_nucleo144-f413 Nucleo-F413 | ||
* @ingroup boards | ||
* @brief Board specific files for the nucleo144-f413 board | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific definitions for the nucleo-f413 board | ||
* | ||
* @author Alexandre Abadie <alexandre.abadie@inria.fr> | ||
*/ | ||
|
||
#ifndef BOARD_H | ||
#define BOARD_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @name xtimer configuration | ||
* @{ | ||
*/ | ||
#define XTIMER_DEV TIMER_DEV(0) | ||
#define XTIMER_CHAN (0) | ||
#define XTIMER_OVERHEAD (6) | ||
#define XTIMER_BACKOFF (5) | ||
/** @} */ | ||
|
||
/** | ||
* @brief LED pin definitions and handlers | ||
* @{ | ||
*/ | ||
#define LED_CREG BSRRH | ||
#define LED_SREG BSRRL | ||
|
||
#define LED0_PIN GPIO_PIN(PORT_B, 0) | ||
#define LED0_MASK (1 << 0) | ||
#define LED0_ON (GPIOA->LED_SREG = LED0_MASK) | ||
#define LED0_OFF (GPIOA->LED_CREG = LED0_MASK) | ||
#define LED0_TOGGLE (GPIOA->ODR ^= LED0_MASK) | ||
|
||
#define LED1_PIN GPIO_PIN(PORT_B, 7) | ||
#define LED1_MASK (1 << 7) | ||
#define LED1_OFF (GPIOA->LED_CREG = LED1_MASK) | ||
#define LED1_ON (GPIOA->LED_SREG = LED1_MASK) | ||
#define LED1_TOGGLE (GPIOA->ODR ^= LED1_MASK) | ||
|
||
#define LED2_PIN GPIO_PIN(PORT_B, 14) | ||
#define LED2_MASK (1 << 14) | ||
#define LED2_ON (GPIOA->LED_SREG = LED2_MASK) | ||
#define LED2_OFF (GPIOA->LED_CREG = LED2_MASK) | ||
#define LED2_TOGGLE (GPIOA->ODR ^= LED2_MASK) | ||
/** @} */ | ||
|
||
/** | ||
* @brief User button | ||
*/ | ||
#define BTN_B1_PIN GPIO_PIN(PORT_C, 13) | ||
|
||
/** | ||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO | ||
*/ | ||
void board_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* BOARD_H */ | ||
/** @} */ |
Oops, something went wrong.