bluepill/include/board.h

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. For more information see: http://wiki.stm32duino.com/index.php?title=Blue_Pill

Peripheral MCU configuration for the bluepill board

LED0_PORT
1
GPIOC
LED0_PIN
1
GPIO_PIN(PORT_C, 13)
LED0_MASK
1
(1 << 13)
LED0_ON
1
(LED0_PORT->BSRR = (LED0_MASK << 16))
LED0_OFF
1
(LED0_PORT->BSRR = LED0_MASK)
LED0_TOGGLE
1
(LED0_PORT->ODR  ^= LED0_MASK)
XTIMER_WIDTH
1
(16)
XTIMER_BACKOFF
1
5
STDIO_UART_DEV

Use the 2nd UART for STDIO on this board.

1
UART_DEV(1)
void board_init(void)

Initialize board specific hardware, including clock, LEDs and std-IO.