1.. zephyr:board:: nucleo_f103rb 2 3Overview 4******** 5The STM32 Nucleo-64 development board with STM32F103RB MCU, supports Arduino and ST morpho connectivity. 6 7The STM32 Nucleo board provides an affordable, and flexible way for users to try out new concepts, 8and build prototypes with the STM32 microcontroller, choosing from the various 9combinations of performance, power consumption, and features. 10 11The Arduino* Uno V3 connectivity support and the ST morpho headers allow easy functionality 12expansion of the STM32 Nucleo open development platform with a wide choice of 13specialized shields. 14 15The STM32 Nucleo board integrates the ST-LINK/V2-1 debugger and programmer. 16 17The STM32 Nucleo board comes with the STM32 comprehensive software HAL library together 18with various packaged software examples. 19 20More information about the board can be found at the `Nucleo F103RB website`_. 21 22Hardware 23******** 24Nucleo F103RB provides the following hardware components: 25 26- STM32 microcontroller in QFP64 package 27- Two types of extension resources: 28 29 - Arduino* Uno V3 connectivity 30 - ST morpho extension pin headers for full access to all STM32 I/Os 31 32- ARM* mbed* 33- On-board ST-LINK/V2-1 debugger/programmer with SWD connector: 34 35 - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1 36 37- Flexible board power supply: 38 39 - USB VBUS or external source (3.3V, 5V, 7 - 12V) 40 - Power management access point 41 42- Three LEDs: 43 44 - USB communication (LD1), user LED (LD2), power LED (LD3) 45 46- Two push-buttons: USER and RESET 47- USB re-enumeration capability. Three different interfaces supported on USB: 48 49 - Virtual COM port 50 - Mass storage 51 - Debug port 52 53- Support of wide choice of Integrated Development Environments (IDEs) including: 54 55 - IAR 56 - ARM Keil 57 - GCC-based IDEs 58 59More information about STM32F103RB can be found here: 60 61- `STM32F103 reference manual`_ 62- `STM32F103 data sheet`_ 63 64Supported Features 65================== 66 67The Zephyr nucleo_f103rb board configuration supports the following hardware features: 68 69+-----------+------------+-------------------------------------+ 70| Interface | Controller | Driver/Component | 71+===========+============+=====================================+ 72| NVIC | on-chip | nested vector interrupt controller | 73+-----------+------------+-------------------------------------+ 74| UART | on-chip | serial port-polling; | 75| | | serial port-interrupt | 76+-----------+------------+-------------------------------------+ 77| PINMUX | on-chip | pinmux | 78+-----------+------------+-------------------------------------+ 79| GPIO | on-chip | gpio | 80+-----------+------------+-------------------------------------+ 81| CLOCK | on-chip | reset and clock control | 82+-----------+------------+-------------------------------------+ 83| FLASH | on-chip | flash memory | 84+-----------+------------+-------------------------------------+ 85| WATCHDOG | on-chip | independent watchdog | 86+-----------+------------+-------------------------------------+ 87| ADC | on-chip | ADC Controller | 88+-----------+------------+-------------------------------------+ 89| DMA | on-chip | Direct Memory Access | 90+-----------+------------+-------------------------------------+ 91| die-temp | on-chip | die temperature sensor | 92+-----------+------------+-------------------------------------+ 93| COUNTER | on-chip | rtc | 94+-----------+------------+-------------------------------------+ 95 96Other hardware features are not yet supported in this Zephyr port. 97 98The default configuration can be found in 99:zephyr_file:`boards/st/nucleo_f103rb/nucleo_f103rb_defconfig` 100 101Connections and IOs 102=================== 103 104Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as 105input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the 106GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current 107capable except for analog inputs. 108 109Board connectors: 110----------------- 111.. image:: img/nucleo_f103rb_connectors.jpg 112 :align: center 113 :alt: Nucleo F103RB connectors 114 115Default Zephyr Peripheral Mapping: 116---------------------------------- 117 118- UART_1 TX/RX : PA9/PA10 119- UART_2 TX/RX : PA2/PA3 (ST-Link Virtual COM Port) 120- SPI1 NSS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI) 121- SPI2 SCK/MISO/MOSI : PB12/PB13/PB14/PB15 122- I2C1 SDA/SCL: PB9/PB8 (Arduino I2C) 123- PWM1_CH1: PA8 124- USER_PB : PC13 125- LD1 : PA5 126 127For more details please refer to `STM32 Nucleo-64 board User Manual`_. 128 129Programming and Debugging 130************************* 131 132Nucleo F103RB board includes an ST-LINK/V2-1 embedded debug tool interface. 133 134Applications for the ``nucleo_f103rb`` board configuration can be built and 135flashed in the usual way (see :ref:`build_an_application` and 136:ref:`application_run` for more details). 137 138Flashing 139======== 140 141The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 142so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 143 144Alternatively, OpenOCD or JLink can also be used to flash the board using 145the ``--runner`` (or ``-r``) option: 146 147.. code-block:: console 148 149 $ west flash --runner openocd 150 $ west flash --runner jlink 151 152Flashing an application to Nucleo F103RB 153---------------------------------------- 154 155Here is an example for the :zephyr:code-sample:`blinky` application. 156 157.. zephyr-app-commands:: 158 :zephyr-app: samples/basic/blinky 159 :board: nucleo_f103rb 160 :goals: build flash 161 162You will see the LED blinking every second. 163 164Debugging 165========= 166 167You can debug an application in the usual way. Here is an example for the 168:zephyr:code-sample:`blinky` application. 169 170.. zephyr-app-commands:: 171 :zephyr-app: samples/basic/blinky 172 :board: nucleo_f103rb 173 :maybe-skip-config: 174 :goals: debug 175 176References 177********** 178 179.. target-notes:: 180 181.. _Nucleo F103RB website: 182 https://www.st.com/en/evaluation-tools/nucleo-f103rb.html 183 184.. _STM32F103 reference manual: 185 https://www.st.com/resource/en/reference_manual/cd00171190.pdf 186 187.. _STM32F103 data sheet: 188 https://www.st.com/resource/en/datasheet/stm32f103rb.pdf 189 190.. _STM32 Nucleo-64 board User Manual: 191 https://www.st.com/resource/en/user_manual/dm00105823.pdf 192 193.. _STM32CubeProgrammer: 194 https://www.st.com/en/development-tools/stm32cubeprog.html 195