mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
Merged in russkel/nuttx/blackpill (pull request #708)
stm32f103-minimum: add blackpill LED support Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
@@ -5,6 +5,18 @@
|
|||||||
|
|
||||||
if ARCH_BOARD_STM32F103_MINIMUM
|
if ARCH_BOARD_STM32F103_MINIMUM
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Board type"
|
||||||
|
default STM32F103MINIMUM_BLUEPILL
|
||||||
|
|
||||||
|
config STM32F103MINIMUM_BLUEPILL
|
||||||
|
bool "Blue Pill/Red Pill/RoboDyn Black Pill"
|
||||||
|
|
||||||
|
config STM32F103MINIMUM_BLACKPILL
|
||||||
|
bool "Black Pill"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
config STM32F103MINIMUM_AT24_BLOCKMOUNT
|
config STM32F103MINIMUM_AT24_BLOCKMOUNT
|
||||||
bool "AT24 Serial EEPROM auto-mount"
|
bool "AT24 Serial EEPROM auto-mount"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -29,8 +29,12 @@ STM32F103C8T6 Minimum System Development Boards:
|
|||||||
no name at all. It is based on a STM32F103C8T6 and has a DIP-40 form-
|
no name at all. It is based on a STM32F103C8T6 and has a DIP-40 form-
|
||||||
factor.
|
factor.
|
||||||
|
|
||||||
There are two versions of very similar boards: One is red and one is
|
There are four versions of very similar boards: Red, Blue, RoboDyn Black and
|
||||||
blue. See http://www.stm32duino.com/viewtopic.php?f=28&t=117
|
Black.
|
||||||
|
See: https://wiki.stm32duino.com/index.php?title=Blue_Pill
|
||||||
|
https://wiki.stm32duino.com/index.php?title=Red_Pill
|
||||||
|
https://wiki.stm32duino.com/index.php?title=RobotDyn_Black_Pill
|
||||||
|
https://wiki.stm32duino.com/index.php?title=Black_Pill
|
||||||
|
|
||||||
The Red Board:
|
The Red Board:
|
||||||
|
|
||||||
@@ -39,6 +43,7 @@ STM32F103C8T6 Minimum System Development Boards:
|
|||||||
- 1.5k pull up resistor on the PA12 pin (USB D+) which you can
|
- 1.5k pull up resistor on the PA12 pin (USB D+) which you can
|
||||||
programatically drag down for automated USB reset.
|
programatically drag down for automated USB reset.
|
||||||
- large power capacitors and LDO power.
|
- large power capacitors and LDO power.
|
||||||
|
- User LED on PC13
|
||||||
|
|
||||||
Problems with the red board:
|
Problems with the red board:
|
||||||
|
|
||||||
@@ -58,6 +63,7 @@ STM32F103C8T6 Minimum System Development Boards:
|
|||||||
that takes some of the stress off the solder points.
|
that takes some of the stress off the solder points.
|
||||||
- It has nice clear readable silkscreen printing.
|
- It has nice clear readable silkscreen printing.
|
||||||
- It also a larger reset button.
|
- It also a larger reset button.
|
||||||
|
- User LED on PC13
|
||||||
|
|
||||||
Problems with the blue board:
|
Problems with the blue board:
|
||||||
|
|
||||||
@@ -70,13 +76,17 @@ STM32F103C8T6 Minimum System Development Boards:
|
|||||||
A schematic for the blue board is available here:
|
A schematic for the blue board is available here:
|
||||||
http://www.stm32duino.com/download/file.php?id=276
|
http://www.stm32duino.com/download/file.php?id=276
|
||||||
|
|
||||||
|
The Black Board:
|
||||||
|
|
||||||
|
- User LED is on PB12.
|
||||||
|
- Mounting holes.
|
||||||
|
|
||||||
Both Boards:
|
Both Boards:
|
||||||
|
|
||||||
Nice features common to both:
|
Nice features common to both:
|
||||||
|
|
||||||
- SWD pins broken out and easily connected (VCC, GND, SWDIO, SWCLK)
|
- SWD pins broken out and easily connected (VCC, GND, SWDIO, SWCLK)
|
||||||
- USB 5V is broken out with easy access.
|
- USB 5V is broken out with easy access.
|
||||||
- User LED on PC13
|
|
||||||
- Power LED
|
- Power LED
|
||||||
- You can probably use more flash (128k) than officially documented for
|
- You can probably use more flash (128k) than officially documented for
|
||||||
the chip (stm32f103c8t6 64k), I was able to load 115k of flash on mine
|
the chip (stm32f103c8t6 64k), I was able to load 115k of flash on mine
|
||||||
@@ -84,8 +94,8 @@ STM32F103C8T6 Minimum System Development Boards:
|
|||||||
|
|
||||||
Problems with both boards:
|
Problems with both boards:
|
||||||
|
|
||||||
- No preloaded bootloader * to me this isn't really a problem as the
|
- No preloaded bootloader (this isn't really a problem as the
|
||||||
entire 64k of flash is available for use
|
entire 64k of flash is available for use)
|
||||||
- No user button
|
- No user button
|
||||||
|
|
||||||
This is the board pinout based on its form-factor for the Blue board:
|
This is the board pinout based on its form-factor for the Blue board:
|
||||||
|
|||||||
@@ -98,8 +98,18 @@
|
|||||||
/* GPIOs **************************************************************/
|
/* GPIOs **************************************************************/
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
|
|
||||||
|
/* The Blue/Red pills have a different pinout to the Black pill,
|
||||||
|
* which includes the board's user LED.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_STM32F103MINIMUM_BLACKPILL
|
||||||
|
# define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
|
||||||
|
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN12)
|
||||||
|
#else
|
||||||
# define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
|
# define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
|
||||||
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
|
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* BUTTONs */
|
/* BUTTONs */
|
||||||
|
|
||||||
#define GPIO_BTN_USER1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
|
#define GPIO_BTN_USER1 (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
|
||||||
|
|||||||
Reference in New Issue
Block a user