Roll back to older STM32 core files (#128)

This commit is contained in:
Ben Lye
2017-12-17 00:44:29 +00:00
committed by GitHub
parent dc9f738f30
commit 68dcc75949
49 changed files with 580 additions and 1838 deletions

View File

@@ -36,7 +36,7 @@
#ifndef _BOARD_GENERIC_STM32F103C_H_
#define _BOARD_GENERIC_STM32F103C_H_
#define CYCLES_PER_MICROSECOND (F_CPU / 1000000U)
#define CYCLES_PER_MICROSECOND 72
#define SYSTICK_RELOAD_VAL (F_CPU/1000) - 1 /* takes a cycle to reload */
#define BOARD_NR_USARTS 3
@@ -70,10 +70,8 @@
#define BOARD_JTDO_PIN 19
#define BOARD_NJTRST_PIN 18
#define BOARD_USB_DISC_DEV NULL
#define BOARD_USB_DISC_BIT NULL
#define LED_BUILTIN PC13
#define BOARD_USB_DISC_DEV GPIOB
#define BOARD_USB_DISC_BIT 10
// Note this needs to match with the PIN_MAP array in board.cpp
enum {

View File

@@ -17,6 +17,4 @@ static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;
#define LED_BUILTIN PC13
#endif /* _VARIANT_ARDUINO_STM32_ */
#endif /* _VARIANT_ARDUINO_STM32_ */

View File

@@ -48,13 +48,7 @@
// works for F103 performance line MCUs, which is all that LeafLabs
// currently officially supports).
#ifndef BOARD_RCC_PLLMUL
#if F_CPU==128000000
#define BOARD_RCC_PLLMUL RCC_PLLMUL_16
#elif F_CPU==72000000
#define BOARD_RCC_PLLMUL RCC_PLLMUL_9
#elif F_CPU==48000000
#define BOARD_RCC_PLLMUL RCC_PLLMUL_6
#endif
#define BOARD_RCC_PLLMUL RCC_PLLMUL_9
#endif
namespace wirish {
@@ -77,7 +71,7 @@ namespace wirish {
#if F_CPU == 72000000
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
#elif F_CPU == 48000000
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1);
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
#endif
}