-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #874 from board707/blackpill_F411
Add STM32F411CE support and fix #869
- Loading branch information
Showing
11 changed files
with
575 additions
and
4 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
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
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
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,61 @@ | ||
/****************************************************************************** | ||
* The MIT License | ||
* | ||
* Copyright (c) 2011 LeafLabs, LLC. | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, copy, | ||
* modify, merge, publish, distribute, sublicense, and/or sell copies | ||
* of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*****************************************************************************/ | ||
|
||
/** | ||
* @file blackpill_f411.cpp | ||
* @author stevestrong | ||
* @modified by board707 | ||
* @brief blackpill_f411 board file. | ||
*/ | ||
|
||
#include "blackpill_f411.h" | ||
|
||
#include <libmaple/gpio.h> | ||
#include <libmaple/rcc.h> | ||
|
||
#include <libmaple/libmaple_types.h> | ||
|
||
|
||
void boardInit(void) | ||
{ | ||
} | ||
|
||
|
||
//extern const uint8 boardPWMPins[BOARD_NR_PWM_PINS] __FLASH__ = { | ||
// 0, 1, 2, 3, 15, 16, 17, 19, 20, 21, 38, 39, 49, 41, 60, 61, 62, 63, 73, 75, 77, 78 | ||
//}; | ||
// | ||
//extern const uint8 boardADCPins[BOARD_NR_ADC_PINS] __FLASH__ = { | ||
// 0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 32, 33, 34, 35, 36, 37 | ||
//}; | ||
// | ||
//extern const uint8 boardUsedPins[BOARD_NR_USED_PINS] __FLASH__ = { | ||
// BOARD_LED_PIN, BOARD_BUTTON_PIN, BOARD_JTMS_SWDIO_PIN, | ||
// BOARD_JTCK_SWCLK_PIN, BOARD_JTDI_PIN, BOARD_JTDO_PIN, BOARD_NJTRST_PIN, | ||
// 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 78, 79, 81, | ||
// 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100 | ||
//}; | ||
|
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,93 @@ | ||
/****************************************************************************** | ||
* The MIT License | ||
* | ||
* Copyright (c) 2011 LeafLabs, LLC. | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, copy, | ||
* modify, merge, publish, distribute, sublicense, and/or sell copies | ||
* of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*****************************************************************************/ | ||
|
||
/** | ||
* @file blackpill_f411.h | ||
* @author stevestrong | ||
* @modified by board707 | ||
* @brief Private include file | ||
*/ | ||
|
||
#ifndef _BOARD_BLACKPILL_F411_H_ | ||
#define _BOARD_BLACKPILL_F411_H_ | ||
|
||
|
||
//#define Port2Pin(port, bit) ((port-'A')*16+bit) | ||
|
||
#define CLOCK_SPEED_MHZ 96 | ||
|
||
|
||
#define BOARD_LED_PIN PC13 | ||
|
||
#define BOARD_USB_DM_PIN PA11 | ||
#define BOARD_USB_DP_PIN PA12 | ||
|
||
#define BOARD_NR_USARTS 3 | ||
#define BOARD_USART1_TX_PIN PA9 | ||
#define BOARD_USART1_RX_PIN PA10 | ||
#define BOARD_USART2_TX_PIN PA2 | ||
#define BOARD_USART2_RX_PIN PA3 | ||
//#define BOARD_USART6_TX_PIN PA11 // USB_DM | ||
//#define BOARD_USART6_RX_PIN PA12 // USB_DP | ||
|
||
#define BOARD_NR_I2C 1 | ||
#define BOARD_I2C1_SCL_PIN PB6 | ||
#define BOARD_I2C1_SDA_PIN PB7 | ||
#define BOARD_I2C1A_SCL_PIN PB8 | ||
#define BOARD_I2C1A_SDA_PIN PB9 | ||
|
||
#define BOARD_NR_SPI 3 | ||
#define BOARD_SPI1_NSS_PIN PA4 | ||
#define BOARD_SPI1_SCK_PIN PA5 | ||
#define BOARD_SPI1_MISO_PIN PA6 | ||
#define BOARD_SPI1_MOSI_PIN PA7 | ||
|
||
#define BOARD_SPI2_NSS_PIN PB12 | ||
#define BOARD_SPI2_SCK_PIN PB13 | ||
#define BOARD_SPI2_MISO_PIN PB14 | ||
#define BOARD_SPI2_MOSI_PIN PB15 | ||
|
||
#define BOARD_SPI3_NSS_PIN PA15 | ||
#define BOARD_SPI3_SCK_PIN PB3 | ||
#define BOARD_SPI3_MISO_PIN PB4 | ||
#define BOARD_SPI3_MOSI_PIN PB5 | ||
|
||
//#define BOARD_NR_GPIO_PINS 32 | ||
#define BOARD_NR_PWM_PINS 22 | ||
#define BOARD_NR_ADC_PINS 16 | ||
#define BOARD_NR_USED_PINS 43 // ala42 not set yet | ||
#define BOARD_JTMS_SWDIO_PIN PA13 | ||
#define BOARD_JTCK_SWCLK_PIN PA14 | ||
|
||
|
||
enum { | ||
PA0,PA1,PA2,PA3,PA4,PA5,PA6,PA7,PA8,PA9,PA10,PA11,PA12,PA13,PA14,PA15, | ||
PB0,PB1,PB2,PB3,PB4,PB5,PB6,PB7,PB8,PB9,PB10,PB12=(PB10+2),PB13,PB14,PB15, | ||
PC13=(32+13),PC14,PC15, | ||
BOARD_NR_GPIO_PINS | ||
}; | ||
|
||
#endif |
Oops, something went wrong.