Black pill

Support for the stm32f103c8 based Black pill. More...

Detailed Description

Support for the stm32f103c8 based Black pill.

This board can be bought very cheaply on sides like eBay or AliExpress. Although the MCU nominally has 64 KiB ROM, most of them have 128 KiB ROM. This board is almost identical to the bluepill board, except for the pin layout and the on board LED is connected to PB12 instead of PC13. For more information see: http://wiki.stm32duino.com/index.php?title=Black_Pill

Files

file  blackpill/include/board.h
 Peripheral MCU configuration for the Black Pill board.
 

Macros

#define STDIO_UART_DEV   UART_DEV(1)
 Use the 2nd UART for STDIO on this board.
 

Functions

void board_init (void)
 Initialize board specific hardware, including clock, LEDs and std-IO.
 

Macros for controlling the on-board LED.

#define LED0_PORT   GPIOB
 
#define LED0_PIN   GPIO_PIN(PORT_B, 12)
 
#define LED0_MASK   (1 << 12)
 
#define LED0_ON   (LED0_PORT->BSRR = (LED0_MASK << 16))
 
#define LED0_OFF   (LED0_PORT->BSRR = LED0_MASK)
 
#define LED0_TOGGLE   (LED0_PORT->ODR ^= LED0_MASK)
 

xtimer configuration

#define XTIMER_WIDTH   (16)
 
#define XTIMER_BACKOFF   5