2017-11-16 18:10:48 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-01-25 07:45:08 +01:00
|
|
|
* @defgroup boards_common_nucleo STM32 Nucleo Common
|
2017-11-16 18:10:48 +01:00
|
|
|
* @ingroup boards_common
|
2018-01-25 07:45:08 +01:00
|
|
|
* @brief Common support for all STM32 Nucleo boards
|
2017-11-16 18:10:48 +01:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Global common Nucleo board configuration
|
|
|
|
*
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BOARD_NUCLEO_H
|
|
|
|
#define BOARD_NUCLEO_H
|
|
|
|
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "periph_conf.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name Xtimer configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32L0) && \
|
|
|
|
!defined(CPU_MODEL_STM32F042K6) && !defined(CPU_MODEL_STM32F031K6)
|
|
|
|
#define XTIMER_WIDTH (16)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(CPU_MODEL_STM32F334R8)
|
|
|
|
#define XTIMER_SHOOT_EARLY (2)
|
|
|
|
#define XTIMER_OVERHEAD (5)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(CPU_FAM_STM32F1)
|
|
|
|
#define XTIMER_WIDTH (16)
|
|
|
|
#define XTIMER_BACKOFF (5)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(CPU_FAM_STM32L1)
|
2018-03-09 09:28:25 +01:00
|
|
|
#define XTIMER_BACKOFF (11)
|
2017-11-16 18:10:48 +01:00
|
|
|
#define XTIMER_OVERHEAD (6)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(CPU_FAM_STM32F4) || defined(CPU_MODEL_STM32F303ZE)
|
2018-03-20 18:59:30 +01:00
|
|
|
#define XTIMER_BACKOFF (8)
|
2017-11-16 18:10:48 +01:00
|
|
|
#define XTIMER_OVERHEAD (6)
|
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
|
|
*/
|
|
|
|
void board_init(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* BOARD_NUCLEO_H */
|
|
|
|
/** @} */
|