51 lines
994 B
Markdown
51 lines
994 B
Markdown
# Blue Pill Notes
|
|
|
|
## Baseline
|
|
|
|
- Board: STM32F103C8T6 Blue Pill
|
|
- Core: Cortex-M3
|
|
- Default target: `thumbv7m-none-eabi`
|
|
|
|
## LED
|
|
|
|
- Most Blue Pill boards wire the onboard LED to `PC13`
|
|
- It is usually active-low
|
|
- `set_low()` usually turns it on
|
|
- `set_high()` usually turns it off
|
|
|
|
## RGB LED
|
|
|
|
- `PA0` = GND, drive low
|
|
- `PA1` = red
|
|
- `PA2` = green
|
|
- `PA3` = blue
|
|
- The RGB fade example uses software PWM on `PA1`, `PA2`, and `PA3`
|
|
|
|
## 5-Way Button Board
|
|
|
|
- `PB12` = GND, drive low
|
|
- `PA10` = VCC, drive high
|
|
- `PB13` = right
|
|
- `PB14` = down
|
|
- `PB15` = left
|
|
- `PA8` = center
|
|
- `PA9` = up
|
|
- Assumption: the button inputs read high when pressed
|
|
- The button examples use `PA8` as the default center button
|
|
- TODO: flip the input polarity if your module is active-low instead
|
|
|
|
## HMC5883L Module
|
|
|
|
- `PB4` = VCC, drive high
|
|
- `PB5` = GND, drive low
|
|
- `PB6` = SCL
|
|
- `PB7` = SDA
|
|
- `PB8` = DRDY
|
|
|
|
## Probe Wiring
|
|
|
|
- `SWDIO` -> `SWDIO`
|
|
- `SWCLK` -> `SWCLK`
|
|
- `GND` -> `GND`
|
|
- `3V3` -> `3V3` reference
|