1.. zephyr:board:: stm32f103_mini 2 3Overview 4******** 5 6The STM32F103_MINI board features an ARM Cortex-M3 based STM32F103RC MCU 7with a wide range of connectivity support and configurations. There are 8multiple version of this board like ``stm32f103_mini``. 9 10.. image:: img/stm32f103_mini_yellow.jpg 11 :align: center 12 :alt: STM32F103 Mini Yellow 13 14.. image:: img/stm32f103_mini_blue.jpg 15 :align: center 16 :alt: STM32F103 Mini Blue 17 18Hardware 19******** 20STM32F103 Mini provides the following hardware components: 21 22- STM32 microcontroller in QFP64 package 23 24- Flexible board power supply: 25 26 - USB VBUS or external source (3.3V, 5V, 7 - 12V) 27 - Power management access point 28 29- Two LEDs: 30 31 - User LED (LD1), power LED (LD2) 32 33- USB re-enumeration capability: 34 35 - Mass storage 36 37More information about STM32F103RC can be found here: 38 39- `STM32F103 reference manual`_ 40- `STM32F103 data sheet`_ 41 42Supported Features 43================== 44 45The Zephyr stm32f103_mini board configuration supports the following hardware features: 46 47+-----------+------------+-------------------------------------+ 48| Interface | Controller | Driver/Component | 49+===========+============+=====================================+ 50| NVIC | on-chip | nested vector interrupt controller | 51+-----------+------------+-------------------------------------+ 52| UART | on-chip | serial port-polling; | 53| | | serial port-interrupt | 54+-----------+------------+-------------------------------------+ 55| PINMUX | on-chip | pinmux | 56+-----------+------------+-------------------------------------+ 57| GPIO | on-chip | gpio | 58+-----------+------------+-------------------------------------+ 59| CLOCK | on-chip | reset and clock control | 60+-----------+------------+-------------------------------------+ 61| FLASH | on-chip | flash memory | 62+-----------+------------+-------------------------------------+ 63| WATCHDOG | on-chip | independent watchdog | 64+-----------+------------+-------------------------------------+ 65| ADC | on-chip | ADC Controller | 66+-----------+------------+-------------------------------------+ 67| PWM | on-chip | pwm | 68+-----------+------------+-------------------------------------+ 69| SPI | on-chip | spi | 70+-----------+------------+-------------------------------------+ 71| USB | on-chip | USB device | 72+-----------+------------+-------------------------------------+ 73| COUNTER | on-chip | rtc | 74+-----------+------------+-------------------------------------+ 75 76Other hardware features are not yet supported in this Zephyr port. 77 78The default configuration can be found in 79:zephyr_file:`boards/others/stm32f103_mini/stm32f103_mini_defconfig` 80 81Connections and IOs 82=================== 83 84Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as 85input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the 86GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current 87capable except for analog inputs. 88 89Board connectors: 90----------------- 91.. image:: img/stm32f103_mini_pin.jpg 92 :align: center 93 :alt: Nucleo F103RB connectors 94 95Default Zephyr Peripheral Mapping: 96---------------------------------- 97 98- UART_1 TX/RX: PA9/PA10 99- UART_2 TX/RX: PA2/PA3 (ST-Link Virtual COM Port) 100- SPI1 NSS/SCK/MISO/MOSI: PA4/PA5/PA6/PA7 101- SPI2 NSS/SCK/MISO/MOSI: PB12/PB13/PB14/PB15 102- I2C1 SDA/SCL: PB9/PB8 103- PWM1_CH1: PA8 104- USER_PB: PC13 105- LD1: PA5 106- USB_DC DM/DP: PA11/PA12 107 108System Clock 109------------ 110 111The on-board 8MHz crystal is used to produce a 72MHz system clock with PLL. 112 113Programming and Debugging 114************************* 115 116Applications for the ``stm32f103_mini`` board configuration can be built and 117flashed in the usual way (see :ref:`build_an_application` and 118:ref:`application_run` for more details). 119 120Flashing 121======== 122 123There are 2 main entry points for flashing STM32F1X SoCs, one using the ROM 124bootloader, and another by using the SWD debug port (which requires additional 125hardware such as ST-Link). Flashing using the ROM bootloader requires a special activation 126pattern, which can be triggered by using the BOOT0 pin. 127 128Flashing an application to stm32f103 mini 129----------------------------------------- 130 131Here is an example for the :zephyr:code-sample:`blinky` application. 132 133.. zephyr-app-commands:: 134 :zephyr-app: samples/basic/blinky 135 :board: stm32f103_mini 136 :goals: build flash 137 138You will see the LED blinking every second. 139 140Debugging 141========= 142 143You can debug an application in the usual way. Here is an example for the 144:zephyr:code-sample:`blinky` application. 145 146.. zephyr-app-commands:: 147 :zephyr-app: samples/basic/blinky 148 :board: stm32f103_mini 149 :maybe-skip-config: 150 :goals: debug 151 152References 153********** 154 155.. target-notes:: 156 157.. _STM32F103 reference manual: 158 https://www.st.com/resource/en/reference_manual/cd00171190.pdf 159 160.. _STM32F103 data sheet: 161 https://www.st.com/resource/en/datasheet/stm32f103rc.pdf 162